Home » RDBMS Server » Networking and Gateways » Public or private database link. (oracle 11gr2)
Public or private database link. [message #669707] Tue, 08 May 2018 22:25 Go to next message
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 #669709 is a reply to message #669707] Wed, 09 May 2018 00:17 Go to previous messageGo to next message
Michel Cadot
Messages: 68712
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

Can't help you as I'm still blocked waiting for your answer and complete feedback in your previous topic.

Re: Public or private database link. [message #669714 is a reply to message #669709] Wed, 09 May 2018 04:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68712
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

Received in PM:

kalenko wrote on Wed, 09 May 2018 09:44
Vas t'en Michel, tu me demandes trop.
Translation:

Quote:
Go away Michel, you ask me too much.
Re: Public or private database link. [message #669721 is a reply to message #669714] Wed, 09 May 2018 07:41 Go to previous messageGo to next message
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 #669722 is a reply to message #669707] Wed, 09 May 2018 07:49 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
kalenko wrote on Tue, 08 May 2018 20:25
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.
How will you decide which response is correct?

Show us what is done differently depending upon which DBLINK is used.
Re: Public or private database link. [message #669724 is a reply to message #669721] Wed, 09 May 2018 08:14 Go to previous messageGo to next message
Michel Cadot
Messages: 68712
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

Quote:
Would most people say that "tu" is acceptable here?
Well, when you say "go away" to someone I doubt that a respectful "you" is implied, so "tu" (and "t'") is the correct semantic word, "vous" would be weird. Smile

Re: Public or private database link. [message #669726 is a reply to message #669707] Wed, 09 May 2018 08:34 Go to previous messageGo to next message
John Watson
Messages: 8960
Registered: January 2010
Location: Global Village
Senior Member
kalenko wrote on Wed, 09 May 2018 04:25
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.
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 #669727 is a reply to message #669724] Wed, 09 May 2018 08:35 Go to previous messageGo to next message
John Watson
Messages: 8960
Registered: January 2010
Location: Global Village
Senior Member
Vous êtes très gentille, Monsieur.

I did once accidentally say "jolie" instead of "gentille" Sad
Re: Public or private database link. [message #669733 is a reply to message #669714] Wed, 09 May 2018 09:55 Go to previous messageGo to next message
kalenko
Messages: 40
Registered: January 2018
Member
Michel Cadot wrote on Wed, 09 May 2018 04:09

Received in PM:

kalenko wrote on Wed, 09 May 2018 09:44
Vas t'en Michel, tu me demandes trop.
Translation:

Quote:
Go away Michel, you ask me too much.
You can translate "demander" verb into English as "request" or "require". You've got me all wrong.
Re: Public or private database link. [message #669734 is a reply to message #669733] Wed, 09 May 2018 09:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68712
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

So better write it in English.
Anyway, the main point in your message is "Go away".

Re: Public or private database link. [message #669779 is a reply to message #669726] Fri, 11 May 2018 03:37 Go to previous messageGo to next message
kalenko
Messages: 40
Registered: January 2018
Member
John Watson wrote on Wed, 09 May 2018 08:34
kalenko wrote on Wed, 09 May 2018 04:25
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.
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 Go to previous messageGo to next message
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 Go to previous message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
kalenko wrote on Fri, 11 May 2018 03:37
John Watson wrote on Wed, 09 May 2018 08:34
kalenko wrote on Wed, 09 May 2018 04:25
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.
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.
Previous Topic: Listner Service gone missing
Next Topic: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Goto Forum:
  


Current Time: Tue Nov 12 19:09:29 CST 2024