cancel
Showing results for 
Search instead for 
Did you mean: 

About the MDF and log_LDF file in the SQL server

former_member254404
Participant
0 Kudos

Hai Experts ,

I need known the , What is MDF and log_ldf file .

In our BPC server there are MDF and Log_LDF file in the MSSQLSERVER folder under the E drive.

The both file have huge database size .

Can u explain what is MDF and Log_LDF file , why its created ....

Regards

Daya......................

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Daya

Those files are the actual SQL database files, in SQL Server management console, you have a logical view of the database with all of the objects within the database. The *.MDF and *.LDF files are the actual physical files which makes up the database in SQL Server. (Where the actual data is stored...)

The MDF file is the actual data file

The LDF file is the transaction log file, SQL Server uses this file in order maintain ACID compliance. It uses transactions to ensure that the database will always revert to a known consistent state on failure.

More Info:

[http://en.wikipedia.org/wiki/Microsoft_SQL_Server]

You don't provide much information regarding the environment, i.e (DEV, QA, PROD, etc), but your *.LDF file should not be bigger that your *.MDF file, and if it is quite large, then you will need your DBA to shrink your Transaction Log file.

[http://databases.about.com/od/sqlserver/a/truncate_shrink.htm]

[http://www.sql-server-performance.com/forum/threads/transaction-log-file-will-not-shrink.15877/]

[http://4rapiddev.com/sql-server/delete-shrink-eliminate-transaction-log-ldf-file/]

Hope this helps

Kind Regards

Daniel

Answers (0)