Setting Up Adaptive Server Enterprise as the In-Memory Database

Install and configure Adaptive Server for use as the in-memory database for RAP if you are not using SAP HANA as your in-memory database.

  1. Open a new command prompt. Do not reuse a command prompt from the installation of another RAP component.
  2. Install Adaptive Server Enterprise, Enterprise Edition version 15.7 ESD #1 or higher.
    The installer may display additional options other than the options below but the suggestions detailed in this step are important when configuring Adaptive Server Enterprise for RAP. If no suggestion is made for an option, you can accept a default value or see the Adaptive Server Enterprise Installation Guide for additional information.
    1. Choose a typical installation. If you are operating your server in a non-English server environment, you may wish to install additional Adaptive Server language packs. To do this, choose a custom installation.
    2. When prompted, choose to install a licensed copy and continue the installation without a license key. Or if you already have a licensed server set up, choose the licensed server.
    3. Select Enterprise Edition for the product edition, and select the license type that corresponds to your RAP license.
    4. After copying files to your computer, the installer prompts you to specify which products you wish to configure. Select the Adapter Server, Backup Server, and the Sybase Control Center.
      The next steps detail the configuration of each of these options.
  3. Configure the ASE server.
    1. Choose a server name.
      The default server name is RAPASE. This name is used in all of the isql commands used to connect to the database. If you use a different server name, replace RAPASE in the isql commands with the name of your server (the -S option specifies the server name).
    2. Choose mixed as the application type.
    3. Choose a page size.
      Sybase recommends an 8k page size. If you choose a different page size, you will need to make some modifications to SQL scripts later in the installation process.
    4. Choose a language and character set.
      If you wish to process multibyte characters, select UTF-8 (Unicode) for the character set and binary (binary ordering for UTF-16) as the sort order. Otherwise, accept the default of iso_1 and a sort order of bin_iso_1. The character set chosen determines which SQL scripts are required when configuring your RAP schema.
    5. Select the option to optimize your server, and allocate as much shared memory to the ASE server as possible. If you are planning on creating an in-memory database for this server, ensure that at least 5 gigabytes of shared memory are allocated to the server.
    6. Select the option to create sample databases.
    7. These are recommended minimum database configuration options:
      Property Recommended Configuration
      Master Device Size 500MB
      Master Database Size 100MB
      System Procedure Device Size 160MB
      System Procedure Database Size 160MB
      System Device Size 30MB
      System Database Size 30MB
      Tempdb Device Size 100MB
      Tempdb Database Size 100MB
    8. Do not enable the PCI property.
  4. Configure the Backup Server. Sybase recommends using the server name RAPASE_BS but if you chose a different name for your database server, use that name in your backup server instead.
  5. Configure Sybase Control Center.

    This installs the agent that communicates with SCC. The actual SCC server is installed using the Sybase Control Center installer.

    If you are installing other Sybase components on this machine, ensure that the RMI port for the Adaptive Server agent is unique from the RMI ports specified for other Sybase components. The default for all Sybase components is 9999.

    1. Configure the UDP Adaptor for discovery purposes.
    2. Change the passwords for SCC users (uafadmin, sccadmin, and sccuser) by selecting each one and changing their properties to reflect their new passwords.
  6. Wait for the ASE installer to finish.
    Once the installation is complete, the install tool starts the ASE server and creates the specified databases. The following scripts primarily modify the properties and schema of the Adaptive Server model database. This database is copied to create the RAP database.
  7. Copy the RAP enablement package to the ASE server machine, and extract it into a directory of your choice. This is referred to as the RAP enablement installation directory throughout the rest of this guide.
  8. Run the configure.sh shell script from the RAP enablement installation directory.
    This file prepares the Adaptive Server script files for execution.
  9. Source the SYBASE.sh or SYBASE.csh script file located in the RAP enablement installation directory.
  10. Source the SYBASE.sh or SYBASE.csh script file located in the Adaptive Server installation directory.
  11. Customize the creation of the rapTAQ database. Edit the $RAP_HOME/databases/ase/scripts/create_TAQdatabase.sql file.
    1. Create separate locations to store your data devices if they do not already exist. For performance reasons, consider storing your data devices on multiple disks.
    2. Change all instances of <ADD PATH> in the script to these locations.
    3. If you chose a different page size from the recommended 8k page size for RAP, create a memory pool for the log cache since by default, a log cache has an i/o size that is twice the page size. Modify the line sp_poolconfig "rapTAQLogCache", "10M", "16K". Change the “16K” portion to be twice the page size selected.
      For example, with a 2K page size that line becomes sp_poolconfig "rapTAQLogCache", "10M", "4K".
  12. Configure initial database properties.
    1. Run the command isql -S RAPASE -U sa -i $RAP_HOME/databases/ase/scripts/initial_setup.sql.
      This script modifies database properties including locks, number of connections, transfer history, and maximum memory.
    2. If errors display which refer to a procedure not being found, ignore them. The script verifies whether a procedure exists before it creates one.
  13. Create and load the RAP tables with supporting data.
    1. Create the tables.
      1. If you elected to support multibyte characters in the Adaptive Server setup, load the multibyte schema by running isql -S RAPASE -U sa -i $RAP_HOME/databases/ase/scripts/mbcs/create_tables_mbcs.sql . This adds necessary memory to the model and temporary databases. Multibyte versions of the RAP tables are then created.
      2. Otherwise, run the command isql -S RAPASE -U sa -i $RAP_HOME/databases/ase/scripts/create_tables.sql. This adds necessary memory to the databases and creates all RAP tables.
    2. Load the sample supporting data into the newly created tables in the Adaptive Server database. The sample supporting data is required to use the RAP sample project.
      1. If you installed the multibyte schema in the previous step, you can choose to load the default sample supporting data for English (single-byte characters) or for Japanese (multibyte characters). If you install the Japanese supporting data, use the Japanese sample input files when you run the RAP project.
        Sample Supporting Data for Multibyte Schemas Required Steps for Multibyte Schemas
        English
        1. Load data into the supporting tables by running isql -S RAPASE -U sa -i $RAP_HOME/databases/ase/scripts/mbcs/load_tables_mbcs.sql
        Japanese
        1. Change directories to $RAP_HOME/databases/ase/data/supportingdata/mbcs.
        2. To keep a copy of the English sample supporting data for future use, rename the files INSTRUMENT.bin to INSTRUMENT.bin.en and MARKET_INDEX.bin to MARKET_INDEX.bin.en
        3. Copy the INSTRUMENT.bin.jp to INSTRUMENT.bin and MARKET_INDEX.bin.jp to MARKET_INDEX.bin.
        4. Load data into the supporting tables by running isql -S RAPASE -U sa -i $RAP_HOME/databases/ase/scripts/mbcs/load_tables_mbcs.sql
      2. If you installed single-byte schemas, run the command isql -S RAPASE -U sa -i $RAP_HOME/databases/ase/scripts/load_tables.sql to load data into the supporting tables.
  14. Create the three RAP SQL procedures by running: isql -S RAPASE -U sa -i $RAP_HOME/databases/ase/scripts/create_procedures.sql
  15. Create RAP_USER.
    1. Run isql in the interactive mode: isql -S RAPASE -U sa
    2. Enter these lines in the terminal where <password> represents the password being assigned to RAP_USER:
      sp_addlogin RAP_USER,<password>,model
      go
      use model
      go
      sp_adduser RAP_USER,rap_user 
      go
      use master
      go
      sp_adduser RAP_USER,rap_user
      go
    3. Type quit to leave the interactive terminal.
  16. Create the rapTAQ database and bind the log cache. You can create the rapTAQ database as a reduced durability database (RDDB; default) or an in-memory database (IMDB; optional):
    1. To create the RDDB:
      1. Execute the command: isql -S RAPASE -U sa -i $RAP_HOME/databases/ase/scripts/create_TAQdatabase.sql

        While the create database script is running, ignore any errors relating to devices or databases not existing. These are due to the script attempting to drop any current devices and databases before creating new ones.

      2. Run the command: isql -S RAPASE -U sa -i $RAP_HOME/databases/ase/scripts/bind_TAQcache.sql

      This script binds the model database’s syslog table to a recently created log cache. A separate cache improves performance by isolating log I/O operations from data I/O operations.

    2. To create an in-memory database, execute the command isql -S RAPASE -U sa -i $RAP_HOME/databases/ase/scripts/create_memoryTAQdatabase.sql

      This script attempts to drop the TAQ cache before it creates it. If you are running this script for the first time, you will see errors about being unable to drop the named cache. You can safely ignore these errors.

  17. Set RAP_USER’s default database and modify permissions on the model database by running the command: isql -S RAPASE -U sa -i $RAP_HOME/databases/ase/scripts/modify_user.sql
  18. Shutdown the ASE server so that the changes that have been made to the model database during installation are copied into the rapTAQ database. Run: isql -S RAPASE -U sa and then type:
    shutdown
    go
  19. License your ASE database using your RAP license if you have not already done so using the installer.
  20. Start your ASE server by issuing these commands in a new terminal:
    1. Source the SYBASE.sh or SYBASE.csh script in the Adaptive Server installation directory.
    2. Run: <ASE Install Location>/ASE-15_0/install/RUN_RAPASE. If you chose your own server name earlier, this file will have a different name.
  21. (Optional) Load your new database with sample trade and quote data. In the terminal where you previously sourced the SYBASE.sh or SYBASE.csh files for the RAP enablement package and Adaptive Sever:
    1. If you are using the multibyte schema, load data into the TAQ tables by running isql -S RAPASE -U sa -i $RAP_HOME/databases/ase/scripts/mbcs/load_TAQ_tables_mbcs.sql
    2. If you are using a single-byte schema, load data into the TAQ tables by running isql -S RAPASE -U sa -i $RAP_HOME/databases/ase/scripts/load_TAQ_tables.sql