Locating the Database Files (Windows SharePoint Services 2.0)

Each database, including the configuration database, is identified by two files: the database file, which has a .mdf filename extension, and the transaction log file, which has a .ldf extension. Before moving each database, you must get the paths to these two files for that database. If you have a default Windows SharePoint Services installation, the database files are in the \Program FilesMicrosoft SQL Server\MSSQL$SHAREPOINT\Data directory. You will find the following files in that directory:

  • STS_Config.mdf

  • STS_Config_log.LDF

  • STS_Computer_Name_1.mdf

  • STS_Computer_Name_1_log.LDF

If your database files are not in the default location, use the following procedure to get the full database filenames.

Note

This procedure uses the OSQL command line utility, which lets you run SQL statements, system procedures, and script files.

Locate database files

  1. Open the SharePoint Central Administration Pages. On the Start menu, point to All Programs, click Administrative Tools, and then click SharePoint Central Administration.

  2. To find the name of your configuration database, in the Server Configuration section, click Set configuration database server.

  3. On the Set Configuration Database Server page, in the SQL Server databasename field, note the database name.

  4. To find the names of your content databases, go back to the home page of the SharePoint Central Administration pages. In the Virtual Server Configuration section, click Configure virtual server settings.

    For each virtual server that is listed in the Virtual Server List page, do the following:

    1. Click the virtual server name.

    2. On the Virtual Server Settings page, in the Virtual Server Management section, click Manage content databases.

      Note the database names that are listed.

    3. If there are more virtual servers, go back to the Virtual Server List page and repeat steps 1 and 2.

  5. Start the OSQL utility. At a Windows command prompt, type the following:

    osql –E –S %computername%\SharePoint
    
  6. To get the filenames for your configuration database, type the following three steps at the OSQL prompt, pressing ENTER after each line:

    USE Configuration_Database_Name
    SELECT filename FROM sysfiles 
    GO
    

    The prompt will increment in value as you enter each command. Write down the two paths that are displayed.

  7. For each content database, type the following three steps at the OSQL prompt, pressing ENTER after each line:

    USE Content_Database_Name  
    SELECT filename FROM sysfiles 
    GO
    

    The prompt will increment in value as you enter each command. Write down the two paths that are displayed for each content database.

  8. Exit the OSQL utility by pressing CTRL+C.

See Also

Concepts

Moving the Databases (Windows SharePoint Services 2.0)