Im not sure if this is the right place to ask about dbi_link. If not please forward it there.
Im trying to create a dbi_link between Oracle and postgresql. i nistalled all the necessary perl packages
And I had run dbi_link.sql and it completed without any errors
This is sql that I use to connect
postgres@garuda:~$ less /home/postgres/dbi-link-2.0.0/examples/oracle/dola.sql
/*
* Data source: dbi:Oracle:hr;host=localhost;sid=xe
* User: hr
* Password: foobar
* dbh attributes: {AutoCommit => 1, RaiseError => 1}
* dbh environment: NULL
* remote schema: NULL
* remote catalog: NULL
* local schema: hr
*/
UPDATE
pg_catalog.pg_settings
SET
setting =
CASE WHEN 'dbi_link' = ANY(string_to_array(setting, ','))
THEN setting
ELSE 'dbi_link,' || setting
END
WHERE
name = 'search_path'
;
SELECT make_accessor_functions(
'dbi:Oracle:sample;host=111.11.11.11;sid=xxx;port=1521',
''username',
'password',
'---
AutoCommit: 1
RaiseError: 1
',
NULL,
NULL,
NULL,
'sample'
);
And it executed successfully i think.It didnt comeplain of anything and created rules for all the tables in the oracle database
Now when I try to select from the remote table using
select r.* from sample.employee
ERROR: relation "sample.employee" does not exist
What am I missing here?
Also what values should go into remote_schema and remote_catalog? Can they be nulls?
Thanks
Josh