I am getting a new PC at work. Currently I am using SQL Server 2008 Express R2 on my desktop and am
getting a new PC at work. Once I get SQL Server installed on the new PC, how do I get the data to the new
PC. Thanks
Backup and restore will be the best way for big files (40GB or more) - but if you go with backup option make sure you make the backup to 4 backup files not just one as it will perform a lot better both on backup and restore.
Thanks for responding. The files are not too large. I am unsure of the file extensions to look for. Once i determine them, I can copy to my home drive for temporary keeping, then copy them to the C: drive on the new laptop...then I would attach. Does that sound correct.
You can see what is the name of the physical files by issuing the following sql statement.
SELECT name, physical_name AS CurrentLocation
FROM sys.master_files
WHERE database_id = DB_ID(N'<database_name>'); replacing database_name by your required databases
If you have defined anything like logins (to share data with other people), or linked servers (to get data from other SQL Servers), you will have to see about getting those scripted out. Fortunately, they are not too hard to get with SQL Server management studio.
I don't want to mess this up. I have copied the .MDF and .log files to my home drive.
I did not see an attach command in the database when I right-clicked so let me go over the steps again....
1. Detach the databases from laptop 1 (there are 5)
2. Navigate to the SQL Server \DATA folder and copy the .MDF and the .LOG files to my H: drive
Do this for each of the 5 databases.......
3. Copy the .MDF and .LOG files to the SQL Server \DATA folder on laptop 2
4. Attach the database
Do this for each of the 5 databases
can you please post the output of the sql I gave you before. making sure you replace the database name with your correct one for each db. this is only so we can confirm which files you need to move.
to attach a db, you right-click on the database note on SSMS and select the "attach" option.. that will popup a window wich you can then go and select the mdf file and let it work from there.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.