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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detach / Attach question

Status
Not open for further replies.

djj55

Programmer
Feb 6, 2006
1,761
US
Do you need to move the log file when you move the mdf file from one computer to another? SQL 2000

Thanks
djj
 
No.

But you won't be able to use sp_attach. Instead, you'll need to use [!]sp_attach_single_file_db[/!]

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Is there a similar command (haven't found it yet...) for restoring the DB also?
I have tried just specifying the mdf, but (in this example) it creates a 10Gb ldf file - the same size as the one the backup was taken from. It does appear to be a "white space" log file though.
Is there anyway to restore a DB, pulling out just the mdf, whilst creating a blank, say, 256MB ldf file?
Pretty sure the answers no, but unless you ask these questions...
 
Nope. The LDF is restored to the same size it was when the backup was taken.

Denny
MVP
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2008 Implementation and Maintenance / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Admin (SQL 2005/2008) / Database Dev (SQL 2005)

My Blog
 
Ratz, and similar expressions of frustration!!
As I said, didn't think so
Thanks for answering anyway
 
No problem.

Denny
MVP
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2008 Implementation and Maintenance / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Admin (SQL 2005/2008) / Database Dev (SQL 2005)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top