dblink_ora_connect() v13

The dblink_ora_connect() function establishes a connection to an Oracle database with user-specified connection information. The function comes in two forms; the signature of the first form is:

dblink_ora_connect(<conn_name>, <server_name>, <service_name>, <user_name>,
<password>, <port>, <asDBA>)

Where:

  • conn_name specifies the name of the link.

  • server_name specifies the name of the host.

  • service_name specifies the name of the service.

  • user_name specifies the name used to connect to the server.

  • password specifies the password associated with the user name.

  • port specifies the port number.

  • asDBA is True if you wish to request SYSDBA privileges on the Oracle server. This parameter is optional; if omitted, the default value is FALSE.

The first form of dblink_ora_connect() returns a TEXT value.

The signature of the second form of the dblink_ora_connect() function is:

dblink_ora_connect(<foreign_server_name>, <asDBA>)

Where:

  • foreign_server_name specifies the name of a foreign server.

  • asDBA is True if you wish to request SYSDBA privileges on the Oracle server. This parameter is optional; if omitted, the default value is FALSE.

The second form of the dblink_ora_connect() function allows you to use the connection properties of a pre-defined foreign server when establishing a connection to the server.

Before invoking the second form of the dblink_ora_connect() function, use the CREATE SERVER command to store the connection properties for the link to a system table. When you call the dblink_ora_connect() function, substitute the server name specified in the CREATE SERVER command for the name of the link.

The second form of dblink_ora_connect() returns a TEXT value.