database backup problem

  • hi,

    i m using MSDE2000, i want to backup my database at my network drive or any mapped drive. what to do for this.

    currently i m doing this- i m adding device through this command and its created

    exec sp_addumpdevice 'disk','san','\\nsi\d\backup.bak'

    but when i run this command-

    "backup database aks to san "

    its give me error "Cannot open backup device 'san'. Device error or device off-line. See the SQL Server error log for more details."

    help me

    thanx in advance

  • Hello Nitin,

    Can you check up whether the user who is running the backup command is having an exclusive access rights to the network shared folder?

    Hope this helps.

    Thanks

     


    Lucky

  • hi lucky

    thanx for ur reply

    the user have the rights to access that network drive, it can easily copy any file in that netword drive. are u saying about the OS user OR sql server Login??

    so i want to here u again on same problem

    thanx

  • The user SQL Agent uses.

  • You should also check that the account that SQL Server uses also has rights. My guess is that you are testing via QA. Once things work you can then schedule a task via the SQL Agent. Its a personal best practice, and standard where I am at, to use separate domain user accounts for both SQL Server service and the SQL Agent service (my added 2 cents).

    Checking the permissions on your device is rather easy. Try the following commands in QA and as a scheduled SQL task:

    exec master..xp_cmdshell 'dir \\nsi\d'        --> checks for read access

    exec master..xp_cmdshell 'echo test_text >  \\nsi\d\test_file.txt'        --> checks for write access

    The results of these 2 commands should help in figuring out share/permission issues. One additional caveat though, you'll need to execute them as either sa or a SQL user in the sysadmin group in order to use xp_cmdshell. There are other issues and ways around this but that's another post altogether.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply