Use the following procedure to add a log threshold with a free_space value set at 45 percent of log size.
Determine the log size in pages:
select sum(size) from master..sysusages where dbid = db_id("database_name") and (segmap & 4) = 4
Use sp_addthreshold to add a new threshold with a free_space value set at 45 percent. For example, if the log’s capacity is 2048 pages, add a threshold with a free_space value of 922 pages:
sp_addthreshold mydb, logsegment, 922, thresh_proc
Create a simple threshold procedure that dumps the transaction log to the appropriate devices. For more information about creating threshold procedures, see “Creating threshold procedures”.