Setting up a remote database for view forms


If the database table is in a remote database, you must perform the required database configuration steps and use the correct table name syntax to access the remote table. For databases that require you to create a database link or proxy database, refer to your database documentation, and work with the database administrator to configure access to the remote database table.

To set up a remote database for view forms on an Oracle database

  1. Set up a link between the AR System database and the Oracle database. For more information, see Setting up an Oracle database.
  2. In the database user's schema, create a view that accesses this link, for example:
    CREATE VIEW view_name AS (SELECT * FROM ownername.tablename@link)
    By default, the user is ARADMIN.
  3. Create the view form on the view created in step 2.
  4. To enable the support of multiple remote Oracle databases with different character sets, add the Oracle-Dblink-Character-Set parameter to your ar-cfg-or-ar-conf file.

To set up a remote database for view forms on a Microsoft SQL Server database

  1. Install the Microsoft SQL Server database on a remote server that is networked to the computer on which you plan to install AR System. For more information, see Setting up a Microsoft SQL Server database.
  2. Create a link to the remote database, and give the ARAdmin user an account on the remote database or use the proper login credentials.
  3. Turn on Distributed Transaction Coordinator for the local and remote databases to enable transactions between two or more SQL instances.
  4. Specify the following server configuration setting in the ar-cfg-or-ar-conf file:
    SQL-Server-Set-ANSI-Defaults: T
    This setting enables the DB-Library connection that AR System uses to use ANSI-NULLs and ANSI warnings.
    The format for the table name is:
    LINKNAME.DATABASENAME.OWNER.TABLENAME

To set up a remote database for view forms on a PostgreSQL database

  1. Create a dblink extension in PostgreSQL, if not already. For information about creating a dblink, see Setting up a PostgreSQL database.
  2. Allow connecting to remote PostgreSQL database from all the hosts. For information, see Setting up a PostgreSQL database.
  3. Verify that you can connect to the remote database by using the following command:
    psql -U <remote_db_user> -d <remote_db_name> -h <remote_db_host>
  4. Create a view in the local database that uses the dblink.
    1. Create or replace view, remote_view, as follows:
      select * from dblink('host=<remote_db_host> user=<remote_db_user> dbname=<remote_db_name> password=<remote_db_password>', 'select id, name from remote_tbl') as t1(id integer, name text);
  5. Create a view form on the view created in step 4.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*