Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    21

    Unanswered: xp_cmdshell - problem creating txt file for working for remote computer

    I am having problem creating/copying "txt" file in a remote machine by using the "exec master..xp_cmdshell" command in query analyzer. For example, we are getting errors for the following command:

    exec master..xp_cmdshell 'copy d:\testing\authors.txt \\<MyServerName>\<myFolderName>\authors.txt'

    (but exec master..xp_cmdshell 'copy d:\testing\authors.txt d:\testing1\authors1.txt' is working without any problems)

    Any ideas?

  2. #2
    Join Date
    Jan 2004
    Posts
    49

    Talking

    Note In earlier versions, a user who was granted execute permissions for xp_cmdshell ran the command in the context of the MSSQLServer service's user account. SQL Server could be configured (through a configuration option) so that users who did not have sa access to SQL Server could run xp_cmdshell in the context of the SQLExecutiveCmdExec Windows NT account. In SQL Server 7.0, the account is called SQLAgentCmdExec. Users who are not members of the sysadmin fixed server role now run commands in the context of this account without specifying a configuration change.

  3. #3
    Join Date
    Jan 2004
    Posts
    21
    Thanks, but I am already using "SA" login, sa should have the sysadmin fixed server role. Any ideas?


    Originally posted by buser
    Note In earlier versions, a user who was granted execute permissions for xp_cmdshell ran the command in the context of the MSSQLServer service's user account. SQL Server could be configured (through a configuration option) so that users who did not have sa access to SQL Server could run xp_cmdshell in the context of the SQLExecutiveCmdExec Windows NT account. In SQL Server 7.0, the account is called SQLAgentCmdExec. Users who are not members of the sysadmin fixed server role now run commands in the context of this account without specifying a configuration change.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •