[dba-SQLServer] Attach a database without its log file

Mark Breen marklbreen at gmail.com
Tue May 24 05:29:36 CDT 2011


Hello Arthur / John

And it is a great way to truncate the huge log file.  I use this trick all
the time.

just detach the db, then rename or delete the log file and then re-attach
the db, and tell the GUI attach dialog to remove the 'missing' log file.
 Hey presto you have a nice small log file again

Mark


On 23 May 2011 19:55, jwcolby <jwcolby at colbyconsulting.com> wrote:

> yep, it creates a new one.
>
> John W. Colby
> www.ColbyConsulting.com
>
>
> On 5/23/2011 2:25 PM, Arthur Fuller wrote:
>
>> Is it possible to attach a database without its log file? It occurred to
>> me
>> that I could create an empty database, then copy its log file to a new
>> name,
>> then attach the database, but I haven't tried it yet.
>>
>> TIA,
>> Arthur
>> _______________________________________________
>> dba-SQLServer mailing list
>> dba-SQLServer at databaseadvisors.com
>> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
>> http://www.databaseadvisors.com
>>
>>
>>  _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
>
>



More information about the dba-SQLServer mailing list