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 deployment directory.

  2. Navigate to the Service folder.

  3. Edit the agent_service.properties file.

  4. Find _VERIDATA_SERVICE_NAME and change it to the service name for the agent. The name can only contain alphabets or numbers. No special character or white space is allowed.

  5. Find _AGENT_PROPERTY_FILE and change it to the agent properties file name which has to be run as a service.
  6. Save and close the file.

  7. Run a Windows command session.
  8. Run the Install_veridata_Agent.bat script.

To uninstall the agent service:

  1. Run a Windows command session.

  2. Execute Uninstall_Veridata_Agent.bat from the deployment directory of the agent.

To start and stop the Veridata agent:

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

  2. Run one of the following commands:

    (starts the agent)

    Start_Veridata_Agent.bat 
    

    or

    Stop_Veridata_Agent.bat