Baddy,
I'll try to tackle your questions.
1) Is there anyway to read the inactive part of transaction file? Is there anyway to read truncated log file? We are reading data from Transaction log file using DBCC log('DB_Name',4)
Both DBCC Log and fn_dblog() only show the "active" tail portion of the Transaction Log. As far as I know there isn't a command to view the "inactive" potion; you'd have to have a 3rd party tool for that. The data isn't really truncated it's marked inactive and another section of the Tlog is presented for use, which explains why the log continues to grow, but you only see a portion of the records.
2) Can you please suggest me how can I stop this truncation?
You can delay the "active" portion from moving to inactive by having an uncommitted transaction in the database. While this isn't recommended in a production environment for your test database it should be fine. To achieve this create a “dummy” table and do an update on a field in it, then open another connection and do the same update. This will create a blocking scenario on this table only, the rest of the tables, transactions, etc. will work just fine. However the TLOG will wait until all transactions are committed and delay moving to a new section. You should be able to verify this with the test that you’ve outlined.
Cheers,
Kraig Kerr