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 |
simo
Starting Member
1 Post |
Posted - 2009-09-02 : 08:30:58
|
Hi,I'am new user at this Forum. My Problem is as follow:I have a SQL Server 2000 installed on Win Server 2000 with a large database.Now, i will install SQL Server 2000 on my Notebook an I'd like to copy die database into the newly installed SQL Server, but i don't know how to perform such task.Please i require help.thanks. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-09-02 : 08:40:05
|
you just need to backup the db from server and restore it in your notebook. |
 |
|
scuzymoto
Starting Member
17 Posts |
Posted - 2009-09-02 : 14:07:06
|
Taking a full backup from the server as mentioned in the previous post is safe and easy and allows people to continue using the original database while your doing it. Right click on the database and the option should be in the menu that follows. There is a ton of documentation on the web that would take you through each individual step such as selecting a backup device (i.e. disk location) to place the backup etc.Another way just for the info, is to "detach" the database and then use the file system to copy the underlying files over. The trick here is that no other users will be able to use the original database while you are doing this. In essence, 'detach' will remove it from the original server until you put it back after you get a copy.If this doesn't make you nervous than... in the same right click menu you should see a "detach" option as one of your available tasks. Once the database is detached you can copy the related MDF and LDF files from the original database to your notebook and then "attach" them to installation on your notebook. (Right click on the database folder and select 'attach').Once you have a copy of the MDF and LDF files you can then re-attach the files on your original server to get them back online. Neither the file system or SQL will allow you to copy these files while they are online (they would be corrupt anyway).This method works but if you have active users or this is business critical operation that can't stand the outage (the attach process is nearly instantaneous, the time involved is just getting the files copied), it's not a good option. Use the server backup option. There are other methods as well such as scripting all the tables and copying the data over with sql statements or the import/export tools but that is much more complex. |
 |
|
ScottWhigham
Starting Member
49 Posts |
Posted - 2009-09-03 : 07:14:52
|
I would not advise the attach/detach option for this specific situation. We're talking about someone who has so little knowledge of SQL Server that they are asking a very basic admin-level question. A backup is clearly the best choice here since it offers no chance of application downtime or other issues. OP: stick with doing a backup.-- Step 1: Backup the dbBACKUP DATABASE MyDb TO DISK='F:\Whatever.bak'-- Step 2: Copy the files to your machine-- Step 3: RestoreRESTORE DATABASE MyDbCopy FROM DISK = ...You'll need to read up on the RESTORE DATABASE or on how to restore databases using SSMS.One word of caution: performing a "full" backup on a large database will consume many resources on the server.========================================================I have about 1,000 video tutorials on SQL Server 2008, 2005, and 2000 over at http://www.learnitfirst.com/Database-Professionals.aspx |
 |
|
|
|
|