7 Running Oracle GoldenGate Veridata as a Windows Service

This topic describes how to run Oracle GoldenGate Veridata as a Windows Service.

7.1 Running Oracle GoldenGate Veridata as a Windows Service (for Server)

Locate the Command Scripts

  1. Locate the windows_service_admin.cmd_sample and windows_service_veridata.cmd_sample files in the Oracle GoldeGate Veridata Installation directory. For example, C:\Oracle\OracleHome122140\veridata\scripts.
  2. Edit both the files as per the instruction in the respective files and rename them by removing the _sample from the file names.
  3. Copy the files to ORACLE_HOME directory.

    Note:

    Ensure that the Windows user has Read/Write permission on Oracle GoldenGate Veridata installed file.

Create Boot Identity File

  1. If the boot identity file is not created for Weblogic to manage weblogic username and password, then follow the sections Creating a Boot Identity File for an Administration Server and Creating Boot Identity Files for Managed Servers in Administering Server Startup and Shutdown for Oracle WebLogic Server Guide.

    Note:

    For default installation of Oracle GoldenGate Veridata, Verdiata Managed Server uses the same boot identity file as the Admin Server. For Veridata Managed Server create boot.properties in the Security folder. For example, C:\Oracle\OracleHome122140\user_projects\domains\base_domain\servers\VERIDATA_server1\security
  2. Locate the cwallet.sso file and check the appriopriate user permission (the user who will install the service should have Read/Write permission on this file). An example location path of the cwallet.sso can be: C:\Oracle\OracleHome122140\user_projects\domains\base_domain\config\fmwconfig\bootstrap

Install Admin Service

  1. Locate installSvc.cmd in the Oracle WebLogic installed directory. For example, if ORACLE_HOME = C:\Oracle\OracleHome122140, then the command script will be located in C:\Oracle\OracleHome122140\wlserver\server\bin.
  2. Take a backup of the script file.
  3. Edit the script file before the tag ENDLOCAL and save the file.

    Remove the following lines:

    "%WL_HOME%\server\bin\%WLSVC_EXE_TO_USE%" -install -svcname:"wlsvc
        %DOMAIN_NAME%_%SERVER_NAME%" -svcdescription:"%SERVICE_DESCRIPTION%"
        -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%"
        -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%"
        -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%
    Add the following lines:
    "%WL_HOME%\server\bin\%WLSVC_EXE_TO_USE%" -install -svcname:"wlsvc
        %DOMAIN_NAME%_%SERVER_NAME%" -delay:180000  -svcdescription:"%SERVICE_DESCRIPTION%"
        -javahome:"%JAVA_HOME%"  -execdir:"%USERDOMAIN_HOME%"
        -maxconnectretries:"%MAX_CONNECT_RETRIES%"  -host:"%HOST%" -port:"%PORT%"
        -extrapath:"%EXTRAPATH%"  -password:"%WLS_PW%" -cmdline:%CMDLINE%
        -log:"C:\Oracle\OracleHome122140\AdminServer-stdout.txt"
    In the above line, edit:

    -svcname: installed service name

    -delay: (in milliseconds) as per the startup time of the Oracle GoldenGate Veridata Server

    -log: Edit the location of the log file as per the install directory.

  4. In the command prompt, run the windows_service_admin.cmd file.
  5. Run services.msc to verify the installation.
  6. Start the service and verify Admin Server is up (open the console UI in the browser).
For more information, see Setting Up a WebLogic Server Instance as a Windows Service.

Install Veridata Managed Service

  1. Locate installSvc.cmd in the Oracle WebLogic installed directory. For example, if ORACLE_HOME = C:\Oracle\OracleHome122140, then the command script will be located in C:\Oracle\OracleHome122140\wlserver\server\bin.
  2. Take a backup of the script file.
  3. Edit the script file before the tag ENDLOCAL and save the file.
    Remove the following lines:
    "%WL_HOME%\server\bin\%WLSVC_EXE_TO_USE%" -install -svcname:"wlsvc
        %DOMAIN_NAME%_%SERVER_NAME%" -svcdescription:"%SERVICE_DESCRIPTION%"
        -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%"
        -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%"
        -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%
    Add the following lines:
    "%WL_HOME%\server\bin\%WLSVC_EXE_TO_USE%" -install -svcname:"wlsvc
        %DOMAIN_NAME%_%SERVER_NAME%" -delay:180000 -depend:"wlsvc  base_domain_AdminServer"
        -svcdescription:"%SERVICE_DESCRIPTION%"  -javahome:"%JAVA_HOME%"
        -execdir:"%USERDOMAIN_HOME%"  -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%"
        -port:"%PORT%"  -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%
        -log:"C:\Oracle\OracleHome122140\VeridataServer-stdout.txt"
    In the above line, edit:

    -svcname: installed service name

    -delay: (in milliseconds) as per the startup time of the Oracle GoldenGate Veridata Server

    -depend: Admin Server service name

    -log: Edit the location of the log file as per the install directory.

  4. In the command prompt, run the windows_service_veridata.cmd file.
  5. Run services.msc to verify the installation.
  6. Start the service and verify that the Oracle GoldenGate Veridata Server is up (open the console UI in the browser).

    Note:

    Before starting the Oracle GoldeGate Veridata Server service, ensure that the Admin Server is up and running.
For more information, see Requiring Managed Servers to Start After Administration Servers.

7.2 Running Oracle GoldenGate Veridata as a Windows Service (for Agent)

On Windows platform, after installing the Oracle GoldenGate Veridata Agent, run the agent as a service. The scripts are located in AGENT_DEPLOY_LOCATION\service. The README.txt file in the service directory describes the procedure to run the agent as a service.

To install as a Windows service:

  1. Go to the Oracle GoldenGate Veridata Agent installation directory.

  2. Open the Set_Veridata_Agent_Env.bat file in an editor.

  3. Locate the '_VERIDATA_SERVICE_NAME' property, and edit it to add a service name for the agent. The name should not contain spaces or any other special characters. Only alphabets and numbers are allowed.

  4. Change the value of '_RUN_AS_SERVICE' property to true.

  5. Save and close the file.

  6. Open the command prompt and navigate to the directory where the agent is installed. Run the Install_veridata_Agent.bat script.

To uninstall the agent service:

  1. Open the command prompt and navigate to the directory where the agent is installed. Run the Uninstall_veridata_Agent.bat script.

  2. Revert changes made in the Set_Veridata_Agent_Env.bat file.

    Open the Set_Veridata_Agent_Env.bat file in an editor.

    Change the value of '_RUN_AS_SERVICE' property to false.

    Save and close the file.

To start and stop the Veridata agent:

  1. Open the command prompt and navigate to the directory where the agent is installed.

  2. Run one of the following commands:

    (starts the agent)

    Start_Veridata_Agent.bat 
    

    or

    Stop_Veridata_Agent.bat