How to backup and restore a SQL 2005 Express Database.


BACKUP

Go to Start, Programs, Microsoft SQL Server 2005, SQL Server Management Studio Express.
Connect to SQL Server.
NOTE: If running P6 standalone, the default Server Name is \primavera. The default login is username: sa; password: Prima123Vera



Once logged in, expand the "Databases" folder to view the available databases. Right click on the database you would like to backup and choose Tasks, Backup.



Accept the defaults for backup.
NOTE: The destination folder for the backup, by default, is C:\Program Files\MSSQL\Primavera\MSSQL.1\MSSQL\Backup. If 2 backup locations are specified for backup, the .BAK file will be split.


RESTORE

Right click on "Databases" and choose "Restore Database".



Specify the new database name in the "To database" box. Select "From device" and browse to the location of the .BAK (backup) file. Check the "Restore" box to select the backup set to be restored.



If moving the database to a different computer verify the path to the data file is correct.

Click on the Options Page and verify the Restore As path matches the path to the current data files folder.



After restoring the database you must resync the privuser and pubuser.
To resync the privuser and pubuser run this query against the newly restored database(login as the SA user):

The Resynch command resyncronizes the database with the login ID's privuser and pubuser. Replace pmdb, using your database name.

use pmdb
EXEC sp_change_users_login 'Update_One', 'pubuser', 'pubuser'
EXEC sp_change_users_login 'Update_One', 'privuser', 'privuser'

For more information or assistance with this topic, contact Nu Solutions »

© 2008-2010 NU SOLUTIONS CONSULTING, All Rights Reserved
1231 Gambell Street, Suite 300, Anchorage, Alaska 99501
1525 NW 57th Street, #505, Seattle, Washington 98107
Telephone: 907.336.0037    info@nu-solutions.com