Newbie: Copy Database | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Newbie: Copy Database


I am a web developer for a small legal form company. I am using SQL 2000 Standard as my database for ASP. Recently we have obtained a W2K3 Server and and are attempting to serve the ap from office instead of an on line host. I am trying to figure out how to get my updated data from my development CPU to the DB on the server CPU. I have tried just "dropping" the .mdf and .ldf files into the DATA folder of the server but that is not working. Being that my DBA skills are a few, is there a way I can get each of the instances to "see" each other across the network. Surely there must be a way. I have tried the Import and Export wizards in Enterprise Manager, but the two DB’s can’t seem to find each other.
1) Can the server DB be created/updated by just copying the new .mdf and .ldf files to the server and if so, how?
2) Or how can I get the two instances of SQL to recognize each other across the network? I’d really don’t want to go back to Access…
Thanks to all, Bill
If I follow you in correct way:
1) You can backup in one server and restore in other. Or you can stop SQL server in one server, copy mdf and ldf to other server, start up SQL server in first server and attach (EM, SQL analyzer) in second server.
2) Do you want to register two instances? If yes, with EM you can do it. Luis Martin
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.
If youve managed to copy the mdf and ldf files across, like Luis says, just attach them (ie, register them with SQL server to let it know they are there). Easiest way would be to right click Databases, in enterprise manager, select All Tasks, then Attach database
SWEEEEEET!! Apparently you can backup the DB on the dev computer and copy the file to to BACKUP folder on the server, and then do a restore DB from the copied file. WOO_HOO! After the dev is finished (never) most all the changes will be reflected directly on the server by the site users. Interesting lesson in SQL BACKUP and will be using it often once we go live.
Thanks Luis, Chappy Bill
Just to complete the idea.
Before restore update statististics. (see BOL)
Luis Martin
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.
]]>