How to find Oracle Service Name
I have an Oracle database on my network which I am able to connect to with Oracle SQL Developer, using hostname, port, username, password and the SID.
I need to connect another application (Quantum Gis), however it uses the Service Name instead of the SID.
Is there any way for me to determine the SERVICE_NAME of the database when I am connected in SQL Developer via the SID?
I do not have access to the server and have no local tnsnames.ora or similar.
oracle
|
show 1 more comment
I have an Oracle database on my network which I am able to connect to with Oracle SQL Developer, using hostname, port, username, password and the SID.
I need to connect another application (Quantum Gis), however it uses the Service Name instead of the SID.
Is there any way for me to determine the SERVICE_NAME of the database when I am connected in SQL Developer via the SID?
I do not have access to the server and have no local tnsnames.ora or similar.
oracle
3
Jakobsen:Just run the commandShow parameter service_name
– Gaurav Soni
Mar 14 '14 at 8:40
1
@GauravSoni AFAIKshow parameteris a SQL/Plus command, and I'm not sure whether SQL Developer supports a SQL/Plus prompt. If it doesn't, the OP could useselect * from v$parameter where name like '%service_name%'instead.
– Frank Schmitt
Mar 14 '14 at 8:46
1
"Show parameter service_name;" returns error "Show parameters query failed".
– Anders Jakobsen
Mar 14 '14 at 8:48
1
"select value from v$parameter where name like '%service_name%';" returns ORA-00942: table or view does not exist
– Anders Jakobsen
Mar 14 '14 at 8:48
@AndersJakobsen:you dint have access to the data dictionary views ,ask your DBA to give access or send you the service name .And may be sql developer support the sqlplus commands ,as toad also support that F5 is the command in toad to run such commands.
– Gaurav Soni
Mar 14 '14 at 8:52
|
show 1 more comment
I have an Oracle database on my network which I am able to connect to with Oracle SQL Developer, using hostname, port, username, password and the SID.
I need to connect another application (Quantum Gis), however it uses the Service Name instead of the SID.
Is there any way for me to determine the SERVICE_NAME of the database when I am connected in SQL Developer via the SID?
I do not have access to the server and have no local tnsnames.ora or similar.
oracle
I have an Oracle database on my network which I am able to connect to with Oracle SQL Developer, using hostname, port, username, password and the SID.
I need to connect another application (Quantum Gis), however it uses the Service Name instead of the SID.
Is there any way for me to determine the SERVICE_NAME of the database when I am connected in SQL Developer via the SID?
I do not have access to the server and have no local tnsnames.ora or similar.
oracle
oracle
asked Mar 14 '14 at 8:32
Anders JakobsenAnders Jakobsen
4151715
4151715
3
Jakobsen:Just run the commandShow parameter service_name
– Gaurav Soni
Mar 14 '14 at 8:40
1
@GauravSoni AFAIKshow parameteris a SQL/Plus command, and I'm not sure whether SQL Developer supports a SQL/Plus prompt. If it doesn't, the OP could useselect * from v$parameter where name like '%service_name%'instead.
– Frank Schmitt
Mar 14 '14 at 8:46
1
"Show parameter service_name;" returns error "Show parameters query failed".
– Anders Jakobsen
Mar 14 '14 at 8:48
1
"select value from v$parameter where name like '%service_name%';" returns ORA-00942: table or view does not exist
– Anders Jakobsen
Mar 14 '14 at 8:48
@AndersJakobsen:you dint have access to the data dictionary views ,ask your DBA to give access or send you the service name .And may be sql developer support the sqlplus commands ,as toad also support that F5 is the command in toad to run such commands.
– Gaurav Soni
Mar 14 '14 at 8:52
|
show 1 more comment
3
Jakobsen:Just run the commandShow parameter service_name
– Gaurav Soni
Mar 14 '14 at 8:40
1
@GauravSoni AFAIKshow parameteris a SQL/Plus command, and I'm not sure whether SQL Developer supports a SQL/Plus prompt. If it doesn't, the OP could useselect * from v$parameter where name like '%service_name%'instead.
– Frank Schmitt
Mar 14 '14 at 8:46
1
"Show parameter service_name;" returns error "Show parameters query failed".
– Anders Jakobsen
Mar 14 '14 at 8:48
1
"select value from v$parameter where name like '%service_name%';" returns ORA-00942: table or view does not exist
– Anders Jakobsen
Mar 14 '14 at 8:48
@AndersJakobsen:you dint have access to the data dictionary views ,ask your DBA to give access or send you the service name .And may be sql developer support the sqlplus commands ,as toad also support that F5 is the command in toad to run such commands.
– Gaurav Soni
Mar 14 '14 at 8:52
3
3
Jakobsen:Just run the command
Show parameter service_name– Gaurav Soni
Mar 14 '14 at 8:40
Jakobsen:Just run the command
Show parameter service_name– Gaurav Soni
Mar 14 '14 at 8:40
1
1
@GauravSoni AFAIK
show parameter is a SQL/Plus command, and I'm not sure whether SQL Developer supports a SQL/Plus prompt. If it doesn't, the OP could use select * from v$parameter where name like '%service_name%' instead.– Frank Schmitt
Mar 14 '14 at 8:46
@GauravSoni AFAIK
show parameter is a SQL/Plus command, and I'm not sure whether SQL Developer supports a SQL/Plus prompt. If it doesn't, the OP could use select * from v$parameter where name like '%service_name%' instead.– Frank Schmitt
Mar 14 '14 at 8:46
1
1
"Show parameter service_name;" returns error "Show parameters query failed".
– Anders Jakobsen
Mar 14 '14 at 8:48
"Show parameter service_name;" returns error "Show parameters query failed".
– Anders Jakobsen
Mar 14 '14 at 8:48
1
1
"select value from v$parameter where name like '%service_name%';" returns ORA-00942: table or view does not exist
– Anders Jakobsen
Mar 14 '14 at 8:48
"select value from v$parameter where name like '%service_name%';" returns ORA-00942: table or view does not exist
– Anders Jakobsen
Mar 14 '14 at 8:48
@AndersJakobsen:you dint have access to the data dictionary views ,ask your DBA to give access or send you the service name .And may be sql developer support the sqlplus commands ,as toad also support that F5 is the command in toad to run such commands.
– Gaurav Soni
Mar 14 '14 at 8:52
@AndersJakobsen:you dint have access to the data dictionary views ,ask your DBA to give access or send you the service name .And may be sql developer support the sqlplus commands ,as toad also support that F5 is the command in toad to run such commands.
– Gaurav Soni
Mar 14 '14 at 8:52
|
show 1 more comment
7 Answers
7
active
oldest
votes
Overview of the services used by all sessions provides the distionary view v$session(or gv$session for RAC databases) in the column SERVICE_NAME.
To limit the information to the connected session use the SID from the view V$MYSTAT:
select SERVICE_NAME from gv$session where sid in (
select sid from V$MYSTAT)
If the name is SYS$USERS the session is connected to a default service, i.e. in the connection string no explicit service_name was specified.
To see what services are available in the database use following queries:
select name from V$SERVICES;
select name from V$ACTIVE_SERVICES;
This just saysSYS$USERSfor me when I'm on the machine using SQL*Plus directly.
– jpmc26
Nov 19 '18 at 17:26
@jpmc26 SYS$USERS is the default service for user sessions that are not associated with services
– Marmite Bomber
Nov 19 '18 at 18:26
I gathered, but the fact it doesn't work when running on the same machine makes this answer much less useful than others.
– jpmc26
Nov 19 '18 at 18:30
1
@jpmc26 extended the answer thaks to your suggestion. It is important to distinct the connected service and the available services.
– Marmite Bomber
Nov 19 '18 at 18:45
add a comment |
Connect to the server as "system" using SID.
Execute this query:
select value from v$parameter where name like '%service_name%';
It worked for me.
1
for anyone who need some help please note that the url needs the sid and not the service name. The full service name didn't work for me:jdbc:oracle:thin:@localhost:1521:orcl.athens.intrasoft-intl.privatewhile this worked:jdbc:oracle:thin:@localhost:1521:orcl
– Georgios Pligoropoulos
Oct 6 '15 at 15:27
3
@GeorgePligor: Please note the difference:jdbc:oracle:thin:@HOST:PORT:SIDbutjdbc:oracle:thin:@HOST:PORT/SERVICEReplace the uppercase words by the correct values. Please note the difference between the two strings: in the sid string the name of the sid ist separated by a : from the preceding string, in the service string the name is separated by a / from the preceding string
– miracle173
May 10 '17 at 16:07
add a comment |
Found here, no DBA : Checking oracle sid and database name
select * from global_name;
Many thanks, this one worked for me from Oracle SQL Developer.
– Larry Smith
Oct 20 '16 at 22:17
thanks, service name is "XE" in my case.
– rahul.deshmukhpatil
Jan 22 '17 at 9:57
add a comment |
Check the service name of a database by
sql> show parameter service;
4
SHOW PARAMETERS;for everything.
– akki
Jul 26 '16 at 12:23
add a comment |
Thanks to this thread (https://community.oracle.com/thread/473276)
select sys_context('userenv','service_name') from dual;
It can be executed with a regular user account, no need for sysdba rights
10
All it returns is SYS$USERS. I did eventually get in contact with the DBA, so this is no longer an issue
– Anders Jakobsen
Mar 9 '15 at 14:08
This actually did return the current Service_name as defined in the TNSNames for me. Have an upvote.
– Marco
Oct 1 '15 at 9:07
It also worked for me - one more upvote
– TheRoadrunner
Oct 30 '15 at 9:20
2
returnedSYS$USERSin Oracle 12c for me (-1)...
– Betlista
Apr 27 '17 at 6:55
add a comment |
Connect to the database with the "system" user, and execute the following command:
show parameter service_name
add a comment |
With SQL Developer you should also find it without writing any query.
Right click on your Connection/Propriety.
You should see the name on the left under something like "connection details" and should look like "Connectionname@servicename", or on the right, under the connection's details.
No, it might SID or service name, you never know...
– Betlista
Apr 27 '17 at 6:54
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f22399766%2fhow-to-find-oracle-service-name%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
Overview of the services used by all sessions provides the distionary view v$session(or gv$session for RAC databases) in the column SERVICE_NAME.
To limit the information to the connected session use the SID from the view V$MYSTAT:
select SERVICE_NAME from gv$session where sid in (
select sid from V$MYSTAT)
If the name is SYS$USERS the session is connected to a default service, i.e. in the connection string no explicit service_name was specified.
To see what services are available in the database use following queries:
select name from V$SERVICES;
select name from V$ACTIVE_SERVICES;
This just saysSYS$USERSfor me when I'm on the machine using SQL*Plus directly.
– jpmc26
Nov 19 '18 at 17:26
@jpmc26 SYS$USERS is the default service for user sessions that are not associated with services
– Marmite Bomber
Nov 19 '18 at 18:26
I gathered, but the fact it doesn't work when running on the same machine makes this answer much less useful than others.
– jpmc26
Nov 19 '18 at 18:30
1
@jpmc26 extended the answer thaks to your suggestion. It is important to distinct the connected service and the available services.
– Marmite Bomber
Nov 19 '18 at 18:45
add a comment |
Overview of the services used by all sessions provides the distionary view v$session(or gv$session for RAC databases) in the column SERVICE_NAME.
To limit the information to the connected session use the SID from the view V$MYSTAT:
select SERVICE_NAME from gv$session where sid in (
select sid from V$MYSTAT)
If the name is SYS$USERS the session is connected to a default service, i.e. in the connection string no explicit service_name was specified.
To see what services are available in the database use following queries:
select name from V$SERVICES;
select name from V$ACTIVE_SERVICES;
This just saysSYS$USERSfor me when I'm on the machine using SQL*Plus directly.
– jpmc26
Nov 19 '18 at 17:26
@jpmc26 SYS$USERS is the default service for user sessions that are not associated with services
– Marmite Bomber
Nov 19 '18 at 18:26
I gathered, but the fact it doesn't work when running on the same machine makes this answer much less useful than others.
– jpmc26
Nov 19 '18 at 18:30
1
@jpmc26 extended the answer thaks to your suggestion. It is important to distinct the connected service and the available services.
– Marmite Bomber
Nov 19 '18 at 18:45
add a comment |
Overview of the services used by all sessions provides the distionary view v$session(or gv$session for RAC databases) in the column SERVICE_NAME.
To limit the information to the connected session use the SID from the view V$MYSTAT:
select SERVICE_NAME from gv$session where sid in (
select sid from V$MYSTAT)
If the name is SYS$USERS the session is connected to a default service, i.e. in the connection string no explicit service_name was specified.
To see what services are available in the database use following queries:
select name from V$SERVICES;
select name from V$ACTIVE_SERVICES;
Overview of the services used by all sessions provides the distionary view v$session(or gv$session for RAC databases) in the column SERVICE_NAME.
To limit the information to the connected session use the SID from the view V$MYSTAT:
select SERVICE_NAME from gv$session where sid in (
select sid from V$MYSTAT)
If the name is SYS$USERS the session is connected to a default service, i.e. in the connection string no explicit service_name was specified.
To see what services are available in the database use following queries:
select name from V$SERVICES;
select name from V$ACTIVE_SERVICES;
edited Nov 20 '18 at 6:25
answered Jul 5 '18 at 14:27
Marmite BomberMarmite Bomber
7,92731033
7,92731033
This just saysSYS$USERSfor me when I'm on the machine using SQL*Plus directly.
– jpmc26
Nov 19 '18 at 17:26
@jpmc26 SYS$USERS is the default service for user sessions that are not associated with services
– Marmite Bomber
Nov 19 '18 at 18:26
I gathered, but the fact it doesn't work when running on the same machine makes this answer much less useful than others.
– jpmc26
Nov 19 '18 at 18:30
1
@jpmc26 extended the answer thaks to your suggestion. It is important to distinct the connected service and the available services.
– Marmite Bomber
Nov 19 '18 at 18:45
add a comment |
This just saysSYS$USERSfor me when I'm on the machine using SQL*Plus directly.
– jpmc26
Nov 19 '18 at 17:26
@jpmc26 SYS$USERS is the default service for user sessions that are not associated with services
– Marmite Bomber
Nov 19 '18 at 18:26
I gathered, but the fact it doesn't work when running on the same machine makes this answer much less useful than others.
– jpmc26
Nov 19 '18 at 18:30
1
@jpmc26 extended the answer thaks to your suggestion. It is important to distinct the connected service and the available services.
– Marmite Bomber
Nov 19 '18 at 18:45
This just says
SYS$USERS for me when I'm on the machine using SQL*Plus directly.– jpmc26
Nov 19 '18 at 17:26
This just says
SYS$USERS for me when I'm on the machine using SQL*Plus directly.– jpmc26
Nov 19 '18 at 17:26
@jpmc26 SYS$USERS is the default service for user sessions that are not associated with services
– Marmite Bomber
Nov 19 '18 at 18:26
@jpmc26 SYS$USERS is the default service for user sessions that are not associated with services
– Marmite Bomber
Nov 19 '18 at 18:26
I gathered, but the fact it doesn't work when running on the same machine makes this answer much less useful than others.
– jpmc26
Nov 19 '18 at 18:30
I gathered, but the fact it doesn't work when running on the same machine makes this answer much less useful than others.
– jpmc26
Nov 19 '18 at 18:30
1
1
@jpmc26 extended the answer thaks to your suggestion. It is important to distinct the connected service and the available services.
– Marmite Bomber
Nov 19 '18 at 18:45
@jpmc26 extended the answer thaks to your suggestion. It is important to distinct the connected service and the available services.
– Marmite Bomber
Nov 19 '18 at 18:45
add a comment |
Connect to the server as "system" using SID.
Execute this query:
select value from v$parameter where name like '%service_name%';
It worked for me.
1
for anyone who need some help please note that the url needs the sid and not the service name. The full service name didn't work for me:jdbc:oracle:thin:@localhost:1521:orcl.athens.intrasoft-intl.privatewhile this worked:jdbc:oracle:thin:@localhost:1521:orcl
– Georgios Pligoropoulos
Oct 6 '15 at 15:27
3
@GeorgePligor: Please note the difference:jdbc:oracle:thin:@HOST:PORT:SIDbutjdbc:oracle:thin:@HOST:PORT/SERVICEReplace the uppercase words by the correct values. Please note the difference between the two strings: in the sid string the name of the sid ist separated by a : from the preceding string, in the service string the name is separated by a / from the preceding string
– miracle173
May 10 '17 at 16:07
add a comment |
Connect to the server as "system" using SID.
Execute this query:
select value from v$parameter where name like '%service_name%';
It worked for me.
1
for anyone who need some help please note that the url needs the sid and not the service name. The full service name didn't work for me:jdbc:oracle:thin:@localhost:1521:orcl.athens.intrasoft-intl.privatewhile this worked:jdbc:oracle:thin:@localhost:1521:orcl
– Georgios Pligoropoulos
Oct 6 '15 at 15:27
3
@GeorgePligor: Please note the difference:jdbc:oracle:thin:@HOST:PORT:SIDbutjdbc:oracle:thin:@HOST:PORT/SERVICEReplace the uppercase words by the correct values. Please note the difference between the two strings: in the sid string the name of the sid ist separated by a : from the preceding string, in the service string the name is separated by a / from the preceding string
– miracle173
May 10 '17 at 16:07
add a comment |
Connect to the server as "system" using SID.
Execute this query:
select value from v$parameter where name like '%service_name%';
It worked for me.
Connect to the server as "system" using SID.
Execute this query:
select value from v$parameter where name like '%service_name%';
It worked for me.
answered May 14 '15 at 18:42
user674669user674669
2,40242339
2,40242339
1
for anyone who need some help please note that the url needs the sid and not the service name. The full service name didn't work for me:jdbc:oracle:thin:@localhost:1521:orcl.athens.intrasoft-intl.privatewhile this worked:jdbc:oracle:thin:@localhost:1521:orcl
– Georgios Pligoropoulos
Oct 6 '15 at 15:27
3
@GeorgePligor: Please note the difference:jdbc:oracle:thin:@HOST:PORT:SIDbutjdbc:oracle:thin:@HOST:PORT/SERVICEReplace the uppercase words by the correct values. Please note the difference between the two strings: in the sid string the name of the sid ist separated by a : from the preceding string, in the service string the name is separated by a / from the preceding string
– miracle173
May 10 '17 at 16:07
add a comment |
1
for anyone who need some help please note that the url needs the sid and not the service name. The full service name didn't work for me:jdbc:oracle:thin:@localhost:1521:orcl.athens.intrasoft-intl.privatewhile this worked:jdbc:oracle:thin:@localhost:1521:orcl
– Georgios Pligoropoulos
Oct 6 '15 at 15:27
3
@GeorgePligor: Please note the difference:jdbc:oracle:thin:@HOST:PORT:SIDbutjdbc:oracle:thin:@HOST:PORT/SERVICEReplace the uppercase words by the correct values. Please note the difference between the two strings: in the sid string the name of the sid ist separated by a : from the preceding string, in the service string the name is separated by a / from the preceding string
– miracle173
May 10 '17 at 16:07
1
1
for anyone who need some help please note that the url needs the sid and not the service name. The full service name didn't work for me:
jdbc:oracle:thin:@localhost:1521:orcl.athens.intrasoft-intl.private while this worked: jdbc:oracle:thin:@localhost:1521:orcl– Georgios Pligoropoulos
Oct 6 '15 at 15:27
for anyone who need some help please note that the url needs the sid and not the service name. The full service name didn't work for me:
jdbc:oracle:thin:@localhost:1521:orcl.athens.intrasoft-intl.private while this worked: jdbc:oracle:thin:@localhost:1521:orcl– Georgios Pligoropoulos
Oct 6 '15 at 15:27
3
3
@GeorgePligor: Please note the difference:
jdbc:oracle:thin:@HOST:PORT:SID but jdbc:oracle:thin:@HOST:PORT/SERVICE Replace the uppercase words by the correct values. Please note the difference between the two strings: in the sid string the name of the sid ist separated by a : from the preceding string, in the service string the name is separated by a / from the preceding string– miracle173
May 10 '17 at 16:07
@GeorgePligor: Please note the difference:
jdbc:oracle:thin:@HOST:PORT:SID but jdbc:oracle:thin:@HOST:PORT/SERVICE Replace the uppercase words by the correct values. Please note the difference between the two strings: in the sid string the name of the sid ist separated by a : from the preceding string, in the service string the name is separated by a / from the preceding string– miracle173
May 10 '17 at 16:07
add a comment |
Found here, no DBA : Checking oracle sid and database name
select * from global_name;
Many thanks, this one worked for me from Oracle SQL Developer.
– Larry Smith
Oct 20 '16 at 22:17
thanks, service name is "XE" in my case.
– rahul.deshmukhpatil
Jan 22 '17 at 9:57
add a comment |
Found here, no DBA : Checking oracle sid and database name
select * from global_name;
Many thanks, this one worked for me from Oracle SQL Developer.
– Larry Smith
Oct 20 '16 at 22:17
thanks, service name is "XE" in my case.
– rahul.deshmukhpatil
Jan 22 '17 at 9:57
add a comment |
Found here, no DBA : Checking oracle sid and database name
select * from global_name;
Found here, no DBA : Checking oracle sid and database name
select * from global_name;
edited May 23 '17 at 12:03
Community♦
11
11
answered Aug 23 '16 at 14:05
GoufaliteGoufalite
1,39721120
1,39721120
Many thanks, this one worked for me from Oracle SQL Developer.
– Larry Smith
Oct 20 '16 at 22:17
thanks, service name is "XE" in my case.
– rahul.deshmukhpatil
Jan 22 '17 at 9:57
add a comment |
Many thanks, this one worked for me from Oracle SQL Developer.
– Larry Smith
Oct 20 '16 at 22:17
thanks, service name is "XE" in my case.
– rahul.deshmukhpatil
Jan 22 '17 at 9:57
Many thanks, this one worked for me from Oracle SQL Developer.
– Larry Smith
Oct 20 '16 at 22:17
Many thanks, this one worked for me from Oracle SQL Developer.
– Larry Smith
Oct 20 '16 at 22:17
thanks, service name is "XE" in my case.
– rahul.deshmukhpatil
Jan 22 '17 at 9:57
thanks, service name is "XE" in my case.
– rahul.deshmukhpatil
Jan 22 '17 at 9:57
add a comment |
Check the service name of a database by
sql> show parameter service;
4
SHOW PARAMETERS;for everything.
– akki
Jul 26 '16 at 12:23
add a comment |
Check the service name of a database by
sql> show parameter service;
4
SHOW PARAMETERS;for everything.
– akki
Jul 26 '16 at 12:23
add a comment |
Check the service name of a database by
sql> show parameter service;
Check the service name of a database by
sql> show parameter service;
answered Nov 23 '15 at 10:58
Dhyan MohandasDhyan Mohandas
658711
658711
4
SHOW PARAMETERS;for everything.
– akki
Jul 26 '16 at 12:23
add a comment |
4
SHOW PARAMETERS;for everything.
– akki
Jul 26 '16 at 12:23
4
4
SHOW PARAMETERS; for everything.– akki
Jul 26 '16 at 12:23
SHOW PARAMETERS; for everything.– akki
Jul 26 '16 at 12:23
add a comment |
Thanks to this thread (https://community.oracle.com/thread/473276)
select sys_context('userenv','service_name') from dual;
It can be executed with a regular user account, no need for sysdba rights
10
All it returns is SYS$USERS. I did eventually get in contact with the DBA, so this is no longer an issue
– Anders Jakobsen
Mar 9 '15 at 14:08
This actually did return the current Service_name as defined in the TNSNames for me. Have an upvote.
– Marco
Oct 1 '15 at 9:07
It also worked for me - one more upvote
– TheRoadrunner
Oct 30 '15 at 9:20
2
returnedSYS$USERSin Oracle 12c for me (-1)...
– Betlista
Apr 27 '17 at 6:55
add a comment |
Thanks to this thread (https://community.oracle.com/thread/473276)
select sys_context('userenv','service_name') from dual;
It can be executed with a regular user account, no need for sysdba rights
10
All it returns is SYS$USERS. I did eventually get in contact with the DBA, so this is no longer an issue
– Anders Jakobsen
Mar 9 '15 at 14:08
This actually did return the current Service_name as defined in the TNSNames for me. Have an upvote.
– Marco
Oct 1 '15 at 9:07
It also worked for me - one more upvote
– TheRoadrunner
Oct 30 '15 at 9:20
2
returnedSYS$USERSin Oracle 12c for me (-1)...
– Betlista
Apr 27 '17 at 6:55
add a comment |
Thanks to this thread (https://community.oracle.com/thread/473276)
select sys_context('userenv','service_name') from dual;
It can be executed with a regular user account, no need for sysdba rights
Thanks to this thread (https://community.oracle.com/thread/473276)
select sys_context('userenv','service_name') from dual;
It can be executed with a regular user account, no need for sysdba rights
answered Mar 5 '15 at 16:17
Carl BoschCarl Bosch
8691212
8691212
10
All it returns is SYS$USERS. I did eventually get in contact with the DBA, so this is no longer an issue
– Anders Jakobsen
Mar 9 '15 at 14:08
This actually did return the current Service_name as defined in the TNSNames for me. Have an upvote.
– Marco
Oct 1 '15 at 9:07
It also worked for me - one more upvote
– TheRoadrunner
Oct 30 '15 at 9:20
2
returnedSYS$USERSin Oracle 12c for me (-1)...
– Betlista
Apr 27 '17 at 6:55
add a comment |
10
All it returns is SYS$USERS. I did eventually get in contact with the DBA, so this is no longer an issue
– Anders Jakobsen
Mar 9 '15 at 14:08
This actually did return the current Service_name as defined in the TNSNames for me. Have an upvote.
– Marco
Oct 1 '15 at 9:07
It also worked for me - one more upvote
– TheRoadrunner
Oct 30 '15 at 9:20
2
returnedSYS$USERSin Oracle 12c for me (-1)...
– Betlista
Apr 27 '17 at 6:55
10
10
All it returns is SYS$USERS. I did eventually get in contact with the DBA, so this is no longer an issue
– Anders Jakobsen
Mar 9 '15 at 14:08
All it returns is SYS$USERS. I did eventually get in contact with the DBA, so this is no longer an issue
– Anders Jakobsen
Mar 9 '15 at 14:08
This actually did return the current Service_name as defined in the TNSNames for me. Have an upvote.
– Marco
Oct 1 '15 at 9:07
This actually did return the current Service_name as defined in the TNSNames for me. Have an upvote.
– Marco
Oct 1 '15 at 9:07
It also worked for me - one more upvote
– TheRoadrunner
Oct 30 '15 at 9:20
It also worked for me - one more upvote
– TheRoadrunner
Oct 30 '15 at 9:20
2
2
returned
SYS$USERS in Oracle 12c for me (-1)...– Betlista
Apr 27 '17 at 6:55
returned
SYS$USERS in Oracle 12c for me (-1)...– Betlista
Apr 27 '17 at 6:55
add a comment |
Connect to the database with the "system" user, and execute the following command:
show parameter service_name
add a comment |
Connect to the database with the "system" user, and execute the following command:
show parameter service_name
add a comment |
Connect to the database with the "system" user, and execute the following command:
show parameter service_name
Connect to the database with the "system" user, and execute the following command:
show parameter service_name
answered Apr 10 '16 at 17:25
Moiz SajidMoiz Sajid
150313
150313
add a comment |
add a comment |
With SQL Developer you should also find it without writing any query.
Right click on your Connection/Propriety.
You should see the name on the left under something like "connection details" and should look like "Connectionname@servicename", or on the right, under the connection's details.
No, it might SID or service name, you never know...
– Betlista
Apr 27 '17 at 6:54
add a comment |
With SQL Developer you should also find it without writing any query.
Right click on your Connection/Propriety.
You should see the name on the left under something like "connection details" and should look like "Connectionname@servicename", or on the right, under the connection's details.
No, it might SID or service name, you never know...
– Betlista
Apr 27 '17 at 6:54
add a comment |
With SQL Developer you should also find it without writing any query.
Right click on your Connection/Propriety.
You should see the name on the left under something like "connection details" and should look like "Connectionname@servicename", or on the right, under the connection's details.
With SQL Developer you should also find it without writing any query.
Right click on your Connection/Propriety.
You should see the name on the left under something like "connection details" and should look like "Connectionname@servicename", or on the right, under the connection's details.
answered Dec 2 '16 at 8:17
Andrea DiggelmannAndrea Diggelmann
107
107
No, it might SID or service name, you never know...
– Betlista
Apr 27 '17 at 6:54
add a comment |
No, it might SID or service name, you never know...
– Betlista
Apr 27 '17 at 6:54
No, it might SID or service name, you never know...
– Betlista
Apr 27 '17 at 6:54
No, it might SID or service name, you never know...
– Betlista
Apr 27 '17 at 6:54
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f22399766%2fhow-to-find-oracle-service-name%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
Jakobsen:Just run the command
Show parameter service_name– Gaurav Soni
Mar 14 '14 at 8:40
1
@GauravSoni AFAIK
show parameteris a SQL/Plus command, and I'm not sure whether SQL Developer supports a SQL/Plus prompt. If it doesn't, the OP could useselect * from v$parameter where name like '%service_name%'instead.– Frank Schmitt
Mar 14 '14 at 8:46
1
"Show parameter service_name;" returns error "Show parameters query failed".
– Anders Jakobsen
Mar 14 '14 at 8:48
1
"select value from v$parameter where name like '%service_name%';" returns ORA-00942: table or view does not exist
– Anders Jakobsen
Mar 14 '14 at 8:48
@AndersJakobsen:you dint have access to the data dictionary views ,ask your DBA to give access or send you the service name .And may be sql developer support the sqlplus commands ,as toad also support that F5 is the command in toad to run such commands.
– Gaurav Soni
Mar 14 '14 at 8:52