Thursday, 19 June 2008

Transaction Log filling up problem

The most common reason for a transaction log in simple mode to fill up is because a transaction is still open. If you run DBCC OPENTRAN you will find out if this is the case.

If you want to set a trace to run at a specfic time, then you will have to do the following.

First, create your trace in Profiler as you would normally do. Then from the "Files" menu, select "Script Trace," then select the version of SQL Server you want to trace. This command will create a text file that includes all of the necessary commands to run the trace you desire.

Second, create a new Transact-SQL job step and then cut-and-paste the contents of this above text file into the Command box of the job's step. Now schedule the job to run. The Profiler trace will run until you manually stop it. If you want the script to stop automatically, you will have to manually modify the script to stop at a specified time

No comments: