Setting up a remote database for view forms
To set up a remote database for view forms on an Oracle database
- Set up a link between the AR System database and the Oracle database. For more information, see Setting up an Oracle database.
- 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. - Create the view form on the view created in step 2.
- 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
- 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.
- Create a link to the remote database, and give the ARAdmin user an account on the remote database or use the proper login credentials.
- Turn on Distributed Transaction Coordinator for the local and remote databases to enable transactions between two or more SQL instances.
- 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
- Create a dblink extension in PostgreSQL, if not already. For information about creating a dblink, see Setting up a PostgreSQL database.
- Allow connecting to remote PostgreSQL database from all the hosts. For information, see Setting up a PostgreSQL database.
- 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> - Create a view in the local database that uses the dblink.
- 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);
- Create or replace view, remote_view, as follows:
- 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*