Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2002
    Location
    Brazil
    Posts
    59

    Unanswered: How to copy a backup file between two servers?

    Hi,

    I am creating a job that runs this command:

    EXEC xp_cmdshell 'copy f:\dados_sql\mssql\backup\recom_tb_basico.bak \\stalingrado_2\c$\temp',

    The result of this job is:

    "Access is denied.
    0 file(s) copied.
    NULL"

    But I am running this command with sa user.....
    Wich kind of permission is missing to execute this copy?
    When I execute the same command to copy the backup from the server to itself, it works fine!!!!
    Does someone have an idea to solve this problem?????
    Nadia

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The NT login being used by SQL Server is probably (local system). When xp_cmdshell runs, it uses the login that is used for SQL Server. The (local system) NT login has no permissions on other machines, it is a purely local login.

    If this is your problem, you'll need to give some thought to how you want to fix it. The simplest answer is to change the NT login used by SQL Server, then restart the SQL Service.

    -PatP

  3. #3
    Join Date
    Dec 2002
    Location
    Brazil
    Posts
    59
    How can I know the NT login my SQL Server is using?
    How can I change it: I mean I need to change it every time I run the job? Or it is just once?
    Nadia

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The English description is How to change SQL Server services login account information (Enterprise Manager). If you'd prefer Portuguese, Spanish, or another language this URL should at least get you started.

    -PatP

Posting Permissions

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