Calling dblink_ora functions v14
The following command establishes a connection using the dblink_ora_connect()
function:
The example connects to:
- A service named
xe
- Running on port
1521
on thelocalhost
- With a user name of
hr
- With a password of
pwd
You can use the connection name acctg
to refer to this connection when calling other dblink_ora functions.
The following command uses the dblink_ora_copy()
function over a connection named edb_conn
. It copies the empid
and deptno
columns from a table on an Oracle server named ora_acctg
to a table located in the public
schema on an instance of EDB Postgres Advanced Server named as_acctg
. The TRUNCATE
option is enforced, and a feedback count of 3
is specified:
The following SELECT
statement uses the dblink_ora_record()
function and the acctg
connection to retrieve information from the Oracle server:
The command retrieves a list that includes all of the entries in the first_name
column of the employees
table.