IRepositoryScriptManager.Operation

Syntax

Operation: RepositoryOperationType;

Description

The Operation property determines the operation that should be performed with repository.

Comments

Operation will be applied for the repository specified in the Repository property after activation of the Execute method.

Example

Executing the example requires the ORCL server named Test. A platform repository was created within the TestSchema schema on the server. The root of disk C contains the current.rm4 and current_rds.rm4 files that include the scripts that are used to create and update repository and MDM repository.

Sub UserProc;
Var
    Rsm: IRepositoryScriptManager;
    Driv: IDalDriver;
    ConDesc: IDalConnectionDescriptor;
    Params: IDalConnectionDescriptorParams;
    Con: IDalConnection;
Begin
    
//Connection to schema on the Oracle server
    Driv := New DalOrcl8Driver.Create As IDalDriver;
    ConDesc := Driv.CreateDescriptor;
    Params := ConDesc.Params;
    Params.Find(
"User Name").Value := "TestSchema";
    Params.Find(
"Password").Value := "TestSchema";
    Params.Find(
"Host BSTR").Value := "Test";
    Params.Find(
"Schema").Value := "TestSchema";
    Con := ConDesc.CreateConnection;
    
//Repository manager settings
    Rsm := New RepositoryScriptManager.Create;
    Rsm.Connection := Con;
    Rsm.Driver := RepositoryDriverType.ORCL9;
    Rsm.Operation := RepositoryOperationType.Update;
    
//Repository update
    Rsm.Repository := RepositoryType.Metabase;
    Rsm.LoadScript(
New FileStream.Create("c:\current.rm4", FileOpenMode.Read, FileShare.Exclusive));
    Rsm.Execute(
Null);
    
//Update MDM repository
    Rsm.Repository := RepositoryType.RDS;
    Rsm.LoadScript(
New FileStream.Create("c:\current_rds.rm4", FileOpenMode.Read, FileShare.Exclusive));
    Rsm.Execute(
Null);
End Sub UserProc;

Update of the repository version and MDM repository version in accordance with the "current.rm4" and "current_rds.rm4" files takes place after executing this example.

See also:

IRepositoryScriptManager