Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Service name through DB LInk

kparthiJul 24 2017 — edited Jul 24 2017

Is it possible to find the Oracle service name through DB link?

-- We can find the service name from the sessoin through the below query

select  sys_context('userenv','service_name') from dual ; --op: Dev

-- I am having a request for finding the service name throught db link

select sys_context('userenv','service_name') from dual@db_link; --op: Dev /////expected OP-Dev2

--but the problem is both the out put returns the same service_name

SELECT * FROM V$VERSION ;

/*

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

PL/SQL Release 11.2.0.4.0 - Production

"CORE 11.2.0.4.0 Production"

TNS for Linux: Version 11.2.0.4.0 - Production

NLSRTL Version 11.2.0.4.0 - Production

*/

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2017
Added on Jul 24 2017
4 comments
985 views