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
0
votes
1 answer

Transform Variable value in quoted string for connec string in dblink postgresl

In Postgresql 9.1, the connect string of dblink must be in quoted string. My issue is that my dbname come from a variable value \set connect quote_ident('dbname=mydb') SELECT dblink_connect(connect); quote_ident or quote_literal doesn't…
PeterCaq
  • 1
  • 2
0
votes
1 answer

call stored procedure using dblink and Java

I need to call a stored procedure using dblink and Java, I've got this code calling the stored procedure with jdbc, but now I need to do the same call using dblink this is the call using JDBC String sqlQuery = "{ CALL ACCUMULATED.GENERAR_ACUMULATED…
0
votes
1 answer

DBLink Priveleges vs User Privileges

I have a user on DB1 with only SELECT privileges. I have a DBLink to DB2 created on DB1. What are the priveleges that the user will have on DB2 tables? Do they depend on his priveleges on DB2? Thank you
Majid Laissi
  • 19,188
  • 19
  • 68
  • 105
0
votes
0 answers

DBLink Optimized Insertions

I want to insert 10 million rows into my Oracle Database via Database Link. What will be an optimized way to do that? Doing INSERT by SELECT * FROM [dblink_table_name] would be an optimized way of doing it?
Imran Hemani
  • 599
  • 3
  • 12
  • 27
0
votes
0 answers

Running a postgres query between two databases with conditions

I have two postgres databases on a single server. I need to extract records from one database and put them into another. This is my working query. insert into "tblInvInfo" select "iiInvNum", "iiItemCode","iiUnitMeasure", "iiUnitQuantity",…
itsols
  • 5,406
  • 7
  • 51
  • 95
0
votes
1 answer

Postgresql: ERROR: structure of query does not match function result type Using DbLink

So I wrote this method that aims at querying to another remote database with the same structure using dblink (inspired from this post Specify dblink column definition list from a local existing type and this one Refactor a PL/pgSQL function to…
Augustin Riedinger
  • 20,909
  • 29
  • 133
  • 206
0
votes
1 answer

refreshing changed db link source (oracle gateway to sql server)

the question is pretty straightforward, - when I chance to change setting in oracle gateway to microsoft sql server (dg4msql) configuration (HS_FDS_CONNECT_INFO) to another database on the same server, the database link does not always gets…
hello_earth
  • 1,442
  • 1
  • 25
  • 39
0
votes
1 answer

Could not load library dblink, postgresql

I am trying to create a dblink extension on my local machine. I am using PSQL 9.2.4. I've ran make and make install to install postgres. Went into the contrib folder and ran make and make install in the dblink directory. dblink is listed in…
Hunter
  • 1,667
  • 17
  • 24
0
votes
2 answers

How to connect to two databases of Oracle using dblink

I am tring to use db link for that I have first change the name of both databases to sol1(remote) and sol3(local) then I create a db link On sol3 CREATE DATABASE LINK SOL1.SWORLD CONNECT TO TEST IDENTIFIED BY TEST USING SOL1; LINK CREATED ON SQL…
KASHIFAMAN
  • 1
  • 1
  • 1
0
votes
2 answers

PostgreSQL: How to assign "SELECT" query to variable using dblink?

Here I am trying to assign a "SELECT" query to a specific variable. The select query is retrieving rows from other database table using dblink. For example as shown below: Example: My try create or replace function fun(names varchar(60), id…
Sarfaraz Makandar
  • 5,933
  • 16
  • 59
  • 84
0
votes
1 answer

Accessing tables from different databases in different servers in Oracle with out using Dblinks?

we are writing a query in oracle which needs to gets data from joining two tables which are in different databases located on different servers. For this, we are using Dblinks in the query . But, this is causing the query to execute very slowly. Is…
Sai Avinash
  • 4,683
  • 17
  • 58
  • 96
0
votes
1 answer

Best way to clone DB-Tables

I need to clone (make a 1to1 copy of) several Tables in our Oracle DB into another Oracle DB. Both DBs are running under Oracle version 11.2.0.3 Problems are: Tables (together) are quite large (> 20gb) Must be a real "Snapshot". DB may change…
Sauer
  • 1,429
  • 4
  • 17
  • 32
0
votes
1 answer

Dblink Insert Update Delete - Number of rows affected always zero

I'm using dblink to do some data manipulation (insert, update or delete) on a remote database. Specifically I am using views, and rules on the views to do the insert, update or delete. For example: -- SQL -- Note: get_remote_db() is a function…
ADTC
  • 8,999
  • 5
  • 68
  • 93
0
votes
2 answers

Authentication Issue Using PostgreSQL dblink

How do you create a dblink connection in Postgres without supplying username & password (for security reasons)? Running the following query returns this error: SELECT dblink_connect('conn_1','dbname=adatabase'); "could not establish connection…
minus34
  • 255
  • 1
  • 5
  • 16
0
votes
0 answers

Dead process caused by dblink

I have PL/SQL procedure which copies data from remote database. Both databases are 11g. Most of time the procedure is running fine. However, when the remote database has some unexpected problem (like shutdown, etc... but not all the shutdown cause…
Anuj
  • 197
  • 2
  • 11