Getting Started with Adobe After Effects - Part 6: Motion Blur
Ask
Ask questions, discuss or help others by answering
Related Posts · View All
SQL Server 145
TSQL 76
SSRS 70
SSIS 67
XML 57

Top Categories · View All
SQL Server 145
TSQL 76
SSRS 70
SSIS 67
XML 57

how to attach database in sql server 2005 or sql server 2008 without log file.

May 6 2011 12:00AM by Dhananjay Kumar   

how to attach database in sql server 2005 or sql server 2008 without log file. as attaching database in sql server 2000 works without log file..

Submitted under: Microsoft SQL Server ·  ·  ·  · 


Dhananjay Kumar
1079 · 0% · 24

2 Replies

  • Hello!

    I trust the following helps. I did a quick check on my test instance, and it seems to work fine. First, Let's create a test database:

    USE [master]
    GO
    
    /****** Object:  Database [TestDB]    Script Date: 05/06/2011 16:45:13 ******/
    CREATE DATABASE [TestDB] ON  PRIMARY 
    ( NAME = N'TestDB', FILENAME = N'E:\SQL Databases\SQLDefault\TestDB.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
     LOG ON 
    ( NAME = N'TestDB_log', FILENAME = N'E:\SQL Databases\SQLDefault\TestDB_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
    GO
    

    I detach the database and then go ahead and delete the log file from the particular location. I can then use the CREATE DATABASE statement with the FOR ATTACHREBUILDLOG parameter to regenerate the log file. Please note that doing so will break your log chain.

    USE [master]
    GO
    
    /****** Object:  Database [TestDB]    Script Date: 05/06/2011 16:45:13 ******/
    CREATE DATABASE [TestDB] ON  PRIMARY 
    ( NAME = N'TestDB', FILENAME = N'E:\SQL Databases\SQLDefault\TestDB.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
    FOR ATTACH_REBUILD_LOG
    GO
    

    Do let me know if it helped you in your scenario or not.

    commented on May 6 2011 6:21AM
    Nakul Vachhrajani
    4 · 36% · 11645
  • Dhananjay, did the above recommendation of using CREATE DATABASE with ATTACHREBUILDLOG help?

    commented on May 21 2011 8:37AM
    Nakul Vachhrajani
    4 · 36% · 11645

Your Reply


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]