Questions tagged [dblink]

An object or module that enables access to a remote database.

In Oracle a database link is a schema-level object that enables users to access objects on a remote database. It is possible to create a database link to access a non-Oracle database.

In PostgreSQL dblink is a module, which enables connections to other PostgreSQL databases, from within a session.

Questions tagged should also be tagged with the appropriate RDBMS.

523 questions
4
votes
1 answer

Explicitly refer to public DBLink when schema owns a private one of same name?

I'm working a migration project requiring an import of several Oracle database schema onto an existing database. This requirement has brought about an interesting conflict where I now have two dblinks with the same name: One is a private dblink…
user2858650
4
votes
1 answer

How to use pg-service.conf service as dblink connection string in postgresql

I have pg_service.conf file with following config pg_service.conf [test-service] host=localhost port=5432 user=test-user password=***** dbname=test-table While running following query shows error Query SELECT id, name FROM …
Venkatesan
  • 43
  • 1
  • 7
4
votes
1 answer

Need to use legacy PLSQL with DBLink call, in an XA transaction, and can not use shared connection

I have an Oracle PLSQL program in database A, that select's data from other database B through a DBLink. I call the PLSQL program from a Java EE application. Till now, it all works fine. Database B is out out my scope, it belongs to an external…
4
votes
1 answer

Synonym or view over dblink

We are writing some interfacing routines in PL/SQL to transfer data between several oracle database by using another oracle database as host. (ie hr -> host -> finance) the transfers are happening over db_links essentially insert into…
ShoeLace
  • 3,476
  • 2
  • 30
  • 44
4
votes
2 answers

Recovering jdbc connection after db link failure

Can I recover a JDBC database connection after accessing a database link of a remote database that has been disconnected? We have an application that uses a single connection to a (local) oracle database, but occasionally reads data from a remote…
gatinueta
  • 393
  • 3
  • 13
4
votes
4 answers

Copying metadata over a database link in Oracle 10g

Thanks in advance for your help experts. I want to be able to copy over database objects from database A into database B with a procedure created on database B. I created a database link between the two and have tweaked the get_ddl function of the…
Tunde
  • 139
  • 2
  • 6
  • 17
4
votes
3 answers

ORA-02070: database does not support in this context

I have a query like INSERT INTO sid_rem@dev_db (sid) select sid from v$session Now, when i execute this query i get ORA-02070: database does not support in this context This error happens only when I insert data from v$session into some…
Vivek
  • 4,452
  • 10
  • 27
  • 45
4
votes
1 answer

Linestring in dblink postgresql with postgis doesn't work

I'm trying to do a dblink using a postgis function, but the linestring has given me many problems. SELECT DV3."XXX", s."QQQID",s."X",s."Y",a."PPP" FROM "QQQ" s INNER JOIN "AAA" a ON a."QQQID" = s."QQQID", dblink('dbname=ZZZ', …
3
votes
3 answers

Is it possible to set default ORACLE dblink for session and avoid @dblink_name suffixes

I have an Oracle database with a couple of public dblinks for various customers. All linked databases for all customers are identical. Also I have a schema on my host machine only, where I stored DB views with some data retrieval logic. Currently,…
3
votes
3 answers

Using Partition on oracle table from a DB link

I am working on Oracle 9i my question is: can I use a partition over a table through a dblink for example I am working on DB1 and want to use a table A_table which has a partition with name part1 from DB2 how can I make the following: SELECT * FROM…
Hany
  • 1,146
  • 4
  • 18
  • 26
3
votes
3 answers

Run SQL Server Stored Procedure via Database Link from Oracle

Referring to How to execute an Oracle stored procedure via a database link, it does not work in my case. I don't know what I am missing. I have a SQL Server instance and Oracle database in the same computer. And database link is created in the…
Alex Yeung
  • 2,495
  • 7
  • 31
  • 48
3
votes
2 answers

Securing Oracle distributed transactions against network failures

I am synchronizing a table in a local database with data from a table on a database on the opposite side of the earth using distributed transactions. The networks are connected through vpn over the internet. Most of the time it works fine, but when…
TheRoadrunner
  • 1,281
  • 14
  • 34
3
votes
1 answer

Pro & Cons using dblink postgresql

Can anyone suggest me what are the pros & cons of using dblink in Postgres? I use dblink to connect to multiple database in my function in Postgres.
Peter Susanto
  • 85
  • 1
  • 6
3
votes
2 answers

Copy tables containing BLOB columns between Oracle Databases

On adhoc basis, we want to copy contents from 4 of our Oracle production tables to QA/UAT environments. This is not a direct copy and we need to copy data based on some input criteria for filtering. Earlier we were using Sybase database hence BCP…
Swapnil Jaju
  • 432
  • 1
  • 6
  • 14
3
votes
1 answer

Use Hibernate to access an Oracle DBLink'ed table

My user wants to input random sql to access databases for which a db link exists in Oracle db. However, this gives an exception with Hibernate. Below is a function which is supposed to check whether the query is valid by running the query. Any…
Adder
  • 5,708
  • 1
  • 28
  • 56