question

angtez avatar image
angtez asked

Copy Database in Developer Edition

Hi All,

I installed SQL Server 2005 Developer Edition on my local drive. The database I want to use exists on our Network Drive. I want a copy of the existing database on my local drive. Is it safe to assume that if I want the database on my local drive, I need to either a) COPY the database from the network drive to my local drive, or b) create the database on my local drive?

Are there any other options?

sql-server-2005
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Piotr Rodak avatar image
Piotr Rodak answered

Yes, you have to copy the database files to your local drive and then attach the dataabase. Rightclick on Databases node in object explorer and select Attach.. and follow instructions. If the database is backed up, you have to restore it after copying to the local drive.

10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Squirrel 1 avatar image
Squirrel 1 answered

if the source database is a LIVE database, it is better you use BACKUP Database command to create a backup copy and then copy over to your local drive and restore it

10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

dhaya avatar image
dhaya answered

Do u want backup database use the below query,

backup database databasename to disk='pathname' eg: BACKUP DATABASE dhaya TO DISK = 'E:\Dhaya\Backupdhaya.BAK' DO u want restore database use following query, Restore database databasename from disk='pathname' eg: RESTORE DATABASE dhaya FROM DISK = 'E:\Dhaya\Backupdhaya.BAK'

10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.