Home > Ask the SQL Server Experts > Archive: Backup and Recovery Questions & Answers > Restoring a database from the production server to a disaster recovery server
Ask The SQL Server Expert: Questions & Answers
EMAIL THIS

Restoring a database from the production server to a disaster recovery server

Greg Robidoux EXPERT RESPONSE FROM: Greg Robidoux

Pose a Question
Other SQL Server Categories
Meet all SQL Server Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 15 March 2005
I'm trying to restore a database from the production server to our disaster recovery server. Both are running SQL Server 2000. The backup sets are stored on the production server.

When I try to run the restore on the d/r server using a mapped drive on the production server, I get an error message stating 'Cannot open backup device.' The Microsoft Knowledge Base points to this being a permissions problem, but the drive is mapped using the SQL Service accounts' credentials.

Both instances of SQL Server are using the same domain user account for the SQL Service. The acl's for the directory and file both show the SQL Service account having full rights. The destination server's error log has an entry 'Operating system error = 3(The system cannot find the path specified).' If, within the restore script, I copy the file from the mapped drive to a local drive the restore works. Any solutions or hints greatly appreciated.



Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Archive: Backup and Recovery
Synchronize databases on two separate active servers
Back up tables from SQL Server 2005 database to a file
Restore SQL Server 2000 backups in SQL Server 2005
Restoring a SQL Server database with a corrupt data file
SQL Server error message: "Server out of memory"
Configure log shipping between SQL Server 2000 and 2005
Restoring from msdb with only .mdf and .ldf files
Extended stored procedure to back up databases
Change tempdb from 'C' drive
Back up stored procedure only

SQL Server Backup and Recovery
SQL Server Mailbag: Data restoration and DB property management
Achieving high availability and disaster recovery with SharePoint databases
How to 'do' SQL Server disaster recovery
The keys to database backup protection for SQL Server
Choosing a SQL Server disaster recovery solution
Licensing a standby server for SQL Server replication
Can I encrypt and restore a database backup in SQL Server 2005?
SQL Server errors, failures and other problems fixed from the trenches
Get SQL Server log shipping functionality without Enterprise Edition
SQL Server 2008 backup compression pros and cons
SQL Server Backup and Recovery Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
rollback  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


Based on the information you provided I am guessing that the restore is being done using Query Analyzer. If this is the case I would suggest running the following command to see if you can get a directory listing of the files on the mapped drive.

xp_cmdshell "dir {drive:\path}"  
i.e.  xp_cmdshell "dir e:\productionbackup\"

If you do not get the expected list of files back then the account you are using does not have access to the mapped drive.

To map the drive within query analyzer use the following command:
xp_cmdshell "net use {driveletter:} {servername\share}  
i.e. xp_cmdshell "net use e: \\ProdServer\e$"

Rerun the following command to make sure you get the file list.
xp_cmdshell "dir {drive:\path}"  
i.e.  xp_cmdshell "dir e:\productionbackup\"

If the directory list is complete, then issue the restore command using the mapped drive letter you created:
i.e. RESTORE DATABASE DrDB 
   FROM DISK = 'e:\productionbackup\ProdDB.bak'
   WITH MOVE 'ProdDB' TO 'c:\ DrDB.mdf',
   MOVE 'ProdDB_log' TO 'c:\DrDB.ldf'




Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SQL Solutions - SQL Database Design
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts