GoledenGate: We Can't Shrink Log Files At SQL Server If Database Is In Recovery Mode (Doc ID 2299744.1)

Last updated on AUGUST 27, 2017

Applies to:

Oracle GoldenGate - Version 11.2.1.0.1 to 12.2.0.1.0 [Release 11.2 to 12.2]
Information in this document applies to any platform.

Symptoms

We have space issue all the time, the log files can't be shrink at SQL Server if database is in recovery mode.

It bothers us every few weeks and we have to change SQL Server database is in NON recovery mode and shrink log files, then, change SQL Server database into recovery mode and rebuild GoldenGate replication between SQL Server database and Oracle database.


Here is a sample of the failed commands:

1 Stop replication between SQL Servers
2 Stop extract processes at SQL Server
3

ALTER DATABASE [CSNLACSQL09_Custom] MODIFY FILE ( NAME = N'CSNLACSQL09_Custom_log1', SIZE=43221281KB)
GO
USE [CSNLACSQL09_Custom]
GO
DBCC SHRINKFILE (N'CSNLACSQL09_Custom_log1' , 10, TRUNCATEONLY)
GO

Msg 5039, Level 16, State 1, Line 1
MODIFY FILE failed. Specified size is less than or equal to current size.
Cannot shrink log file 4 (CSNLACSQL09_Custom_log1) because of minimum log space required.

(1 row(s) affected)

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms