Database: String;
The Database property determines an identifier of the database on the MS SQL server, in which repository data is stored.
If the Microsoft SQL Server DBMS type is used on the server, and the custom schema is used in the database, value of the Database property looks as follows: <database>.<schema in database>.
To execute the example, add the Metabase system assembly to the module.
Sub UserProc;
Var
MbMan: IMetabaseManager;
MbDefs: IMetabaseDefinitions;
MbDef: IMetabaseDefinition;
MsSqlSPLD: IPrimaryMsSqlSPLD;
Begin
MbMan := MetabaseManagerFactory.Active;
MbDefs := MbMan.Definitions;
MbDef := MbDefs.Add;
MbDef.DriverId := "MSSQL2012";
MbDef.Id := "Test_MSSQL";
MbDef.Name := "Test_MSSQL";
MbDef.Authentication := AuthenticationMode.Password;
MbDef.SecurityPackage := "STANDARDSECURITYPACKAGE";
MsSqlSPLD := MbDef.LogonData As IPrimaryMsSqlSPLD;
MsSqlSPLD.Server := "Test_MS";
MsSqlSPLD.Database := "Test_Schema_MS";
MbDef.Save;
End Sub UserProc;
After executing the example a new description of the repository is created. The schema, to which the connection is established, is located on the Test_MS server, which uses the MS SQL Server DBMS.
See also: