SQL Server Performance Forum – Threads Archive
DBCC SHRINKFILE and Logfile ShippingHello, I’ve implemented SQL Server Logfile Shipping accordingly to the following article. http://www.sql-server-performance.com/sql_server_log_shipping.asp It works for me with minor hazzles/problems. Because one datafile has a very big size in my source database I want to shrink this datafile with the follwong T-SQL command: DBCC SHRINKFILE (DataFile, 100, TRUNCATEONLY) Does someone know whether this would break my Logfile Shipping process or could I execute
this T-SQL command without any problems on my source database and my Logfile Shipping will still continue to work? Thanks in advance for any help
No it will break the log shipping process and the SHRINKFILE operation is a online operation. BOL states
The database being shrunk does not have to be in single-user mode; other users can be working in the database when the file is shrunk. You do not have to run SQL Server in single-user mode to shrink the system databases. Satya SKJ
This posting is provided â€œAS ISâ€ with no rights for the sake of knowledge sharing.