From: | Josh Harrison <joshques(at)gmail(dot)com> |
---|---|
To: | General postgres mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | dbi_link question -problem connecting to oracle |
Date: | 2009-02-06 18:31:43 |
Message-ID: | 8d89ea1d0902061031p413cdcecm5fc62faf962c6830@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)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
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2009-02-06 18:55:34 | Re: warm database, tape device backup |
Previous Message | Fernando Moreno | 2009-02-06 18:06:36 | Re: How do I turn on query logger? |