Submitting forms on the support site are temporary unavailable for schedule maintenance. If you need immediate assistance please contact technical support. We apologize for the inconvenience.
How to stop (disable) the database log from being truncated - procedure of database cleanup?
설명
How to stop (disable) the database log from being truncated - procedure of database cleanup?
해결 방안
Follow the steps below to disable the transaction truncate: 1. Open the Enterprise Manager of the SQL server. 2. Go to (point to) you Intrust database 3. Point to "Stored Procedure" 4. Select stored procedure "sp_EventAdminDeleteEventsOlderThan" 5. Right click "sp_EventAdminDeleteEventsOlderThan" and select properties". 6. For the Intrust 7.1 SP2 at the end of the procedure you will find " BACKUP LOG @strDatabase WITH TRUNCATE_ONLY" 7. It is necessary to insert a comment sign (--)at the beginning of this line and should be like this "-- BACKUP LOG @strDatabase WITH TRUNCATE_ONLY" 8. Save the procedure and exit. By default this sign comment is not presented and by adding the sign comment this will disable the Transaction truncate.
DECLARE @strDatabase SYSNAME SET @strDatabase = DB_NAME()
-- BACKUP LOG @strDatabase WITH TRUNCATE_ONLY
/* <-- Add a double dash ("--") at the beginning of this line to uncomment the code below. -- If uncommented, the code below perfroms shrinking of the transaction log -- for your events database after it is truncated. You may need this operation -- enabled if your transaction log keeps growing extremely large with every -- InTrust collection/import and you really need to free up the space on the -- hard disk on a regular basis. -- Please note that enabling this operation may make your cleanup procedure take -- considerably longer to complete. DECLARE #curFiles CURSOR FOR SELECT [name] FROM [sysfiles] WHERE [status] & 64 <> 0 OPEN #curFiles DECLARE @strFilename SYSNAME FETCH NEXT FROM #curFiles INTO @strFilename WHILE @@FETCH_STATUS = 0 BEGIN SET @strFilename = RTRIM(@strFilename) DBCC SHRINKFILE(@strFilename) FETCH NEXT FROM #curFiles INTO @strFilename END CLOSE #curFiles DEALLOCATE #curFiles --*/ END