Sun N1 Service Provisioning System 5.2.1 Release Notes

Windows: Database Optimization Should Be Performed On a Regular Basis

If database optimization is not performed on a regular basis, performance deteriorates.

Workaround: Manually schedule a database optimization task.

This is a two phase process.


Note –

The following steps are performed on the Master Server.


  1. Creation of Database Optimization Script

    Create a new Windows command file called file_name.cmd in the server\bin\ directory of the Master Server installation. Copy the following text to the file_name.cmd file.


    REM No changes need to be made to the script after this line
    cd %SPS_MS_DIR%\bin
    ..\cygwin\bin\bash.exe roxdbcmd vacuumdb -d rox
  2. Scheduling

    1. Choose Start ⇒ Settings ⇒ Control Panel ⇒ Scheduled Tasks.

    2. Start the Task Scheduler Wizard by double-clicking Add Scheduled Task in the Scheduled Tasks folder. Click Next.

    3. Click Browse to open the Select Program To Schedule dialog box. Navigate to the optimizedb.cmd file.

    4. Choose the frequency of task runs.

      It is recommended that you run the task daily. Your options in subsequent screens will depend on your choices. The following steps assume that the user selected the daily option.

    5. Enter the time when the task should be run. Click Next.


      Note –

      It is advisable to run the database optimization task when the system is not being used. Choose the scheduling time accordingly.


    6. Type the name and password of the user who is associated with this task. Click Next.

      Make sure that you choose a user with sufficient permissions to run the program. By default, the wizard selects the name of the user who is currently logged on.

    7. Click Finish.

      The task is scheduled.

    8. For confirmation of successful task scheduling, it is advisable to choose Start ⇒ Settings ⇒ Control Panel ⇒ Scheduled Tasks and check the Task Exit Status Code. A successful task run is indicated by code 0x0.


      Note –

      Please note that the scheduled run of the task should be completed before observing the exit status code.


      For more information on Windows task scheduling options, see http://www.microsoft.com/technet/scriptcenter/guide/sas_man_lpja.mspx.