SQL Server Performance

DBCC SHRINKFILE and Logfile Shipping

Discussion in 'SQL Server Log Shipping' started by jkrumb, Nov 19, 2004.

  1. jkrumb New Member

    Hello,

    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
    Joachim
  2. satya Moderator

    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
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.

Share This Page