Public or private database link. [message #669707] |
Tue, 08 May 2018 22:25 |
|
kalenko
Messages: 40 Registered: January 2018
|
Member |
|
|
Hi,
I have two database links, one public and one private, which have the same name SVBO and connect to the same remote database using the same remote user. Then I issue the following statement:
select sysdate from dual@svbo;
Please tell me the result is returned by public database link or private database link?
Thanks.
[Updated on: Tue, 08 May 2018 23:47] Report message to a moderator
|
|
|
|
|
Re: Public or private database link. [message #669721 is a reply to message #669714] |
Wed, 09 May 2018 07:41 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Would most people say that "tu" is acceptable here? As a native English speaker, I'm never sure about T-V distinction, so I always use "vous" because I think it's safer. Or does it sound ridiculous? It's the same in German, I use "Sie" rather the "du" unnecessarily.
|
|
|
|
|
Re: Public or private database link. [message #669726 is a reply to message #669707] |
Wed, 09 May 2018 08:34 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
kalenko wrote on Wed, 09 May 2018 04:25Hi,
I have two database links, one public and one private, which have the same name SVBO and connect to the same remote database using the same remote user. Then I issue the following statement:
select sysdate from dual@svbo;
Please tell me the result is returned by public database link or private database link?
Thanks.
OK, here is how you meant to do it (and please be sure to reply):
Create a public link that contains only the USING clause, no credentials. Then create a private link with the same name that contains only the CONNECT TO clause. When you use the link, your session will search your private namespace to find the credentials then go to the public namespace to find the destination. This lets your users manage their own passwords and you the DBA can control the networking. All about security, you know.
|
|
|
|
|
|
Re: Public or private database link. [message #669779 is a reply to message #669726] |
Fri, 11 May 2018 03:37 |
|
kalenko
Messages: 40 Registered: January 2018
|
Member |
|
|
John Watson wrote on Wed, 09 May 2018 08:34kalenko wrote on Wed, 09 May 2018 04:25Hi,
I have two database links, one public and one private, which have the same name SVBO and connect to the same remote database using the same remote user. Then I issue the following statement:
select sysdate from dual@svbo;
Please tell me the result is returned by public database link or private database link?
Thanks.
OK, here is how you meant to do it (and please be sure to reply):
Create a public link that contains only the USING clause, no credentials. Then create a private link with the same name that contains only the CONNECT TO clause. When you use the link, your session will search your private namespace to find the credentials then go to the public namespace to find the destination. This lets your users manage their own passwords and you the DBA can control the networking. All about security, you know.
No, my idea is not as complicated as you said. I simply create two database links using the following statements:
create database link SVBO
connect to VBCMS identified by "123"
using 'vbgrid';
create public database link SVBO
connect to VBCMS identified by "123"
using 'vbgrid';
and then I query the svbo database link, I do not know the svbo expression refer to which database link.
[Updated on: Fri, 11 May 2018 03:52] Report message to a moderator
|
|
|
Re: Public or private database link. [message #669834 is a reply to message #669779] |
Wed, 16 May 2018 00:17 |
|
Littlefoot
Messages: 21822 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
In my company, everyone has a pencil. Though, there's one, down in the hall, that everyone can use. When I need a pencil, I first look for it in my room (i.e. I prefer writing with the private pen). If I can't find it, then I go out and use the public one.
I presume the same goes for database links - if there's a private one, I'll use it first. If not, I'll look for a public DB link.
|
|
|
Re: Public or private database link. [message #669844 is a reply to message #669779] |
Wed, 16 May 2018 06:52 |
|
EdStevens
Messages: 1376 Registered: September 2013
|
Senior Member |
|
|
kalenko wrote on Fri, 11 May 2018 03:37John Watson wrote on Wed, 09 May 2018 08:34kalenko wrote on Wed, 09 May 2018 04:25Hi,
I have two database links, one public and one private, which have the same name SVBO and connect to the same remote database using the same remote user. Then I issue the following statement:
select sysdate from dual@svbo;
Please tell me the result is returned by public database link or private database link?
Thanks.
OK, here is how you meant to do it (and please be sure to reply):
Create a public link that contains only the USING clause, no credentials. Then create a private link with the same name that contains only the CONNECT TO clause. When you use the link, your session will search your private namespace to find the credentials then go to the public namespace to find the destination. This lets your users manage their own passwords and you the DBA can control the networking. All about security, you know.
No, my idea is not as complicated as you said. I simply create two database links using the following statements:
create database link SVBO
connect to VBCMS identified by "123"
using 'vbgrid';
create public database link SVBO
connect to VBCMS identified by "123"
using 'vbgrid';
and then I query the svbo database link, I do not know the svbo expression refer to which database link.
He wasn't saying to set it up that way as a matter of general use. He was saying that if you set up two links as he described, you could use that as a test to see for yourself which one is used, because the two would behave differently. Ergo, you would know from the behavior of the link if it was the public or the private one.
|
|
|