Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Attention: The Community will be in read-only mode on 12/14/2017 from 12:00 am pacific to 11:30 am.

During this time you will only be able to see content. Other interactions such as posting, replying to questions, or marking content as helpful will be disabled for few hours.

We apologize for the inconvenience while we perform important updates to the Community.

New Member

CPO SQL Log Files

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
Cisco Employee

Matt, Yes, many people (if

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 shaurobe@cisco.com CIAC Adoption Pilot Engineering Lead
73
Views
0
Helpful
1
Replies
CreatePlease to create content