join the MSSQLTips community

MSSQLTips.com - your daily source for SQL Server tips

Google
 
Web mssqltips.com

 
Move SQL Server database log files to different location through T-SQL Commands and SSMS - MSSQLTips

MSSQLTips

MSSQLTips.com - your daily source for SQL Server tips
Welcome to MSSQLTips Sign in | Join | Help
in Search

Move SQL Server database log files to different location through T-SQL Commands and SSMS

Last post 07-02-2009 6:44 PM by admin. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-17-2009 12:30 AM

    Move SQL Server database log files to different location through T-SQL Commands and SSMS

    This post is related to this tip: Move SQL Server database log files to different location through T-SQL Commands and SSMS

    http://www.mssqltips.com/tip.asp?tip=1774

  • 07-02-2009 12:05 PM In reply to

    Re: Move SQL Server database log files to different location through T-SQL Commands and SSMS

    While it is possible to still move a database (Data files or log Files independently) to a different file system location using detach/attach, there are potential unplanned consequences to doing so.


    If your database uses Service Broker, by using detach/attach, Service Broker is disabled on the database, whereas when using ALTER DATABASE MODIFY FILE, Service Broker remains enabled.

    Another problem that arises when using the detach/attach is having to deal with permission issues. The principals have to be given the corresponding rights over the securables, otherwise the attach will not be smooth.

    BTW: detach/attach will be deprecated in future versions of MS SQL Server

  • 07-02-2009 6:44 PM In reply to

    Re: Move SQL Server database log files to different location through T-SQL Commands and SSMS

    Here is another tip that uses the method pointed out above:

    How to move a SQL Server database within the same instance without losing settings
    http://www.mssqltips.com/tip.asp?tip=1688

Page 1 of 1 (3 items)