Professional Documents
Culture Documents
11, 2015
This document outlines how to create a new schema, upgrade an existing schema to
the current
version, downgrade a schema to a particular version, and set-up the SQL Agent job
for an
MSPD2 database.
1. In SQL Server Management Studio, connect to the SQL Server instance that you
wish to create
an MSPD2 database in.
2. Expand the connected server in the Object Explorer.
3. Right click on "Databases" -> New Database...
4. Enter a database name in the popup wizard.
5. Change other parameters as you wish (e.g. the database files' parameters such as
the file paths).
6. Click "OK" to create the database.
7. Execute the script atlas_full_setup.sql on the newly created database. /
8. If you wish to set up the SQL Agent job, please refer to the section "Setting-up
the SQL Agent
job" below.
1. In SQL Server Management Studio, connect to the SQL Server instance that
contains the MSPD2 database.
2. Depending on the current version and the version that you want to upgrade the
MSPD2 database to,
execute a series of upgrade scripts against the database.
3. If you wish to set up the SQL Agent job on your upgraded database, please refer
to the section
"Setting-up the SQL Agent job" below.
Example:
Current version: 1.0
Upgrading to: 1.2
Run the upgrade scripts in the following order:
1) atlas_change_script_1_0_to_1_1.sql
2) atlas_change_script_1_1_to_1_2.sql
1. In SQL Server Management Studio, connect to the SQL Server instance that
contains the MSPD2 database.
2. Depending on the current version and the version that you want to downgrade the
MSPD2 database to,
execute a series of downgrade scripts against the database.
Example:
Current version: 1.3
Upgrading to: 1.1
Run the downgrade scripts in the following order:
1) atlas_change_script_1_3_to_1_2.sql
2) atlas_change_script_1_2_to_1_1.sql
The following outlines how to set-up the SQL Server Agent and the job required to
delete plans.
This only applies to SQL Server Standard and Enterprise editions. SQL Server Agent
does not
run on the Express edition. The SQL Server Agent service must be running to execute
the job.
Notes:
a. The script needs to be updated for the specific environment.
b. The instructions are contained in the script and requires the name of the MSPD2
database as
well as a location where a log file can be stored.
c. This script will have to be executed by an administrator or a user with
privileges to create
SQL Server Agent jobs.
d. By default, the job is scheduled to run every hour at the top of the hour. This
schedule can
be modified using SQL Server Management Studio.
At this point, the job is set up and ready to go. Plan saves should no longer
delete old versions of
the plan but will instead mark them for deletion and leave them for the job to
actually delete.