How to move the database files from one drive or folder to another

Article:HOWTO5163  |  Created: 2006-09-25  |  Updated: 2008-10-20  |  Article URL http://www.symantec.com/docs/HOWTO5163
Article Type
How To



Question
How do I move the database files from one drive or folder to another?

Answer
To move the database files from one drive/folder to another follow the steps (example uses the RS database):

  1. Stop the Altiris Client Recovery Server service.
  2. Set the AeXCRDatabase to single user.

    exec sp_dboption AeXCRDatabase, ‘Single User', True

  3. Get current database file location.

    exec sp_helpdb AeXCRDatabase

    You need the DBFile and LogFile paths.
  4. Detach the database.

    exec sp_detach_db ‘AeXCRDatabase' , ‘true'

  5. Move the database and log files to the new location with Explorer.
  6. Reattach the database with the new locations.

    exec sp_attach_db ‘AeXCRDatabase'
    '<path>\<database file name.mdf>',
    '<path>\<database file name.ndf>',
    '<path>\<database log file name.ldf>'

  7. Restart the Altiris Client Recovery Server service.

Legacy ID



27691


Article URL http://www.symantec.com/docs/HOWTO5163


Terms of use for this information are found in Legal Notices