Questions tagged [database-link]

108 questions
34
votes
3 answers

How to execute an Oracle stored procedure via a database link

Can I call a stored procedure in Oracle via a database link? The database link is functional so that syntax such as... SELECT * FROM myTable@myRemoteDB is functioning. But is there a syntax for... EXECUTE…
dacracot
  • 22,002
  • 26
  • 104
  • 152
8
votes
2 answers

How to create a database link in MySQL to connect to Oracle?

I need to create a database link in MySQL to connect to an Oracle database to use a table present in the Oracle database. I am not able to find any code or method of creating a database link in MySQL. How could I do this?
Ayush Bilala
  • 151
  • 1
  • 2
  • 8
7
votes
3 answers

ORA-02019: connection description for remote database not found

I have created a db link AM_ADMIN through SQL Developer: I am trying to check if it is a valid database link. When I test it from the SQL Developer wizard it is successful. But when I use the below command: SELECT * FROM dual@AM_ADMIN I'm getting…
Deepansh Anand
  • 71
  • 1
  • 1
  • 5
7
votes
3 answers

How do I create a Database Link where remote and local are the same server

I have a need to create a database link that is a link to a schema on the same server. Is there a special keyword to use for this? ( like local or localhost ) I am not entirely sure what the name of the server is in tnsnames and that may be part of…
Brian G
  • 53,704
  • 58
  • 125
  • 140
6
votes
1 answer

Can I chain database links in Oracle?

I have 3 databases. 1 links to 2, 2 links to 3. I'd like to query tables in 3, from 1. I tried third_db_tab@3@2 and it did not work. Wondering if this is possible and if so, what the syntax is.
aw crud
  • 8,791
  • 19
  • 71
  • 115
5
votes
2 answers

Oracle database link. Check for existence or overwrite?

I need to check if a database link already exists before I create one. How can I do that? I am writing an SQL script that starts with this: DROP DATABASE LINK mydblink then I create one: CREATE DATABASE LINK mydblink CONNECT TO testuser IDENTIFIED…
Oliver Nilsen
  • 1,017
  • 2
  • 12
  • 32
5
votes
1 answer

force Oracle to process recursive CTE on remote db site (perhaps using DRIVING_SITE hint)

I am trying to fetch data from remote table. The data is expanded from seed set of data in local table using recursive CTE. The query is very slow (300 seed rows to 800 final rows takes 7 minutes). For other "tiny local, huge remote"-cases with no…
Tomáš Záluský
  • 10,735
  • 2
  • 36
  • 64
5
votes
1 answer

ORA-03150: end-of-file on communication channel for database link

In an Oracle database there's a big PL/SQL procedure being executed periodically that copies data from one DB to another one through a database link and it is failing after some hours with the following error: ORA-03150: end-of-file on communication…
detoro84
  • 303
  • 1
  • 4
  • 14
4
votes
2 answers

Is transfer via database link in Oracle 10g compressed ? Is it possible?

I'm transferring data from one base to another via database links (using INSERT INTO SELECT ...). I want to know if data transferred through the link is compressed or can be compressed to avoid too much network use. I have very little bandwidth, and…
Fredv
  • 552
  • 1
  • 8
  • 22
4
votes
2 answers

Calling oracle function using database link

I have created a oracle function called getEmployee(id in varchar) in my remote database and I'm trying to call it from my local database using database link. In getEmployee, I'm trying to return a cursor with employee data.(Table: Employee (ID,…
Kapila Witharana
  • 61
  • 1
  • 2
  • 6
4
votes
4 answers

Create a Test Database copy of Production with only a sample set of Data

We have 2 Oracle databases. One is our Production customer database. The other is a test database. The Test database is a copy of production without any data...just empty tables. I am trying to come up with an efficient and effective way to copy…
aintnoprophet
  • 489
  • 4
  • 8
4
votes
2 answers

Oracle EXISTS query is not working as expected - DB Link bug?

I'm completely baffled by the results of this query: select count(*) from my_tab mt where mt.stat = '2473' and mt.name= 'Tom' and exists (select * from company_users@colink.world cu, personnel_records@colink.world pr …
aw crud
  • 8,791
  • 19
  • 71
  • 115
3
votes
1 answer

Retrieving numbers in ranges via Oracle SQL

I have a very slow query due to scanning through millions of records. The query searches for how many numbers are in a specific range. I have 2 tables: numbers_in_ranges and person table Create table numbers_in_ranges ( range_id number(9,0) , …
Mariana
  • 349
  • 3
  • 18
3
votes
1 answer

How to call function using dblink in oracle?

Is it possible to call a function using DBLINK in oracle? I am calling the function like this and getting the error - ORA-00904: "MC"."GET_REFTYPES": invalid identifier select column_value from table(mc.Get_REFTYPES@READ_MAIN_MCNAV(param1, param2,…
Kaur
  • 491
  • 2
  • 7
  • 19
3
votes
0 answers

Unable to create objects with db link; ORA - 0251: another session or branch in same transaction failed or finalized

I have a Heterogeneous Link between Oracle 11.2.0.3 and SQL Server 2008. When I attempt to create views, or procedures that reference the Heterogeneous Services views for system tables, I get 4 errors listed below: ORA-00604: error occured at…
Mackers
  • 1,039
  • 8
  • 21
1
2 3 4 5 6 7 8