I am trying to copy my database file so I can move it to another server. I found a file with .mdf file extention and a file with .ldf. Are these the files I need to copy?
I am trying to copy my database file so I can move it to another server. I found a file with .mdf file extention and a file with .ldf. Are these the files I need to copy?
They are stored in:
C:\Program Files\Microsoft SQL Server\MSSQL\Data
Thanks for any help.
Scott
Remember if you are detaching and attaching from SQL 2000 to SQL 2005 , by some reason you can't attach to SQL 2005 , you can't go back to SQL 2000 and attach.
Or stop the SQL services and COPY the .mdf, .ndf and .ldf files, leaving the originals intact on the source server, and then sp_attach_db on the new server. I don't necessarily agree that a backup/restore is any safer but I do agree with jhocutt about backing up the databases - PRIOR to doing anything.
The reason why backup/restore is safer is because you haven't modified the source database. When you use the detach/attach method, you are modifying the source database. What happens if you can't attach it back? With backup/restore, you don't have that risk.