dblink

ERROR: function dblink(unknown, unknown) does not exist

我的未来我决定 提交于 2019-12-10 13:09:42
问题 I have defined a foreign server pointing to another database. I then want to execute a function in that database and get back the results. When I try this: SELECT * FROM dblink('mylink','select someschema.somefunction(''test'', ''ABC'')') or this: SELECT t.n FROM dblink('mylink', 'select * from someschema.mytable') as t(n text) I get the error: ERROR: function dblink(unknown, unknown) does not exist Running as superuser. 回答1: You need to install an extension dblink create extension dblink; 来源

How do i create postgres to oracle dblink?

馋奶兔 提交于 2019-12-09 12:20:09
问题 How do I create dblink in postgres 9.2 ? I want to be able to use it using @ link in oracle? I am using postgres 9.2 64bit. DBlink is from postgres 9.2 to Oracle 11g. 回答1: If you need to access postgresql FROM Oracle: http://dbaspot.wordpress.com/2013/05/29/how-to-access-postgresql-from-oracle-database/ If you need to access Oracle FROM postgresql: http://pgxn.org/dist/oracle_fdw/ 来源: https://stackoverflow.com/questions/18998225/how-do-i-create-postgres-to-oracle-dblink

Specify dblink column definition list from a local existing type

孤街醉人 提交于 2019-12-09 02:56:30
问题 I am using dblink to move certain data between databases. Everything is save and sound but I am wondering if there is a more convenient way to define the column definition list of a dblink query result. I can do something like this: SELECT * FROM dblink('dbname=remote', 'select * from test') AS t1(id integer, data text); The tables I'm interacting with have the same schema definition in both databases (remote & local). I was thinking of something like: SELECT * FROM dblink('dbname=remote',

Oracle create db link using a proxy schema

我只是一个虾纸丫 提交于 2019-12-06 04:05:44
So I want to create a database link in oracle, my username is jefferson and I want to connect trough opms so I was told to do this. create database link tmpp connect to jefferson[opms] identified by nothing using $something ; For some reason when I try to use [] syntax it just tells me indentified is missing. Why is this not working, I was told to do it this way but I can't find any help in the official documentation for [] usage or the correct syntax. Alex Poole You can create a fixed-user database link like this, but you need to enclose the entire proxy user identifier in double-quotes; and

dblink does not exist even when the extension already exists?

你。 提交于 2019-12-06 03:15:58
问题 So I'm new to using dblink , I just created a script that inserts data into a table from another database. I received the error function dblink(unknown,unknown) does not exist . So I checked online, and used CREATE EXTENSION dblink , ended up getting this message extension "dblink" already exists . My dblink code is like this: INSERT INTO tableA SELECT tbl.colA,tbl.colB,... FROM dblink('dbname=anotherDB', 'SELECT colA,colB,... FROM tableB') as tbl(colA,colB,...) 回答1: Check out in which schema

What does @ ! mean in a From Statement

点点圈 提交于 2019-12-05 12:41:11
I am trying to determine what this code is doing (Oracle SQL) — especially the at-sign exclamation mark in the from clause. INSERT INTO "LOCATIONS" "A1" ("LOCATION_ID", "SEQUENCE", "POINT_TYPE") SELECT "A2"."LOCATION_ID", "A2"."SEQUENCE", "A2"."LOCATION_TYPE", "A2"."POINT_TYPE" FROM "LOCATIONS"@! "A2" WHERE NOT EXISTS (SELECT 1 FROM "LOCATIONS" "A3" WHERE "A3"."LOCATION_ID" = "A2"."LOCATION_ID") Evgen This is a reverse database link to the original database, where the query is executed. The original query must look like: INSERT INTO LOCATIONS@remote_db ("LOCATION_ID", "SEQUENCE", "POINT_TYPE")

Select and Insert across dblink

时光总嘲笑我的痴心妄想 提交于 2019-12-05 04:13:08
I am having a bit of trouble with a select into insert across a dblink in oracle 10. I am using the following statement: INSERT INTO LOCAL.TABLE_1 ( COL1, COL2) SELECT COL1, COL2 FROM REMOTE.TABLE1@dblink s WHERE COL1 IN ( SELECT COL1 FROM WORKING_TABLE) When I run the statement the following is what gets run against the remote server on the DB Link: SELECT /*+ OPAQUE_TRANSFORM */ "COL1", "COL2" FROM "REMOTE"."TABLE1" "S" If I run the select only and do not do the insert into the following is run: SELECT /*+ */ "A1"."COL1" , "A1"."COL2" FROM "REMOTE"."TABLE1" "A1" WHERE "A1"."COL1" = ANY (

How to SELECT in Oracle using a DBLINK located in a different schema?

时光毁灭记忆、已成空白 提交于 2019-12-04 00:34:15
We have an Oracle DBMS (11g) and the following configuration: A DB user "MYUSER" Two schemas "MYUSER" and "SCHEMA_B" User "MYUSER" can access "SCHEMA_B" and has READ permissions on its tables A public DB link "DB_LINK" located in "SCHEMA_B" The DB_LINK is working when using the DB user "SCHEMA_B" directly Question : When logged on as "MYUSER", what is the correct syntax to access tables using the DB link of "SCHEMA_B"? Is it possible to do so at all? I already tried several constellations, which all did not work: select * from dual@"DB_LINK" select * from dual@"SCHEMA_B"."DB_LINK" select *

How do i create postgres to oracle dblink?

会有一股神秘感。 提交于 2019-12-03 14:18:45
How do I create dblink in postgres 9.2 ? I want to be able to use it using @ link in oracle? I am using postgres 9.2 64bit. DBlink is from postgres 9.2 to Oracle 11g. If you need to access postgresql FROM Oracle: http://dbaspot.wordpress.com/2013/05/29/how-to-access-postgresql-from-oracle-database/ If you need to access Oracle FROM postgresql: http://pgxn.org/dist/oracle_fdw/ 来源: https://stackoverflow.com/questions/18998225/how-do-i-create-postgres-to-oracle-dblink

Best way to handle LOBs in Oracle distributed databases

左心房为你撑大大i 提交于 2019-12-02 23:12:15
If you create an Oracle dblink you cannot directly access LOB columns in the target tables. For instance, you create a dblink with: create database link TEST_LINK connect to TARGETUSER IDENTIFIED BY password using 'DATABASESID'; After this you can do stuff like: select column_a, column_b from data_user.sample_table@TEST_LINK Except if the column is a LOB, then you get the error: ORA-22992: cannot use LOB locators selected from remote tables This is a documented restriction . The same page suggests you fetch the values into a local table, but that is... kind of messy: CREATE TABLE tmp_hello AS