Questions tagged [database-link]

47 questions
41
votes
2 answers

Oracle: Quick way to list all database links

The title says it all, is there a way to quickly list all the current database links in oracle? Something along the same lines as this, which lists the current user's tables: select * from user_tables; Thanks, GC.
Clarkey
  • 1,103
  • 3
  • 12
  • 19
11
votes
2 answers

How to connect to another db using stored procedures?

I need to get some data from an external db and make some calculations with it in another db, is it possible to connect to an external db from a stored procedure? Thanks guys. PS. Im using Oracle and both databases are in the same server.
eiefai
  • 1,874
  • 2
  • 21
  • 18
6
votes
3 answers

Error Querying MySQL server linked to SQL Server 2008

I've created a linked server in MS SQL Server 2008 to a remote MySQL server. When I try to query any tables, I get an error: .tablename. contains no columns that can be selected or the current user does not have permissions on that object. Does…
Jimmy Collins
  • 297
  • 2
  • 3
  • 8
4
votes
2 answers

Does Oracle cache queries when using a database link

Some vendor told us that we should not use database link between our database and theirs as the queries executed over a database link would not be cached, nor optimized. I can't find any information confirming/infirming this. Naively I would not see…
HeDinges
  • 143
  • 1
  • 5
4
votes
1 answer

Is there an equivalent to OPENROWSET in Oracle?

Is there an equivalent to OPENROWSET in Oracle? From OPENROWSET (Transact-SQL): This method is an alternative to accessing tables in a linked server and is a one-time, ad hoc method of connecting and accessing remote data by using OLE DB.
User1974
  • 1,517
  • 25
  • 54
3
votes
3 answers

How to avoid hardcoding a database link name in a package body

I have a PL/SQL package that copies data from a remote DB2 database using a database link. To keep the package configuration-independent I wrapped the remote table in a view. But a single field in a single table causes me lots of headache. It is a…
Alexey
  • 139
  • 1
  • 2
3
votes
2 answers

Oracle insert through dblink performance issue

I'm trying to do an insert as select to a table via dblink. The query looks like this: Insert into MARS_SUPERVISORS_PUB@EDHPUB select {...} from edhper a, edhper b where {... a.idn not in (select s.tarcfsra…
andreybavt
3
votes
1 answer

How can I create a dblink from Postgresql 8.3 to SQL Server (2000 and 2008)?

I have a Postgresql database that need to read data from two SQL Servers (one SQL Server 2000 and one SQL Server 2008). I want to setup two dblinks to the SQL Servers. After googling, foruming, reading documentation, I struggle to find something…
Stephan
  • 1,513
  • 4
  • 18
  • 27
3
votes
1 answer

linking databases for reporting

I am attempting to design a simple reporting feature for some financial market data. I have a few sets of data, and I am trying to figure out what will be the best way to organize the tables, in particular for reporting. I am using Microsoft SQL…
abee
  • 31
  • 1
3
votes
1 answer

create one private database link for two users oracle

I am trying to create one private database link to be accessed by only two users but it gives me syntax error. My code: CREATE DATABASE LINK "mylink" CONNECT TO USER1,USER2 IDENTIFIED BY password123 USING 'mydb';
SMH
  • 133
  • 1
  • 4
3
votes
1 answer

Is there a way to allow a proxy connection to use passed authentication in a public database link?

I think the answer to this is no, but I could be wrong. If nothing else it might be nice for others to be aware of this limitation of proxy connections.
Leigh Riffel
  • 23,884
  • 17
  • 80
  • 155
3
votes
1 answer

How to resolve foreign key references across different databases (iSeries and SQL Server)

I've got a system that has a DB2 iSeries database. We are rewriting a portion of the system and implementing it using SQL Server and Entity Framework. Originally, I was lead to believe that there wasn't much of a tie-in between the tables we are…
ChrisC
  • 131
  • 2
2
votes
3 answers

Determine last usage date of a linked server

We have a tonne of linked servers on our database server that we would like to clean up. Is it possible to determine the last date a linked server was used? e.g. the last time a query was performed through it.
Dan Nolan
  • 380
  • 2
  • 9
2
votes
1 answer

Oracle Select Query Over Database Link Suddenly Hangs Endlessly

I have a query that's been in use for years and today it started hanging endlessly. I took the query apart and found the piece causing it to hang is a simple join on a primary key that should run like lightning. If I remove problem table the query…
Jeff
  • 215
  • 1
  • 3
  • 9
2
votes
1 answer

Blocking incoming database links

Let's say there is an Oracle database A and another Oracle database B. Our database is A. Is there a way to block database links from B to A?
Mehmet Balioglu
  • 340
  • 2
  • 7
  • 13
1
2 3 4