cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
500
Views
0
Helpful
1
Replies

CPO SQL Log Files

Matthew Horvat
Level 1
Level 1

Hey guys
 

We have started to see an exponential growth in our SQL log files that is in direct correlation with running more processes more consistently.

Has anyone had any issues with running a log truncating script to both the TEO_processlog and TEO_reportinglog files?

something along the lines of 

ALTER DATABASE ExampleDB SET RECOVERY SIMPLE
DBCC SHRINKFILE('ExampleDB_log', 0, TRUNCATEONLY)

 

Thanks 

 

Matt

1 Reply 1

Shaun Roberts
Cisco Employee
Cisco Employee

Matt,

 Yes, many people (if they do not need the t-logs) will reduce them. In 3.0 (during install) you can actually set it to SIMPLE mode instead of the more full recovery mode. I do that on most all of my boxes. Prior to CPO 3.0 you would have to do it like you show above.

 

On most of my pre 3.0 boxes I would do something like

 

USE <TEOProcess_DB_Name>;GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE <TEOProces_DB_Name> SET RECOVERY SIMPLE;GO
-- Shrink the truncated log file to 1000MB.
DBCC SHRINKFILE ("<TEOProcess_log_file_name>", 1000); GO

 

Of course this is on SQL only. You can find more information on DBCC Shrinkfile at Microsoft's help site.

 

If you need to reset the database to full mode it's:

 

-- Reset the database recovery model.

ALTER DATABASE <TEOProcess_DB_Name> SET RECOVERY FULL;GO

 

 

 

 

--Shaun

--Shaun Roberts
Principal Engineer, CX
shaurobe@cisco.com