miwaypro Posted October 5, 2005 Posted October 5, 2005 can someone tell me how to copy the database of SQL Server from 1 pc to another? and how to restore it? Quote programing programer program
kejpa Posted October 5, 2005 Posted October 5, 2005 I guess the easiest way is to use backup/restore feature of SQL server. Management Console window should help you, if not SQL server Books online is your friend. HTH /Kejpa Quote
miwaypro Posted October 5, 2005 Author Posted October 5, 2005 I guess the easiest way is to use backup/restore feature of SQL server. Management Console window should help you, if not SQL server Books online is your friend. HTH /Kejpa The books that i found are all teach on SQL Statements Quote programing programer program
mike55 Posted October 5, 2005 Posted October 5, 2005 Stop your SQL SERVER using the Service Manager, Go to the Microsoft SQL Server folder in program files. Open the MSSQL folder and then the Data folder. Copy your two files, - _Log, _Data - and move to a new machine. Copy the two files into the exact folders in the new machine, verify that they are not readonly ( go into file properties). Open SQL Server and navigate down to the Databases folder. Right click and select All tasks, Attach Database. Use the button supplied to navigate to the two files you copied over and hey presto your database is now on the new machine. Mike55 Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
miwaypro Posted October 5, 2005 Author Posted October 5, 2005 Stop your SQL SERVER using the Service Manager, Go to the Microsoft SQL Server folder in program files. Open the MSSQL folder and then the Data folder. Copy your two files, - _Log, _Data - and move to a new machine. Copy the two files into the exact folders in the new machine, verify that they are not readonly ( go into file properties). Open SQL Server and navigate down to the Databases folder. Right click and select All tasks, Attach Database. Use the button supplied to navigate to the two files you copied over and hey presto your database is now on the new machine. Mike55 Thks a lot Quote programing programer program
kejpa Posted October 6, 2005 Posted October 6, 2005 SQL server Books online isn't really a book it's all the help you ever needed for handling SQL server in help files probably already installed on your computer. Look for it in the same place under the Start|Programs|SQL Server(?) as you use to start Query Analyzer. /Kejpa Quote
miwaypro Posted October 14, 2005 Author Posted October 14, 2005 Stop your SQL SERVER using the Service Manager, Go to the Microsoft SQL Server folder in program files. Open the MSSQL folder and then the Data folder. Copy your two files, - _Log, _Data - and move to a new machine. Copy the two files into the exact folders in the new machine, verify that they are not readonly ( go into file properties). Open SQL Server and navigate down to the Databases folder. Right click and select All tasks, Attach Database. Use the button supplied to navigate to the two files you copied over and hey presto your database is now on the new machine. Mike55 Is that possible for the database file to store in different folder, instead of the "data" folder? Quote programing programer program
mike55 Posted October 14, 2005 Posted October 14, 2005 Is that possible for the database file to store in different folder' date=' instead of the "data" folder?[/quote'] Should be no problem, just simple browse to the new location from SQL SERVER. If you are messing with the database, just make sure that you keep a back-up with you. Mike55. Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
miwaypro Posted October 15, 2005 Author Posted October 15, 2005 Stop your SQL SERVER using the Service Manager, Go to the Microsoft SQL Server folder in program files. Open the MSSQL folder and then the Data folder. Copy your two files, - _Log, _Data - and move to a new machine. Copy the two files into the exact folders in the new machine, verify that they are not readonly ( go into file properties). Open SQL Server and navigate down to the Databases folder. Right click and select All tasks, Attach Database. Use the button supplied to navigate to the two files you copied over and hey presto your database is now on the new machine. Mike55 In ur post above u ask to select the "Attach Database". but can i use the "restore database? what are the difference? Quote programing programer program
Administrators PlausiblyDamp Posted October 15, 2005 Administrators Posted October 15, 2005 You would use the restore option if you had previously backed up the database, if you have just copied the files the the attach option is the one to use. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
miwaypro Posted October 19, 2005 Author Posted October 19, 2005 You would use the restore option if you had previously backed up the database' date=' if you have just copied the files the the attach option is the one to use.[/quote'] Thks a lot Quote programing programer program
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.