Previous Topic

Next Topic

Book Contents

Book Index

Configuring a Sybase database

This task determines whether your Sybase Adaptive server is using a character set that is compatible with the ISO latin-1 character set.

Complete this task only once, using the System Administrator login name of the Sybase Adaptive server.

To configure a Sybase database:

  1. Check your current configuration from the isql session:
    1. To determine which character set is currently in use, enter the following command:

      sp_configure "default character set id"
      go

      If the output is 1, the current character is set to compatible with the ISO Latin-1 character set.

    2. Check the sort order:

      sp_configure "default sortorder id"
      go

      If the output is 50, the sort order is binary (the required sort order).

  2. If your current character set is compatible with ISO Latin-1 and uses binary sort, skip the remaining steps. Otherwise, continue with this procedure.
  3. Shut down all Control-M/EM and Control-M/Server components and applications that might connect to the database server.
  4. Export the data by running the command appropriate for the application.

    Application / component

    Command

    Control-M/EM

    UNIX:
    em util -U user -P password -export -type all -file exportFile

    Microsoft Windows:
    util -U user -P password -export -type all -file exportFile

    Control-M/Server

    ctm_backup_bcp

  5. Drop the database by running the command appropriate for the application.

    Application / Component

    Command

    Control-M/EM

    UNIX:
    em util -U user -P password -clean_database

    Microsoft Windows:
    util -U user -P password -clean_database

    Control-M/Server

    Skip this step.

  6. To change the character set, the sort order, or both, complete this step.

    Changing the character set or sort order affects all databases on the database server. You cannot retain original settings for databases that are not associated with Control-M/EM or Control-M/Server.

    To handle this situation, install another database server and create a new database for Control-M/EM or Control-M/Server. Then, configure the new database server as instructed in this step.

    If the installation is on a computer that uses a non-English locale, you must set the environment variable on the account where Sybase pre-installation step is to be run, as follows (this is relevant for the Sybase client on UNIX only):

    setenv BMC_USE_LOCALE <locale to be used by SYBASE client>

    setenv BMC_USE_LOCALE ja_JP.UTF-8

    1. Change to the directory where the Sybase Adaptive server is installed:

      UNIX:
      cd $SYBASE/charsets/iso_1

      Microsoft Windows:
      cd %SYBASE%\charsets\iso_1

    2. Run the following command:

      charset -U user -P password -S serverName binary.srt

    3. To change the sort order, run the following command:

      sp_configure "default character set id",1

    4. To change the sort order, run the following command:

      sp_configure "default sortorder id",50

  7. Rebuild the database.

    Application / component

    Action

    Control-M/EM

    UNIX:

    em util -U user -P password -build_schema


    Microsoft Windows:

    util -U user -P password -build_schema

    Control-M/Server

    Rebuild the database using the Database Creation menu as described in Rebuilding a Control-M/Server database.

  8. Import the data.

    Application / component

    Command

    Control-M/EM

    UNIX:

    em util -U user -P password -import -replace -type all -file exportFile


    Microsoft Windows:

    util -U user -P password -import -replace -type all -file exportFile

    exportFile is the name of the file exported in step 4.

    Control-M/Server

    ctm_restore_bcp

  9. Restart all components that you shut down.

Parent Topic

Configuring databases and clients