Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
venkath
Posting Yak Master
202 Posts |
Posted - 2006-06-05 : 14:38:51
|
Hi guysi am new guy to Server administration..I have a database in server1 and want to copy this database to server2using restore command..How can i accomplish this task..Help on this is greatly appreciated..Thanks in advance. |
|
sanjnep
Posting Yak Master
191 Posts |
Posted - 2006-06-05 : 15:16:59
|
restore database dbname from disk = '\\networkpath\db.BAK'with replace,stats =1 Sanjeev Shrestha12/17/1963 |
 |
|
Kristen
Test
22859 Posts |
|
Slammed
Starting Member
3 Posts |
Posted - 2006-06-20 : 23:37:48
|
I posted this in an old thread but I just want to know if anybody can help me figure out why this restore script wont work RESTORE FILELISTONLYFROM DISK = 'D:\temp\vernonstoragecenter_db_200601270401.BAK'RESTORE DATABASE vernonstoragecenterFROM DISK = 'D:\temp\vernonstoragecenter_db_200601270401.BAK'WITH RECOVERY,MOVE 'vernonstoragecenter_data' TO 'D:\MSSQL\Datafiles\data\vernonstoragecenter_data.mdf', MOVE 'vernonstoragecenter_log' TO 'D:\MSSQL\Datafiles\data\vernonstoragecenter_log.ldf'GOThis is the error I am gettingError -2147217900 Cannot open backup device 'D:\temp\vernonstoragecenter_db_200601270401.BAK'. Device error or device off-line. See the SQL Server error log for more details.RESTORE FILELISTONLYFROM DISK = 'D:\temp\vernonstoragecenter_db_200601270401.BAK'RESTORE DATABASE vernonstoragecenterFROM DISK = 'D:\temp\vernonstoragecenter_db_200601270401.BAK'WITH RECOVERY,MOVE 'vernonstoragecenter_data' TO 'D:\MSSQL\Datafiles\data\vernonstoragecenter_data.mdf', MOVE 'vernonstoragecenter_log' TO 'D:\MSSQL\Datafiles\data\vernonstoragecenter_log.ldf'GOAccording to my host I am on the d:/ drive Now I should also mention that this is a bak file given to me and I ftp ed it onto the site into the temp folder so I can do the restoreI KNOW NOTHING ABOUT SQL (not my field but I might have to learn) |
 |
|
DavidD
Yak Posting Veteran
73 Posts |
Posted - 2006-06-21 : 00:36:50
|
it needs to be the d:\ drive of the server - not the pc you are using (unless they are one and the same of course) |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-06-21 : 09:11:55
|
If you have Enterprise Manager on your machine I suggest you try that. It has a "file browser" so you can locate the file locally - which might help you to find the folder that you, externally!!, know as D:\TEMPAlternatively if you have permissions to execute xp_CmdShell you could try:EXEC xp_CmdShell 'DIR C:\vernonstoragecenter_db_200601270401.BAK /S'which will do a directory search of all folders on C: drive - you may need to try other drives too.Kristen |
 |
|
Slammed
Starting Member
3 Posts |
Posted - 2006-06-21 : 17:44:39
|
Thanks for the replys I will give it a try |
 |
|
|
|
|