Remote Backup command in SQL Server 7.0

  • What command can I use to create a backup device on a server that is diffrent from where the database I wan to backup is located? e.g remote backup.

  • I would use a full UNC name. Also you local machine will need access to that UNC name. Here is how to cerate a backup device:

    sp_addumpdevice 'disk','<device name>','\\<machinename>\<directory>\bckup name'

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • Thank Greg for the reply. The command you sent was the command I used before posting the question. After running this command I checked the sysdevice in master database to check if the device is actually created. And it is. However, when I try to backup the database I get a reeor that it can not find it even the server is up running I can log into the server.

  • I'm guessing your server does not have access to the UNC name. Check to make sure the service accounts (MSSQLSERVER and SQL SERVER AGENT) have access to the network drive your are defining in sp_addumpdevice. You can do that by issueing this via QA:

    xp_cmdshell 'dir \\<machinename>\<directory>'

    or this via a SQL Agent job using a CmdExec type step:

    dir \\<machinename>\<directory>

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

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

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