FCI-Helwan blog

Just another FCI-H weblog

When database log file increases incredibly?

Working as DBA, I face problems daily and for the importance of the organization I work for; problems should be solved immediately.  past days I had log file which its size exceeds 70 GB unreasonably… I’ve low disk space problem, clients access this database denied from doing any operation since log file can’t allocate more free space on storage area, really all solutions weren’t applied due to some restrictions, one of the solutions is to copy data from this database and transmit it to another database (which you can control  log file growth) this solutions failed because SQL Server needs the new database has a log file its size like the old one aka 70 GB!!!!!

Another is to detach the database and trying attaching it without log file, fails also, since log file not exists.

While searching on this problem I’ve found someone has big size log file asks this question and I found the solution is to create a new database from the .mdf file of the old one and you shouldn’t put the .ldf (log file(s)) besides. because SQL Server searching for the .ldf and if it didn’t it creates another one with small size. and now old log file isn’t belong to new created database and you can delete it and save more space 🙂

Code to create database from .mdf file

sql code


August 19, 2008 - Posted by | Uncategorized


  1. mm, I think i know that database, I think it called UnitsDB :P:P

    mm, R, is “FOR ATTACH_REBUILD_LOG” an important statement ???

    Comment by mhewedy | September 22, 2008 | Reply

  2. ht7kmna y7’rbeet 32lk…. dih btdy youm mn7a 😉

    Comment by Ramy Mahrous | September 22, 2008 | Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: