Home » RDBMS Server » Networking and Gateways » Testing Private DB link with the same name as Public (10.2.0.4)
Testing Private DB link with the same name as Public [message #478932] Wed, 13 October 2010 12:51 Go to next message
lkngstr82is
Messages: 33
Registered: January 2010
Location: USA
Member
We are currently replacing all public database links with private db links in our prod environment. The requirement is

1) private db link name should be same as public
2) Need to create and test out private db links before we can drop public db links.

How can we test out private db links while public db links are still there with the same name?

when I execute SELECT * FROM DUAL@DBLINK from user who created this private db link, which db link it will be using- public or private?



Re: Testing Private DB link with the same name as Public [message #478933 is a reply to message #478932] Wed, 13 October 2010 12:55 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>when I execute SELECT * FROM DUAL@DBLINK from user who created this private db link, which db link it will be using- public or private?

some/many/most folks would test the possibilities rather than rely on strangers for proper functioning of their Production DB.

It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
Re: Testing Private DB link with the same name as Public [message #478935 is a reply to message #478932] Wed, 13 October 2010 13:07 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The path is always the same one: 1) check private object 2) check public object

Regards
Michel
Re: Testing Private DB link with the same name as Public [message #478936 is a reply to message #478933] Wed, 13 October 2010 13:17 Go to previous messageGo to next message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
You didn't say why you are replacing public links with private links, but would I be correct to assume that it is because of the security implications? If so, there is an alternative approach: combine public links with private links. The technique is that the DBA creates a public link that specifies the connection:
connect system/manager
create public database link l1 using 'jw';

then the users create private links with the same name specifying the log on to the remote database, using details known only to them (not to the DBA nor to anyone else):
connect jon/jon
create database link l1 connect to scott identified by tiger;

Then when the user attempts to use the link, his session will search his own namespace to find the incomplete private link, and complete it by searching the public namespace:
connect jon/jon
select count(*) from scott.dept@l1;

This implements a separation of duties, between the DBA who manages the networking and the users who manage the security.
Re: Testing Private DB link with the same name as Public [message #478937 is a reply to message #478935] Wed, 13 October 2010 13:18 Go to previous messageGo to next message
lkngstr82is
Messages: 33
Registered: January 2010
Location: USA
Member
Thanks Michel,

Is there any way I can verify this, since if private db link fails, it is going to use public without giving any error.
Re: Testing Private DB link with the same name as Public [message #478938 is a reply to message #478936] Wed, 13 October 2010 13:22 Go to previous messageGo to next message
lkngstr82is
Messages: 33
Registered: January 2010
Location: USA
Member
John,

Yes. This is for security reasons. We also have requirement to DROP existing public DB links. In this case, we can't use this approach.
Re: Testing Private DB link with the same name as Public [message #478939 is a reply to message #478937] Wed, 13 October 2010 13:23 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Is there any way I can verify this, since if private db link fails, it is going to use public without giving any error.
create new PUBLC DB_LINK & point it to "A"
create new private DB_LINK of same name & point it to "B"

issue SELECT & see which gets returned.
Re: Testing Private DB link with the same name as Public [message #478940 is a reply to message #478939] Wed, 13 October 2010 13:30 Go to previous messageGo to next message
lkngstr82is
Messages: 33
Registered: January 2010
Location: USA
Member
BlackSwan,

Both Public & Private DB links are pointing to the same target 'A'.
Re: Testing Private DB link with the same name as Public [message #478941 is a reply to message #478937] Wed, 13 October 2010 13:30 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
lkngstr82is wrote on Wed, 13 October 2010 20:18
Thanks Michel,

Is there any way I can verify this, since if private db link fails, it is going to use public without giving any error.

No, if the private database link you have an error.
You go to the public database link only if a private one does not exist.

Regards
Michel

Re: Testing Private DB link with the same name as Public [message #478942 is a reply to message #478940] Wed, 13 October 2010 13:32 Go to previous message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
lkngstr82is wrote on Wed, 13 October 2010 20:30
BlackSwan,

Both Public & Private DB links are pointing to the same target 'A'.

BlackSwan suggested this in order for you to be sure what happens not to make this in production.
This is for learning purpose and when you will learn you will be sure of what you have to do for the real problem.

Regards
Michel

Previous Topic: Listener Log
Next Topic: Multiple listeners
Goto Forum:
  


Current Time: Wed Apr 24 09:01:51 CDT 2024