How to find Oracle Service Name












38















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.










share|improve this question


















  • 3





    Jakobsen:Just run the command Show parameter service_name

    – Gaurav Soni
    Mar 14 '14 at 8:40






  • 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








  • 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


















38















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.










share|improve this question


















  • 3





    Jakobsen:Just run the command Show parameter service_name

    – Gaurav Soni
    Mar 14 '14 at 8:40






  • 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








  • 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
















38












38








38


12






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.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 14 '14 at 8:32









Anders JakobsenAnders Jakobsen

4151715




4151715








  • 3





    Jakobsen:Just run the command Show parameter service_name

    – Gaurav Soni
    Mar 14 '14 at 8:40






  • 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








  • 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





    Jakobsen:Just run the command Show parameter service_name

    – Gaurav Soni
    Mar 14 '14 at 8:40






  • 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








  • 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














7 Answers
7






active

oldest

votes


















3














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;





share|improve this answer


























  • 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













  • 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



















42














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.






share|improve this answer



















  • 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








  • 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





















35














Found here, no DBA : Checking oracle sid and database name



select * from global_name;





share|improve this answer


























  • 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



















12














Check the service name of a database by



sql> show parameter service;






share|improve this answer



















  • 4





    SHOW PARAMETERS; for everything.

    – akki
    Jul 26 '16 at 12:23



















9














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






share|improve this answer



















  • 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





    returned SYS$USERS in Oracle 12c for me (-1)...

    – Betlista
    Apr 27 '17 at 6:55



















0














Connect to the database with the "system" user, and execute the following command:



show parameter service_name 





share|improve this answer































    -4














    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.






    share|improve this answer
























    • No, it might SID or service name, you never know...

      – Betlista
      Apr 27 '17 at 6:54











    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
    });


    }
    });














    draft saved

    draft discarded


















    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









    3














    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;





    share|improve this answer


























    • 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













    • 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
















    3














    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;





    share|improve this answer


























    • 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













    • 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














    3












    3








    3







    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;





    share|improve this answer















    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;






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 20 '18 at 6:25

























    answered Jul 5 '18 at 14:27









    Marmite BomberMarmite Bomber

    7,92731033




    7,92731033













    • 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













    • 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











    • @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













    42














    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.






    share|improve this answer



















    • 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








    • 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


















    42














    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.






    share|improve this answer



















    • 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








    • 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
















    42












    42








    42







    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.






    share|improve this answer













    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.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    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.private while 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: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
















    • 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








    • 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










    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













    35














    Found here, no DBA : Checking oracle sid and database name



    select * from global_name;





    share|improve this answer


























    • 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
















    35














    Found here, no DBA : Checking oracle sid and database name



    select * from global_name;





    share|improve this answer


























    • 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














    35












    35








    35







    Found here, no DBA : Checking oracle sid and database name



    select * from global_name;





    share|improve this answer















    Found here, no DBA : Checking oracle sid and database name



    select * from global_name;






    share|improve this answer














    share|improve this answer



    share|improve this answer








    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



















    • 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











    12














    Check the service name of a database by



    sql> show parameter service;






    share|improve this answer



















    • 4





      SHOW PARAMETERS; for everything.

      – akki
      Jul 26 '16 at 12:23
















    12














    Check the service name of a database by



    sql> show parameter service;






    share|improve this answer



















    • 4





      SHOW PARAMETERS; for everything.

      – akki
      Jul 26 '16 at 12:23














    12












    12








    12







    Check the service name of a database by



    sql> show parameter service;






    share|improve this answer













    Check the service name of a database by



    sql> show parameter service;







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 23 '15 at 10:58









    Dhyan MohandasDhyan Mohandas

    658711




    658711








    • 4





      SHOW PARAMETERS; for everything.

      – akki
      Jul 26 '16 at 12:23














    • 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











    9














    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






    share|improve this answer



















    • 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





      returned SYS$USERS in Oracle 12c for me (-1)...

      – Betlista
      Apr 27 '17 at 6:55
















    9














    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






    share|improve this answer



















    • 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





      returned SYS$USERS in Oracle 12c for me (-1)...

      – Betlista
      Apr 27 '17 at 6:55














    9












    9








    9







    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






    share|improve this answer













    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







    share|improve this answer












    share|improve this answer



    share|improve this answer










    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





      returned SYS$USERS in Oracle 12c for me (-1)...

      – Betlista
      Apr 27 '17 at 6:55














    • 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





      returned SYS$USERS in 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











    0














    Connect to the database with the "system" user, and execute the following command:



    show parameter service_name 





    share|improve this answer




























      0














      Connect to the database with the "system" user, and execute the following command:



      show parameter service_name 





      share|improve this answer


























        0












        0








        0







        Connect to the database with the "system" user, and execute the following command:



        show parameter service_name 





        share|improve this answer













        Connect to the database with the "system" user, and execute the following command:



        show parameter service_name 






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 10 '16 at 17:25









        Moiz SajidMoiz Sajid

        150313




        150313























            -4














            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.






            share|improve this answer
























            • No, it might SID or service name, you never know...

              – Betlista
              Apr 27 '17 at 6:54
















            -4














            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.






            share|improve this answer
























            • No, it might SID or service name, you never know...

              – Betlista
              Apr 27 '17 at 6:54














            -4












            -4








            -4







            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.






            share|improve this answer













            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.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            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



















            • 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


















            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            How to pass form data using jquery Ajax to insert data in database?

            National Museum of Racing and Hall of Fame

            Guess what letter conforming each word