|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Easiest way to move database from 1 machine to another ?I am not a DBA, so pardon me if my question is basic.
What is the easiest way to move SQL Server 2005 database from 1 machine to another ? If I backup the database, I can not restore it in another database or in another machine, can I ? Is exporting the database the easiest way to move it to another machine (in the new machine before importing the data I will still need to create the database and run the database script to create all the tables and stored procedures and views, right ?) ? Thank you. fniles,
Yes, restoring a backup to another server is a very easy way to move a database from 1 machine to another. If you no longer want the database on machine 1, detach the database, move the files (mdf & ldf( to the new server, then attach them. You will need to deal with any issues raised by logins not existing on both servers, if that turns out to be the case for you. RLF Show quote "fniles" <fni***@pfmail.com> wrote in message news:%230BL$HsMIHA.2000@TK2MSFTNGP05.phx.gbl... >I am not a DBA, so pardon me if my question is basic. > What is the easiest way to move SQL Server 2005 database from 1 machine to > another ? > If I backup the database, I can not restore it in another database or in > another machine, can I ? > Is exporting the database the easiest way to move it to another machine > (in the new machine before importing the data I will still need to create > the database and run the database script to create all the tables and > stored procedures and views, right ?) ? > > Thank you. > > Backups are easy, however, if you are using differently physically
configured machines that make the backup incompatible, you may want to look at Microsoft SQL Server Management Studio and first scripting the database and table definitions (in 2005, right click the database name or table name and select Script As->Create To File) to generate SQL scripts that recreate the database and table structures (less the data) and then running the SQL Scripts in SQL Server Management Studio on the target machine. After doing this, you can move the data over by creating import/export packages in SQL Server Management Studio by right clicking the database the table is in and selecting tasks Export Data on the source machine, and tasks Import Data on the target machine. Select Microsoft Excel file format as the way to transport the data between the machines if they cannot be connected to each other via a network cable. |
|||||||||||||||||||||||