Log file size remains unchanged. Why ?

  • I created a new database 'test' in SQL2008 with a table having 2 columns. As per default settings the size of test.mdf is 51,200KB and test_log.ldf file size is 12,800KB. Later i inserted some data of 1000 rows into the table using a small loop program.

    But upon observing the size of .mdf and .ldf file i did not see any change in the size. Why like this ? I am new to SQL server programming.

  • 1000 rows is a small group of data, it only take little space in the database,so there are still some avaiable in the datafile ,so .mdf and .ldf will not change.

    ---------------------------------------
    Thorn Bird...

  • Run sp_spaceused command on your database it will give you the space used by you data file you will find some unallocated space and unused space.

    you can run sp_spaceused 'tablename' on your table by passing your table name as parameter it will give you a clear picture of the space used by your table.

    Nag
    ------------------------------------------------
    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537

  • It is useful to know a bit about how the transaction log works. See the following Books Online links:

    Transaction Log Architecture

    Managing the Size of the Transaction Log File

    Top 6 Myths about Transaction Logs

    Paul

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply