Testing Private DB link with the same name as Public [message #478932] |
Wed, 13 October 2010 12:51 |
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 #478936 is a reply to message #478933] |
Wed, 13 October 2010 13:17 |
John Watson
Messages: 8962 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 #478942 is a reply to message #478940] |
Wed, 13 October 2010 13:32 |
|
Michel Cadot
Messages: 68729 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
lkngstr82is wrote on Wed, 13 October 2010 20:30BlackSwan,
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
|
|
|