How to move a database file or a transaction log file to a new location in Microsoft Dynamics GP

Article ID: 873956 - View products that this article applies to.
Expand all | Collapse all

INTRODUCTION

This article discusses how to move a database file or a transaction log file to a new location in Microsoft Dynamics GP or in Microsoft Business Solutions - Great Plains.

More information

To do this, follow these steps.

Note This example assumes that you want to move the files from a RAID 5 array (E drive) to a RAID 1 array (F drive).
  1. Use one of the following procedures, depending on whether you are using SQL Query Analyzer or SQL Server Desktop Engine (also known as MSDE 2000).

    Note If you are using MSDE 2000 or SQL Server 2005 Express, run all scripts in Microsoft SQL Server Management Studio Express. To download this management tool, visit the following Microsoft Web site:
    http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&DisplayLang=en
    • If you use Microsoft SQL Server 2005, start SQL Server Management Studio.

      To do this, click Start, point to Programs, point to Microsoft SQL Server 2005, and then click SQL Server Management Studio.
    • If you use Microsoft SQL Server 2000, start SQL Query Analyzer.

      To do this, click Start, point to Programs, point to Microsoft SQL Server, and then click Query Analyzer.
    • If you use MSDE 2000, start Support Administrator Console.

      To do this, click Start, point to Programs, point to Microsoft Administrator Console, and then click Support Administrator Console.
  2. Run the following script against the master database. Make sure that you enter the correct database name. This example uses the DYNAMICS database.
    sp_detach_db ‘DYNAMICS’
  3. In Windows Explorer, move the transaction log (.ldf) file for the DYNAMICS database from the E drive to the F drive.
  4. Run the following script against the master database. Make sure that you include the path of the new file location and the correct database name.
    EXEC sp_attach_db @dbname = N'DYNAMICS', 
    
    @filename1 = N'E:\Program Files\Microsoft SQL Server\MSSQL\Data\GPSDYNAMICSDAT.mdf', 
    
    @filename2 = N'F:\Program Files\Microsoft SQL Server\MSSQL\Data\GPSDYNAMICSLOG.ldf'
    Note This example uses the DYNAMICS database. The database file stays on the E drive. However, the transaction log file is moved to the F drive.

Properties

Article ID: 873956 - Last Review: July 14, 2012 - Revision: 4.0
Applies to
  • Microsoft Dynamics GP 10.0
  • Microsoft Dynamics GP 9.0
  • Microsoft Business Solutions–Great Plains 8.0
  • Microsoft Business Solutions–Great Plains 7.5
  • System Manager
Keywords: 
kbinfo kbexpertisebeginner kbhowto kbexpertiseinter kbmbsmigrate KB873956

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com