Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copying .mdf and .ldf from msde

Status
Not open for further replies.

shifar

Programmer
Feb 11, 2004
24
CA
Hi I need to supply .mdf and .ldf file from msde database with my pacakage so that it can be attached to msde in target computer.
my question is how can I create .mdf and .ldf file from my msde database where I have tabe and other stuff.
I tried to copy.physically, from C:\Program Files\Microsoft SQL Server\MSSQL\Data but there is two file with same name as database file.
How can I achive this, is there is any vb or vb.net code this?
thanks
 
Which database? If it's a systemn database then it's not that simple.
For a user datbase just detach then you can replace the files before the attach.

(You did detach the database before the copy didn't you?)

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top