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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Copying DB Files

Author  Topic 

jainvivek
Starting Member

6 Posts

Posted - 2005-12-01 : 08:24:45
Hi,
I would like to know where do I copy .mdf and .ldf files, for it to show up on the enterprise manager. I havent created the db using the enterprise manager, but am copying it from another location. So can you tell me what I need to do for this.
thanks

druer
Constraint Violating Yak Guru

314 Posts

Posted - 2005-12-01 : 08:29:01
You can't just copy files and have them "show up" as databases. You will need to lookup the RESTORE command, or you can right click on your server in Enterprise Manager and choose the All Tasks item and then Restore Database. That should get you started in the right direction.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2005-12-01 : 08:32:45
2 option you can do for copying a database from one SQL Server to another
1. Use Backup - Restore
2. take the database offline, copy the mdf & ldf to new location and use attach
Both can be achieve via Enterprise Manager

-----------------
[KH]
Go to Top of Page

jainvivek
Starting Member

6 Posts

Posted - 2005-12-01 : 08:45:09
Thanks for the reply, but I am not sure how this could be done. Would be great if you can explain to me.
Thanks
Go to Top of Page

jainvivek
Starting Member

6 Posts

Posted - 2005-12-01 : 09:01:40
Thanks and was able to add the db. But I am getting this error when running application, "Login failed for user sa".
Can you please tell me a way out for this?
Go to Top of Page

jainvivek
Starting Member

6 Posts

Posted - 2005-12-01 : 09:09:20
Hi again, I am using DSN to connect to the db. I am selecting Windows Authentication and then when I test the connection, it is successful, but if I select SQL Server authentication, the database name doesnt appear in the next window, not sure why.
Go to Top of Page
   

- Advertisement -