Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

A place to share commonly used scripts for SQL Server Database Administrators.

Moderators

SQL Server DBA Scripts

Attach a database without the log backup file using CREATE DATABASE - Recover from error msg. 5120

Jul 9 2012 12:00AM by Nakul Vachhrajani   

Ever had a situation where you had to attach a database when all you had were the data files? Perhaps when you downloaded the AdventureWorks sample databases from CodePlex? Here's a script to attach a database with just the data files using CREATE DATABASE....ATTACH_REBUILD_LOG statement

USE [master]
GO

CREATE DATABASE [AdventureWorks] 
ON  PRIMARY ( NAME = N'AdventureWorks_Data', 
              FILENAME = N'E:\SQL Databases\AdventureWorks\AdventureWorks_Data.mdf', 
              SIZE = 3072KB,
              MAXSIZE = UNLIMITED,
              FILEGROWTH = 1024KB )
FOR ATTACH_REBUILD_LOG
GO

Refer my post: http://beyondrelational.com/modules/2/blogs/77/posts/15581/0176-sql-server-creating-a-database-without-the-log-backup-file-error-msg-5120.aspx for more details.


Nakul Vachhrajani
4 · 33% · 10585
4
 
1
 
0
Failed
 
0
Lifesaver
 
0
Production
 
0
Unwise



Submit

Your Comment


Sign Up or Login to post a comment.

"Attach a database without the log backup file using CREATE DATABASE - Recover from error msg. 5120" rated 5 out of 5 by 4 readers
Attach a database without the log backup file using CREATE DATABASE - Recover from error msg. 5120 , 5.0 out of 5 based on 4 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]