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
2
votes
6 answers

Testing DB Link - ORA-12154: TNS:could not resolve the connect identifier specified

I know there is a load of times this question has been asked but I can't quite figure out how to apply this information to my situation. I have two databases of which I'm trying to connect with a DB LINK. These are: BBEGMTD1 OPEGMTP1.WORLD A DB…
m.edmondson
  • 30,382
  • 27
  • 123
  • 206
2
votes
1 answer

ORA-01031: insufficient privileges when inserting via dblink

This works: (connect to some_db) INSERT INTO some_schema.some_table(id) VALUES (some_schema.some_table.nextval); THis works too: (connect to some_other_db) SELECT some_schema.some_table.nextval@some_db FROM DUAL; This does not work: (connect to…
Tgr
  • 27,442
  • 12
  • 81
  • 118
2
votes
0 answers

How to execute a procedure from PL/SQL via Firebird through a DB link?

I created a DB link between Oracle and Firebird. I can select tables with this query : SELECT * FROM city_TB@firebird_dblink I need to use packages and view. When I use this query; SELECT * FROM city@firebird_dblink no rows are returned,…
2
votes
5 answers

Moving XML over a DBLink

I am trying to move some data over a dblink and one of the columns is an XMLType column. The code looks like this: begin delete from some_schema.some_remote_tab@src_2_trg_dblink; INSERT INTO some_schema.some_remote_tab@src_2_trg_dblink(id,…
FrustratedWithFormsDesigner
  • 26,726
  • 31
  • 139
  • 202
2
votes
1 answer

Postgresql: dblink in Stored Functions

I want to insert top 20 ROWS from a table tbl_A in db_A to tbl_B in db_B. The schema for tbl_A and tbl_B is: CREATE TABLE ( id serial PRIMARY KEY, int a, int b ); I have some questions related to following queries psql db_A SELECT…
Mayank
  • 5,454
  • 9
  • 37
  • 60
2
votes
1 answer

How to create a DB link between two Oracle RDS instances

I'm trying to create a DB link between two Oracle RDS instances in two different VPCs. I have created a peering VPC connection, added routes and edited security groups according to this guide. But I'm getting "ORA-12154: TNS:could not resolve the…
AchalaM
  • 33
  • 1
  • 6
2
votes
2 answers

select * through dblink

I have some trouble when trying to update a table by looping cursor which select from source table through dblink. I have two database DB1, DB2. They are two different database instance. And I am using this following statement in DB1: CURSOR…
starwilly
  • 23
  • 1
  • 4
2
votes
1 answer

DB Link from Oracle to MS Server

I am new to this forum and already searched for 45 minutes to find a solution for my problem. I hope you can help me. A Gateway to a remote Microsoft SQL Database was installed on a Oracle Server (Oracle 12c). The tsnnames.ora file was appropiately…
Rebell112
  • 31
  • 5
2
votes
1 answer

Can I compile a large stored procedure over a database link?

I am working in an Oracle database and do not have direct access to our production database. I do have indirect access via a database link. The link is with the same user that all custom code runs under and has the same permissions as if I were to…
Brian Adam
  • 21
  • 2
2
votes
1 answer

Can I use postgres_fdw without foreign tables defined?

I have a production database "PRODdb1", with a read-only user account. I have a need to query(select statement) this database and insert the data into a secondary database named "RPTdb1". I originally planned to just create a temp table in PRODdb1…
calKno
  • 21
  • 1
2
votes
1 answer

How can I get PostgreSQL DBLink connections to work with JDBC?

I'm not able to get named/unamed dblink connections to persist in my springboot "java" (actually kotlin) application. I am writing my code in kotlin. The code looks like this. var result = jdbcTemplate.queryForObject("SELECT…
Philip Nguyen
  • 871
  • 2
  • 10
  • 29
2
votes
1 answer

How to identify if the DBlink created in Oracle12c is shared or not

I have created couple of DB links. Some are shared and some are not. I created shared DB Link: CREATE SHARED DATABASE LINK dblink_name CONNECT TO username IDENTIFIED BY password AUTHENTICATED BY schema_name IDENTIFIED BY password USING…
2
votes
1 answer

Postgresql 9.6, Calling a remote function with data wrapper throws various errors

I've created a function in a database that inserts records into a table. This function returns VOID and takes a VARIADIC text array as an input param. When I run the function from the database locally, it works fine, as expected. But when I try to…
EricBlair1984
  • 339
  • 4
  • 16
2
votes
1 answer

Oracle 11gr2 connection to Sql Server using dg4msql problem

To whom it may respond to, We have installed Oracle 11g r2 on a Redhat Enterprise Linux 5.4 . We are trying to connect to a Sql Server 2005, after applying some notes the error below is the result we got : "ORA-28513 internal error in heterogenous…
kayhan yüksel
  • 378
  • 2
  • 9
  • 24
2
votes
0 answers

Refresh Materialized View over DB Link

DB B is connected over DB-Link with DB A. On B I created materialized view mav_test, that took about 40 seconds and works fine. If I try to refresh mav_test now e.g. with 'execute dbms_mview.refresh('mav_test','c');' and other commands, System B is…
user
  • 157
  • 2
  • 14