|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Backup and restore database to another server
Hi, I have two SQL 2000 servers. Both servers have a database named
"Production." I need to backup this database on Server1 and then restore it on Server2 with a different database name. In other words, I want to restore this Production database to server2 but I want to make sure it restores with a different database name like Production2. Is this possible? "Starfish" <Starf***@discussions.microsoft.com> wrote in message Hinews:03FB923C-DC13-4A4B-B04B-5AA03711A299@microsoft.com... > Hi, I have two SQL 2000 servers. Both servers have a database named > "Production." I need to backup this database on Server1 and then restore > it > on Server2 with a different database name. In other words, I want to > restore > this Production database to server2 but I want to make sure it restores > with > a different database name like Production2. Is this possible? This is very possible. Copy the backup file from Server 1 onto Server 2 and then restore it either through SQL Server Management Studio itself or use the T-SQL RESTORE command. In SSMS if you display the object explorer, you can right click on the database branch and select the restore database menu item. Enter a new database name in the Restore Database dialog, then choose device and search for your backup file. You may need to change the location of where the data and log files are put in the options tab, but they will have the new database name in them so you may not need to the filenames themselves.If you use the RESTORE command changing the filenames/locations can be obtained with the MOVE option. More about the RESTORE command and usign SSMS to restore a database can be found in Books Online. Martin I'm actually using SQL 2000 so I'm using Enterprise Manager to restore the
database. In any event, I right click the database branch, go to all tasks, click restore database. At the restore database window, in the restore as database field, I type the name of the database that I want it to be restored as. I then choose restore from device. from the devices I click add and I browse to the BAK file. Then I go into the options tab and I setup the Move to physical file name to a destination and filename that is different from the existing databases. However, once I do all that and hit OK, when it tries to restore the database, it says "logical file MIG_Test_Data is not part of database MIG_Test. Use RESTORE FILELISTONLY to list the logical file names. RESTORE DATABSE is terminating abnormally. Show quoteHide quote "John Bell" wrote: > > "Starfish" <Starf***@discussions.microsoft.com> wrote in message > news:03FB923C-DC13-4A4B-B04B-5AA03711A299@microsoft.com... > > Hi, I have two SQL 2000 servers. Both servers have a database named > > "Production." I need to backup this database on Server1 and then restore > > it > > on Server2 with a different database name. In other words, I want to > > restore > > this Production database to server2 but I want to make sure it restores > > with > > a different database name like Production2. Is this possible? > > Hi > > This is very possible. Copy the backup file from Server 1 onto Server 2 and > then restore it either through SQL Server Management Studio itself or use > the T-SQL RESTORE command. In SSMS if you display the object explorer, you > can right click on the database branch and select the restore database menu > item. Enter a new database name in the Restore Database dialog, then choose > device and search for your backup file. You may need to change the location > of where the data and log files are put in the options tab, but they will > have the new database name in them so you may not need to the filenames > themselves.If you use the RESTORE command changing the filenames/locations > can be obtained with the MOVE option. > > More about the RESTORE command and usign SSMS to restore a database can be > found in Books Online. > > Martin > Starfish
In addition to John's reply you can directly backup the database to another server BACKUP DATABASE dbnameTO DISK = N'\\Server\sharedfolder\dbname.BAK' Show quoteHide quote "Starfish" <Starf***@discussions.microsoft.com> wrote in message news:989102A4-9CF2-48A7-BB74-0B43A3DB4266@microsoft.com... > I'm actually using SQL 2000 so I'm using Enterprise Manager to restore the > database. In any event, I right click the database branch, go to all > tasks, > click restore database. At the restore database window, in the restore as > database field, I type the name of the database that I want it to be > restored > as. I then choose restore from device. from the devices I click add and I > browse to the BAK file. Then I go into the options tab and I setup the > Move > to physical file name to a destination and filename that is different from > the existing databases. However, once I do all that and hit OK, when it > tries > to restore the database, it says "logical file MIG_Test_Data is not part > of > database MIG_Test. Use RESTORE FILELISTONLY to list the logical file > names. > RESTORE DATABSE is terminating abnormally. > > "John Bell" wrote: > >> >> "Starfish" <Starf***@discussions.microsoft.com> wrote in message >> news:03FB923C-DC13-4A4B-B04B-5AA03711A299@microsoft.com... >> > Hi, I have two SQL 2000 servers. Both servers have a database named >> > "Production." I need to backup this database on Server1 and then >> > restore >> > it >> > on Server2 with a different database name. In other words, I want to >> > restore >> > this Production database to server2 but I want to make sure it restores >> > with >> > a different database name like Production2. Is this possible? >> >> Hi >> >> This is very possible. Copy the backup file from Server 1 onto Server 2 >> and >> then restore it either through SQL Server Management Studio itself or use >> the T-SQL RESTORE command. In SSMS if you display the object explorer, >> you >> can right click on the database branch and select the restore database >> menu >> item. Enter a new database name in the Restore Database dialog, then >> choose >> device and search for your backup file. You may need to change the >> location >> of where the data and log files are put in the options tab, but they will >> have the new database name in them so you may not need to the filenames >> themselves.If you use the RESTORE command changing the >> filenames/locations >> can be obtained with the MOVE option. >> >> More about the RESTORE command and usign SSMS to restore a database can >> be >> found in Books Online. >> >> Martin >>
Show quote
Hide quote
"Starfish" <Starf***@discussions.microsoft.com> wrote in message Try selecting the overwrite option.news:989102A4-9CF2-48A7-BB74-0B43A3DB4266@microsoft.com... > I'm actually using SQL 2000 so I'm using Enterprise Manager to restore the > database. In any event, I right click the database branch, go to all > tasks, > click restore database. At the restore database window, in the restore as > database field, I type the name of the database that I want it to be > restored > as. I then choose restore from device. from the devices I click add and I > browse to the BAK file. Then I go into the options tab and I setup the > Move > to physical file name to a destination and filename that is different from > the existing databases. However, once I do all that and hit OK, when it > tries > to restore the database, it says "logical file MIG_Test_Data is not part > of > database MIG_Test. Use RESTORE FILELISTONLY to list the logical file > names. > RESTORE DATABSE is terminating abnormally. > John
Other interesting topics
Backup multi database
Big deletion is filling transaction log bak file = 5gb, attempted restore claims its 100Gb SQL Server 2005 Performance using DATEADD to report informaiton from 60 days ago Large table maintenance Query timeout truncate log permission question Trigger returning DBCC input buffer statement being cut-off |
|||||||||||||||||||||||