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 |
|
victord
Yak Posting Veteran
64 Posts |
Posted - 2003-01-03 : 13:19:52
|
| Dear folks,Happy new year.My problem is trying to restore a database from a production server unto a developer server. They both have different names but are actually the same.So i am just restoring to make both in sync as in the same.I want to leavee them with their different names as well.Below is a copy of the script i used in query analyser, but both are coming up with timeout errors. Please help.restore database agresso from disk = 'f:\mssql7\data\backups\agrtest' with move 'agr531dic_data' to 'f:\mssql7\data\agresso_data.mdf',move 'agr531dic_log' to 'e:\mssql7\data\agresso_log.ldf'or restore database agresso from disk = 'f:\mssql7\data\backups\agrtest' with move '\\swift\e$\mssql7\data\agr531dic_data.mdf' to 'f:\mssql7\data\agresso_data.mdf',move '\\swift\d$\mssql7\data\agr531dic_log.ldf' to 'e:\mssql7\data\agresso_log.ldf' |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-01-03 : 13:23:41
|
| Is this f:\mssql7\data\backups\agrtest the backup file or a directory? Without the extension, I am unable to tell. If it is the file, then your command should work. If it isn't, you will need to specify the file name.Does this database already exist on the development server? If it does, then you will need to add with replace to your command. Also, if users are connected to this database, then you will need to disconnect them (using the KILL command) prior to doing the restore. If the database doesn't exist, then you might want to create the database first so that the restore command doesn't have to build the files. |
 |
|
|
victord
Yak Posting Veteran
64 Posts |
Posted - 2003-01-06 : 04:55:21
|
quote: Is this f:\mssql7\data\backups\agrtest the backup file or a directory? Without the extension, I am unable to tell. If it is the file, then your command should work. If it isn't, you will need to specify the file name.Does this database already exist on the development server? If it does, then you will need to add with replace to your command. Also, if users are connected to this database, then you will need to disconnect them (using the KILL command) prior to doing the restore. If the database doesn't exist, then you might want to create the database first so that the restore command doesn't have to build the files.
Yes it is the backup up file , residing on the development server.The database also exist on the development server. I just want to update it , to be exactly the same data as the life server. But then i want to retain it's name. That is why i am not sure if i should use with replace. |
 |
|
|
harshal_in
Aged Yak Warrior
633 Posts |
Posted - 2003-01-06 : 05:07:51
|
| [/quote] But then i want to retain it's name. That is why i am not sure if i should use with replace. [/quote]u can anytime use the sp_renamedb proc to change the name of the database even if u restore with some other name.Expect the UnExpected |
 |
|
|
|
|
|
|
|