Export and import a PPM database

The best way to create a backup of your SQL server database is to create an SQL server script first, containing the following:

use <database name>;

DBCC SHRINKDATABASE (<schema name>, 10)

EXEC sp_addumpdevice 'disk', '<Alias>', '<Backup file name>';

backup database <Schema name> to <Alias>;

go

Example

You want to save the ppmuser schema of your ppmdb SQL server database to the D:\sqlserver\backup\ppm.dat file on the sqlsvr SQL server. Create the following SQL server script:

use ppmdb;

DBCC SHRINKDATABASE (ppmdb, 10)

EXEC sp_addumpdevice 'disk', 'mydisk', ' D:\sqlserver\backup\ppm.dat ';

backup database ppmdb to mydisk;

go

Save the script, for example under D:\sqlserver\backup_ppm.sql. Execute this script in the osql command line program:

osql -S sqlsvr -U sa -P <password> -i D:\sqlserver\backup_ppm.sql

You can now archive the backup file you created (D:\sqlserver\bachup\ppm.dat) as you prefer, for example by moving it to a directory that is regularly backed up to tape.