Previous Topic: Install the SQL Anywhere Database ServerNext Topic: Configure the SQL Anywhere Client  to Connect to the Remote Database


Configure the SQL Anywhere Database

Perform these steps on the SQL Anywhere database server, replacing each $VARIABLE with an appropriate value.

Follow these steps:

  1. Execute the following commands to set the environment of SQL Anywhere:
    cd $INSTALLATION_DIR/bobje/SQLAW/Bin/
    source sa_config.sh
    
  2. Execute the following commands to create CMS and AUDIT databases:
    1. Create a Database directory using the below command:
      mkdir -p $DATABASE_DIR
      
    2. Create the CMS database in the directory created above, and set the Admin and password for this database:
      ./dbinit -o "$DATABASE_DIR/cms_check.log" -dba $ADMIN_UID,$ADMIN_PWD "$DATABASE_DIR/CM.db"
      
    3. Create the AUDIT database in the directory created above, and set the Admin and password for this database:
      ./dbinit -o "$DATABASE_DIR/audit_check.log" -dba $ADMIN_UID,$ADMIN_PWD "$DATABASE_DIR/AUDIT/.db"
      
  3. To stop the SQL Anywhere Database created during installation:
    ./dbstop -y -c "uid=$ADMIN_UID;pwd=$ADMIN_PWD" $SQLANYWHERE_SERVER
    

    Or use the following:

    ./dbstop -y -c "uid=$ADMIN_UID;pwd=$ADMIN_PWD" $Database_Name
    
  4. To start SQL Anywhere to host CMS and Audit databases created above:
    ./dbspawn ./dbsrv12 -n "$SQLANYWHERE_SERVER" -x \""tcpip(port=$SQLANYWHERE_PORT)"\" "$DATABASE_DIR/cms.db" "$DATABASE_DIR/audit.db"
    
  5. Verify that the required services are running on the SQL Anywhere port:
    netstat -an | grep $SQLANYWHERE_PORT
    
  6. Create Business Object Enterprise User and assign privileges on both the databases(CMS & AUDIT) using the following commands:
    ./dbisqlc -q -c "uid=$ADMIN_UID;pwd=$ADMIN_PWD;server=$SQLANYWHERE_SERVER;host=$SQLANYWHERE_HOST:$SQLANYWHERE_PORT;dbn=cms" CREATE USER "$BOE_CMS_UID" IDENTIFIED BY "$BOE_CMS_PWD"
    ./dbisqlc -q -c "uid=$ADMIN_UID;pwd=$ADMIN_PWD;server=$SQLANYWHERE_SERVER;host=$SQLANYWHERE_HOST:$SQLANYWHERE_PORT;dbn=$cms" GRANT RESOURCE, VALIDATE, PROFILE, READFILE TO "$BOE_CMS_UID"
    ./dbisqlc -q -c "uid=$ADMIN_UID;pwd=$ADMIN_PWD;server=$SQLANYWHERE_SERVER;host=$SQLANYWHERE_HOST:$SQLANYWHERE_PORT;dbn=audit" CREATE USER "$BOE_AUDIT_UID" IDENTIFIED BY "$BOE_AUDIT_PWD"
    ./dbisqlc -q -c "uid=$ADMIN_UID;pwd=$ADMIN_PWD;server=$SQLANYWHERE_SERVER;host=$SQLANYWHERE_HOST:$SQLANYWHERE_PORT;dbn=audit" GRANT RESOURCE, VALIDATE, PROFILE, READFILE TO "$BOE_AUDIT_UID"