How to Move the MIIS Database and Log Files to Different Drives (818565)



The information in this article applies to:

  • Microsoft Identity Integration Server 2003 Enterprise Edition
  • Microsoft Identity Integration Feature Pack for Microsoft Windows Server Active Directory

SUMMARY

Microsoft Identity Integration Server (MIIS) and the Identity Integration Feature Pack (IIFP) use Microsoft SQL Server 2000 as its data store. During product Setup, the MicrosoftIdentityIntegrationServer database is created on a selected SQL server. During MIIS or IIFP Setup, you can create the database and log files in the same location, depending on the SQL server configuration. However, for optimal performance, Microsoft recommends that you locate MicrosoftIdentityIntegrationServer database files and log files on separate drive spindles. This article describes how to move a database and log file after MIIS Setup has completed and how to use the detach/attach functionality in SQL Server to move database and log files to new locations.

MORE INFORMATION

This section describes how to use the following SQL Server tools to detach or attach databases:
  • SQL Enterprise Manager
  • Query Analyzer
Note Before you detach the MIIS database, you must stop the MIIS service. To do so, type the following command at a command prompt:

net stop miiserver

How to Use SQL Enterprise Manager to Move Files to a New Location

To use SQL Enterprise Manager to move the MIIS database file (or a log file) to a new location, follow these steps:
  1. Start SQL Server, and then click Enterprise Manager.
  2. Double-click Microsoft SQL Servers, double-click SQL Server Group, double-click Server_Name (where Server_Name is the computer where SQL Server is running), and then double-click Databases.
  3. Right-click the MicrosoftIdentityIntegrationServer database, and then click Properties.
  4. On the General tab, note the database owner.
  5. On the Data files tab and on the Log files tab, note the current file locations, and then click Cancel.
  6. Right-click the MicrosoftIdentityIntegrationServer database, click All Tasks, and then click Detach database.
  7. Move the MicrosoftIdentityIntegrationServer.mdf file from the existing location (C:\Program Files\Microsoft Identity Integration Server\Data\MicrosoftIdentityIntegrationServer.mdf) to a new location (D:\MiisData).
  8. After the file has been successfully moved to the new location, reattach the database. To do this, right-click the Databases folder, click All Tasks, and then click Attach database.
  9. In the MDF file of database to attach box, click the ellipses (...) button to locate the .mdf file.

    After the database file is located, SQL Enterprise Manager locates the log file. If you moved the log file location, you see a red X instead of a green check mark in the Current File(s) Location box.

    To edit the location of the existing log file, type the new drive location in the Current File(s) Location box.
  10. Type the appropriate database owner from the information that you noted in step 4.
  11. Click OK to attach the database.

How to Use Query Analyzer to Move Files to a New Location

To use SQL Query Analyzer to the move the MIIS log file (the database file) to a new location, follow these steps:
  1. Click Start, point to Programs, click Microsoft SQL Server, and then click Query Analyzer.
  2. In the Query pane, run the following code:
         use master
    		   go
    		   sp_detach_db 'MicrosoftIdentityIntegrationServer'
    		   go
  3. Move the log file from the existing location (C:\Program Files\Microsoft Identity Integration Server\Data\MicrosoftIdentityIntegrationServer_log.ldf) to a new location (E:\MiisLog).
  4. To reattach the database, point to the files in the new location. To do so, run the following code:
        use master
    		  go
    		  sp_attach_db 'MicrosoftIdentityIntegrationServer','c:\Program Files\Microsoft Identity Integration Server\data\MicrosoftIdentityIntegrationServer.mdf','E:\MIISlog\MicrosoftIdentityIntegrationServer_log.LDF'
    		  go
  5. Verify the change in file locations by using the sp_helpfile code:
         use MicrosoftIdentityIntegrationServer
    		   go
    		   sp_helpfile
    		   go
    The new locations appear in the Filename column.
After the MicrosoftIdentityIntegrationServer database has been attached, you can restart the MIIS server. However, you cannot start the Identity Manager administrative tool until you start the MIIS server. To start the MIIS server, type the following command at a command prompt:

net start miiserver


Modification Type:MajorLast Reviewed:8/8/2003
Keywords:kbhowto KB818565 kbAudITPRO