Starting and stopping OpenSwitch on Windows

OpenSwitch starts automatically after you install and configure the product.

NoteYou cannot start OpenSwitch until you have configured the product. If you chose to configure OpenSwitch after installation, see Chapter 5, “Using the Configuration File,” in this guide, and Chapter 3, “Configuring OpenSwitch” in the OpenSwitch Installation Guide for more information.

StepsStarting OpenSwitch from the Start menu

See Chapter 4, “Post- Installation Tasks” in the OpenSwitch Installation Guide to add OpenSwitch to the Windows Start menu. To start OpenSwitch:

  1. Select Start | Programs | OpenSwitch | OpenSwitch.

StepsStarting OpenSwitch from a command prompt

  1. Open a Command Prompt window, and go to the %SYBASE% directory.

  2. In the same window, enter: .\

    SYBASE.bat
    
  3. At the command prompt, enter:

    cd %SYBASE%\OpenSwitch-15_1\bin
    
  4. In the same window, enter the following command, then enter the following, where -c is the name of the OpenSwitch configuration file to use during start-up:

    start OpenSwitch.bat -c ...\config\OpenSwitch_ServerName.cfg
    

You can configure OpenSwitch to use encrypted user names and passwords for the user name and password entries that are in the OpenSwitch configuration file. See “Using encrypted user names and passwords”.

StepsStopping OpenSwitch from the command line on Windows

  1. Open a Command Prompt window and go to %SYBASE%.

  2. Enter:

    .\SYBASE.bat
    
  3. At the command prompt, connect to isql as an administrator and enter in one line, where OpenSwitch_ServerName is the name of the OpenSwitch server you want to stop:

    isql -UAdministrator_UserName -PAdministrator_Password
     -S OpenSwitch_ServerName
    
  4. Issue this command:

    rp_shutdown
    go
    

StepsStarting OpenSwitch as a Windows service

  1. Go to %OPENSWITCH%\bin and use a text editor to set the OPENSWITCH and SYBASE_OCS variables to the correct path in the OpenSwitch.bat file. Save the file and close the text editor.

  2. From %OPENSWITCH%\bin, open a Command Prompt window, enter the following, where OpenSwitch_configuration_file_path is the location of the OpenSwitch configuration file:

    .\OpenSwitch.bat -c OpenSwitch_configuration_file_path -R install
    

    For example:

    D:\Sybase\OpenSwitch-15_1\config\OpenSwitch_ServerName.cfg
    
  3. Open the Registry Editor. Select Start | Run, enter regedit in the Open text field, then click OK.

  4. In the Registry Editor window, go to HKEY_LOCAL_MACHINE | SYSTEM | CurrentControlSet | Services and select the OpenSwitch server name.

    1. Select Edit | New | Key, then enter Parameters as the key name.

    2. Select the new Parameters key, select Edit | New | String Value, then enter Application as the new string value.

    3. Double-click Application. In the Edit String dialog box, enter the following text on one line in the Value Data field:

      OpenSwitch installation directory\bin\OpenSwitch.bat 
      -c OpenSwitch configuration file path 
      -l OpenSwitch install directory\bin\OpenSwitch_ServerName.log
      

      Where:

      • OpenSwitch installation directory – is the drive and directory in which OpenSwitch is installed; for example:

        D:\Sybase\OpenSwitch-15_1
        
      • OpenSwitch configuration file path – is the location of the OpenSwitch configuration file; for example:

        D:\Sybase\OpenSwitch-15_1\config\OpenSwitch_ServerName.cfg
        
      • OpenSwitch log file path – is the location of the OpenSwitch log file; for example:

        D:\Sybase\OpenSwitch-15_1\bin\OSWServer.log
        

      NoteUse the name of your actual OpenSwitch configuration file and log file when entering this information.

      Click OK.

    4. In the left pane of the Registry Editor window, click your service name. In the right pane of the Registry Editor, double-click the “ImagePath” string and delete the text in the Edit String dialog box.

      Enter the full path to the srvany.exe file. For example:

      D:\engapps\NTResKit\srvany.exe
      

      Click OK.

    5. Select Registry | Exit to close the Registry Editor.

  5. Select Start | Settings | Control Panel | Administrative Tools | Services, right-click OpenSwitch OpenSwitch server name in the Services right pane, then click Properties.

  6. In the Properties dialog box:

    1. Select the Log On tab.

    2. Select Local System Account and Allow Service To Interact With Desktop.

    3. Select the General tab.

    4. In the Startup Type box, select Automatic.

      If you do not want OpenSwitch to start automatically the next time the Windows machine is restarted, change the Startup Type to Manual.

    5. Click Apply, then click OK to close the Properties dialog box.

  7. In the Services right pane, right-click the OpenSwitch service and select Start.

  8. Close the Services window.

StepsStopping the OpenSwitch service on WIndows

  1. Right-click an empty space on the Windows taskbar, then click Task Manager.

  2. Select the Processes tab.

  3. Click on the OpenSwitch process and select End Process.

  4. Close the Windows Task Manager window.

  5. If this fails because the process is being used by an application, select Start | Settings | Control Panel | Administrative Tools | Services.

  6. In the Services window, right-click the OpenSwitch service and select Stop.

  7. Close the Services window.

StepsRemoving OpenSwitch as a service

  1. Shut down OpenSwitch if it is running.

  2. Open a Command Prompt window and go to %OPENSWITCH%\bin.

  3. At a command prompt, enter the following, where OpenSwitch configuration file path is the location of the OpenSwitch configuration file:

    .\OpenSwitch.bat -c OpenSwitch configuration file path -R remove
    

    For example:

    D:\Sybase\OpenSwitch-15_1\config\OpenSwitch_ServerName.cfg
    

This stops the service and removes it from the Windows Registry.