database-link

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 mySchema.myPackage.myProcedure('someParameter')@myRemoteDB ...

Network Outage Causes Stored Procedure Querying Across DB Link to Hang Forever

A number of stored procedures I support query remote databases over a WAN. The network occasionally goes down, but the worst that ever happened was the procedures failed and would have to be restarted. The last couple weeks it's taken a sinister turn. Instead of failing the procedures hang in a wierd locked state. They can't be kille...

Transferring MySQL Database Link Across Multiple PHP Pages

Are there any tricks to transferring and/or sharing the Resource Links across multiple PHP pages? I do not want the server to continue connecting to the database just to obtain another link to the same user in the same database. Remember that the link returned from mysql_connect() is automatically closed after the script it originated o...

How does one cheaply validate the existance of a column in a table in another schema with Oracle?

The environment is Oracle 9 & 10. I do not have DBA level access. The problem is to verify that a specific column exists in a specific table, in another schema. There are two cases to deal with. Another schema in the same instance A schema in a different instance, using a db_link Given my schema FRED and another schema BARNEY...

Problem when changing context (impersonation) and using a server link in SQL Server 2005

I get a strange behaviour when I combine impersonation with database links in SQL Server 2005. First, I connect to a database server using simple SQL Server Authentication with Login 'John'. On this server, a server link remote_sqlserver is defined. I already have SELECT privileges for mydb in this server. When I simply query a table on ...

Help With Database Layout

Hello everyone, I am working on a site similar to Craigslist where users can make postings and sell items in different cities. One difference between my site and Craigslist will be you will be able to search by zip code instead of having all of the cities listed on the page. I already have the ZIP Code database that has all of the city,...

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 my problem. This is for a complicated situation which involves a script that needs a da...

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 [email protected] cu, [email protected] pr where cu.user_id = pr.user_id and mt.name = pr.name and m...

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. ...

Database Links - Oracle 10g and Ms Access 2007

I'm trying to create a link between oracle 10g and ms access 2007 but I don't know how to set parameters in my tnsnames.ora file to access my MS Access db. I've created new Data Source in ODBC Data Source Administrator with Microsoft Access Driver and selected my access db (.mdb). In the MS Access I can link between tables and I see da...

Dynamic DB links in Oracle

Is it possible to have dynamic database links in Oracle? I am using Oracle9i database. Let me illustrate by what I require. I have several views that are formed using dblinks. For example: CREATE VIEW MYVIEW AS SELECT * FROM [email protected] mydbLINK.WORLD NEEDS TO POINT TO DIFFERENT INSTANCES OF THE DATABASE. SO AT ONE POINT IT ...