GoledenGate: We Can't Shrink Log Files At SQL Server If Database Is In Recovery Mode
Last updated on AUGUST 27, 2017
Applies to:Oracle GoldenGate - Version 220.127.116.11.1 to 18.104.22.168.0 [Release 11.2 to 12.2]
Information in this document applies to any platform.
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
ALTER DATABASE [CSNLACSQL09_Custom] MODIFY FILE ( NAME = N'CSNLACSQL09_Custom_log1', SIZE=43221281KB)
DBCC SHRINKFILE (N'CSNLACSQL09_Custom_log1' , 10, TRUNCATEONLY)
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)
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