Microsoft SQL Server is prepared by the database administrator. The preparation includes the following steps:
Creating a database.
Creating a custom schema in the database.
Creating a user.
Granting permissions.
Scripts are executed using one of the available methods, for example, via the SQL Server Management Studio application available on the Microsoft official site.
The created database is required to store Prognoz Platform 9 metadata.
The following script can be used to create a database:
USE MASTER;
GO
CREATE DATABASE DB_NAME;
GO
where:
DB_NAME. Identifier of the created database.
This step can be skipped. The "dbo" schema is used by default. If required, a custom schema can be created in the database.
CREATE SCHEMA [SCHEMA_NAME] AUTHORIZATION [DB_OWNER]
where:
SCHEMA_NAME. Identifier of the custom schema.
This user is necessary to provide access to the previously created database.
The following script can be used to create a user:
EXECUTE SP_ADDLOGIN @loginame = 'USER_NAME', @passwd = 'PASSWORD', @defdb = 'master'
GO
where:
USER_NAME. Name of the new user. It must coincide with DB_NAME.
PASSWORD. User password.
The following script can be used to grant permissions:
USE DB_NAME
GO
EXEC SP_CHANGEDBOWNER USER_NAME
GO
where:
DB_NAME. Identifier of a previously created database.
USER_NAME. Name of a previously created user.
After all the steps are successfully executed, move to creating a repository. If it is supposed to further store Prognoz Platform 9 distribution kits at database server and update them from this location at user workstations, it is recommended to prepare a PPUPDATE service user (MS SQL/Oracle).
See also: