Using a remote database on UNIX

In the following steps, the two servers involved are referred to as follows:

  • Machine A is where all of the M-Business Server components except the database are to be installed.

  • Machine B is where the database is to be installed.

To use a remote database on UNIX
  1. Install the same version of M-Business Anywhere on both machines.

  2. From machine A, ping machine B to verify basic network connectivity.

  3. On machine B, stop these M-Business Server daemons: sync, admin, and soap.

    Leave only asa running.

  4. On machine A, run the SQL Anywhere dblocate utility from within the sa_config.sh shell script:

    cd <M-Business_Home>/ASA/bin
    source sa_config.sh
    dblocate

    The dblocate utility should find the instance of SQL Anywhere running on machine B. It may not if the machines are on different subnets.

  5. Still within the sa_config.sh shell script on machine A, run the SQL Anywhere dbping utility to verify that you can communicate with the remote database on machine B:

    dbping -c "ENG=<machineB_name>; uid=agdb; pwd=password; 
        CommLinks=tcpip(Host=<machineB_IPadr>; 
        ServerPort=8099)"

    Where:

    <machineB_name> is the network name of machine B.

    <machineB_IPadr> is the IP address of machine B.

    password is the default password for user agdb after installing M-Business Server; change this if you have changed that password.

    If dbping does not communicate with SQL Anywhere on machine B, you have a network or communication problem.

  6. Still on machine A, use a text editor to open <M-Business_Home>/ASA/bin/.odbc.ini and modify it to look like this:

    [ODBC Data Sources]
    AGDB=<do_not_modify>
    
    [AGDB]
    Userid=sync
    Password=password
    ServerName=<machineB_name>
    CommLinks=tcpip(Host=<machineB_ipadr>; 
        ServerPort=8099)

    Where:

    • <do_not_modify> is something that you should not change.

    • <machineB_name> is the network name of machine B.

    • <machineB_IPadr> is the IP address of machine B.

    • password is the default password for user agdb after installing M-Business Server; change this if you have changed that password.

  7. Save and close the <M-Business_Home>ASA/bin/.odbc.ini file.

  8. Back within the sa_config.sh shell script on machine A, enter the following command, which uses the ODBC DSN file you just saved:

    dbping -m -d -c "DSN=AGDB"

    If the command is successful, you see:

    SQL Anywhere Server Ping Utility Version 10.0.1.3415
    Loaded ODBC driver dbodbc8.so
    Connected to SQL Anywhere 10.0.1.3415 server "<machineB_name>" and database "AGDB".
    Ping database successful.
  9. Do a final test by executing a simple query—from a UNIX shell window, enter:

    dbisqlc -c "DSN=AGDB"
    Note

    No changes in configuration files are necessary unless you change the ODBC DSN name.