Follow-On Topics

Related Topics

# About the Main Tab

You use the Main tab to configure the database connection for the trigger that activates this task: NOTE: The user configuring the connection must have network access permission to establish a connection from the Oracle instance to the agent when triggers are fired. The user must also have permission to execute the `utl_tcp package` and the steps to follow to grant this permission are shown in the User Setup section below. The dialog box contains the following:
|  | Server — This area contains the following for selecting a server which is hosting the required Oracle database:
|  | Select Server — Displays a list of all available Oracle Servers that have the Oracle Trigger Agent installed for selection.
| Click the image to view full size.

|  | Oracle SID — The Oracle server ID may be manually entered.

|  | Advanced — Opens the Oracle Port Number dialog box to enable a port number to be manually entered.

|  | Credentials — This area contains the following for setting the selected server login credentials:

|  | Login Name — A valid login name for connecting to the selected server may be manually entered.

|  | Password — A valid password for the selected login name may be manually entered.

|  | Connect As — Displays a list of user privileges for selection.

|  | Connect to Agent on port — The port number to be used to connect to the Agent may be manually entered.

|  | Select Table — This are contains the following for selecting the required Oracle database table:

|  | Triggering Table — Displays the table name selected from the Oracle database.

|  | Browse — Opens the Oracle Browser dialog box to enable an Oracle database table to be selected.

|  | Queue Trigger events if Server or Agent are unavailable to run Tasks — If selected then the trigger events are stored until King Task Centre or the Agent are available.

Example User Setup

NOTE:

The username, hosts names and port numbers are only examples and could be different on your system. The example assumes that the agent is located on the machine named `ORAHOST`, the agents port is `5543`, the Oracle SID is `TestDB`, and the Oracle listener listens on the default port `1521`.

The sample configuration:

On the ORAHOST machine run the operating system shell and perform the following steps:

    # sqlplus "SYS@TestDB AS SYSDBA"

    SQL> GRANT EXECUTE ON utl_tcp TO SampleUser;

    /

The below steps are only required for Oracle 11g or newer:

    SQL> BEGIN

    	dbms_network_acl_admin.create_acl (

    	acl > 'OraAgentTcp.xml',

    	description => 'Normal Access',

    	principal => 'ORACLEUSER',

    	is_grant => TRUE,

    	privilege => 'connect',

    	start_date => null,

    	end_date => null);

    END;

    /

    SQL> BEGIN

    	dbms_network_acl_admin.add_privilege (

    	acl => 'OraAgentTcp.xml',

    	principal => 'ORACLEUSER',

    	is_grant => TRUE,

    	privilege => 'connect',

    	start_date => null,

    	end_date => null);

    END;

    /

    SQL> BEGIN

    	dbms_network_acl_admin.assign_acl (

    	acl => 'OraAgentTcp.xml',

    	host => 'ORAHOST',

    	lower_port => 5542,

    	upper_port => 5542);

    END;

    /

You can check that the user now has all required privileges by configuring a sample Task or by running the following script:

    # sqlplus "OracleUser@TestDB"

    SQL> DECLARE

    	conn utl_tcp.connection;

    	BEGIN

    	conn := utl_tcp.open_connection('ORAHOST', 5542);

    	utl_tcp.close_connection(conn);

    END;

    /

If the above anonymous block is completed without any error then it means that the user has all the required permissions to connect to the agent.

Copyright © 2018 Quadrant Software B.V. All rights reserved.