Welcome to Digitrends Sign in | Join | Help
SQL Server restoring a database with mdf file only

At work, one of the logs was taking up too much space as the transaction mode was set to full and we deleted the log and had difficulty reattaching the database.

 

There is a gem of a command that allows you to do that.

 exec sp_attach_single_file_db @dbname = 'TEST'
@physname="D:\backup\customer files\MICRO Metadata_Data.MDF'

 

Posted: Wednesday, February 06, 2008 12:23 AM by Eric
Filed under:

Comments

No Comments

Anonymous comments are disabled