What is the sql SELECT statement to list all service names in the database?

What is the sql SELECT statement to list all service names in the database?

I tried
SELECT name FROM dba_services
But a long with valid service, he list also some other documents that are not the names of services.

Hello

You can try this query:

select name, value from v$parameter where name = 'service_names';

Hope this helps.
Best regards
Jean Valentine

Tags: Database

Similar Questions

  • SQL SELECT statement as a parameter in the procedure of string

    Hi all

    I'm new to PL/SQL and I must get a procedure as parameter select SQL select statement as a VARCHAR and the production output the result of the statement with a few changes. Can someone help me solve this problem?

    A possibility I thought at was to use a REF CURSOR. The following example works but binds me to a specific table (in the example of the "customers" table). However, I need the ability to specify arbitrary tables in the select statement parameter.
    SET SERVEROUTPUT ON
    DECLARE
      TYPE my_cur IS REF CURSOR;
      query_cursor my_cur;
    BEGIN
      OPEN query_cursor FOR 'SELECT * FROM customers';
      DECLARE
        record_type customers%ROWTYPE;
      BEGIN
         LOOP
            FETCH query_cursor INTO record_type;
            EXIT WHEN query_cursor%NOTFOUND;
            DBMS_OUTPUT.PUT_LINE('some output ... ');
         END LOOP;
      END;
      CLOSE query_cursor;
    END;
    /
    My idea was to modify this example to work in the following code, but it does not work (I get a compile error):
    SET SERVEROUTPUT ON
    DECLARE
      TYPE my_cur IS REF CURSOR;
      query_cursor my_cur;
    BEGIN
    
      OPEN query_cursor FOR 'SELECT * FROM customers';
    
      DECLARE
        record_type query_cursor%ROWTYPE;
      BEGIN
         LOOP
            FETCH query_cursor INTO record_type;
            EXIT WHEN query_cursor%NOTFOUND;
            DBMS_OUTPUT.PUT_LINE('some output ... ');
         END LOOP;
      END;
      
      CLOSE query_cursor;
    
    END;
    /
    Does anyone has an idea how can I solve my problem?

    Thank you very much!
    (I'm using Oracle 11 g)

    This can help.
    Re: Dynamic Extraction on dynamic Sql

  • NULL in PL/SQL SELECT statement..

    Hi all

    I need to use as a result of a SELECT statement in my function to get PCODE from the table. Cur_rec here. CODE comes from cursor that runs before the declaration.

    SELECT PCODE in v_pcode TABLE_XYZ where CODE = cur_rec. CODE and PCODE = 'VIEW '.


    Now the problem is the part of the CODE has all the information in the table TABLE_XYZ. In this case, it triggers an error NO_DATA_FOUND. To solve it, I can put a part of the EXCEPTION and handle it. But I think in another way...

    If there is no data for a CODE, the default value of v_pcode would be 'No Code'. I tried to use the NVL function, but it does not work here as a SQL SELECT statement.

    Can someone give an idea how to achieve this?

    Hello

    declare
      ...
      v_cnt number;
    begin
      SELECT count(*)
           into v_cnt
          from TABLE_XYZ
        where CODE = cur_rec.CODE
           and PCODE='SEE';
      if v_cnt=0 then
        v_pcode = 'No code';
      else
        v_pcode = 'SEE';
      end if;
    end;
    

    Bartek

  • A web application from merger can also run on Smartphones? So what of the database for mobile?

    Mr President.

    A web application from merger can also run on Smartphones? So what of the database for mobile?

    Concerning

    Any web application can run on smart phone because you access this browser so no need of database or application server on your mobile phone

    It's the same access to a Web site on mobile

    If you are talking about the mobile app

    check - http://www.oracle.com/technetwork/developer-tools/adf-mobile/overview/adfmobile-1917693.html

    Ashish

  • SQL select statements

    Hey everybody,

    First of all, Yes, I searched through the 8.5 database schema guide.  As I went through the scheme, I've developed some ideas on how to collect the data you want.  However, if someone has already developed or found the SQL statements (which I'm sure that someone already has) it would help by reducing to the minimum of the buggs in my data collection program.

    All these statistics must be grouped by CSQ and selected for a certain time interval ( and ).  That is, levels of 1 hour.  I have no problem to get a list of results and then perform v.f. to achieve the desired final result.  Also, if I need to run several select statements for tables of essentially two join, please include two statements.  Finally, I saw the RtCSQsSummary table, but I need to collect data for the past, not at this time.

    1 total calls presented by the CSQ

    2. total number of calls answered by the CSQ

    3 total number of calls abandoned by the CSQ

    4. percentage of calls abandoned by CSQ (if it is not stored in the database, I think: /)

    5. average abandon time in seconds (if it is not stored in the DB, I think: sum () /)

    6. service level - % calls answered in 90 seonds by a set of skills (I have seen metServiceLevel in the ContactQueueDetail table; however, I need to find how to configure this threshold for application)

    7. average speed of response by CSQ

    8 average conversation by CSQ calls

    9. the aggregates connected full-time resources or agents CSQ

    10. resources/agents of CSQ ready time

    I realize that some of them should be easy to find (as I always am search in the guide of db schema), but I was reading how a new record is created for each step of the call so I could easily see how I could get inaccurate information without properly developed select statements.

    Any help will be greatly appreciated.

    Brendan

    Brendan,

    I read your message very well.

    You have the schema of database with tables and description. each table has its associated tables (connected with primary and foreign keys). I think you should start the tables to determine what you need.

    Cisco uses the stored procedure to prepare the reports. the stored procedure is 'sp_csq_interval' to create the report.

    Activity report of Queue Service contact"

    HTH

    Anas

    Please note all useful posts

  • What is the database and user call?

    There is no stats appointed as "data call" in v$ statname, but there is a stats named as "call for the user. Are they the same? And what is the meaning of the call to the database? 10046 trace raw file, there are something like, analysis, fetch, exec, waiting. All of them are "database call"? And someone said "call database" is a BEAK function, anyone could put more information?

    Thank you
    Daniel

    You can read about the database calls in this great book, and one user call definitions is here

  • What are the databases, we can use with html5 in playbook

    What is the best database used with html5 in playbook

    The answer lies in the developer site very well documented of the RIM:

    https://bdsc.webapps.BlackBerry.com/HTML5/APIs/database.html

    LocalStorage might be easier to use:

    https://bdsc.webapps.BlackBerry.com/HTML5/APIs/localStorage.html

  • srvctl command is not list all services of 11gRAC

    Hello

    I configured twon node 11g RAC (11.2.0.1.0) in OEL5. But the command srvctl tilts not any service, as shown below.

    [oracle@racone bin] $. / service d RAC srvctl status

    [oracle@racone bin] $

    But the listener services work fine.

    In the node a

    ============


    Oracle 5032 1 0 11:02?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr EARPHONE-inherit

    Oracle 5036 1 0 11:02?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1-inherit

    Oracle 6226 5221 0 11:15 pts/1 00:00:00 grep tns

    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on October 3, 2015 11:21:26

    Copyright (c) 1991, 2009, Oracle.  All rights reserved.

    Connection to (ADDRESS = (PROTOCOL = tcp)(HOST=) (PORT = 1521))

    STATUS of the LISTENER

    ------------------------

    Alias LISTENER

    Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production

    Start date October 3, 2015 11:02:47

    Uptime 0 days 0 h 18 min 40 sec

    Draw level off

    Security ON: OS Local Authentication

    SNMP OFF

    Parameter Listener of the /u01/app/11.2.0/grid/network/admin/listener.ora file

    The listener log file /U01/app/Oracle/diag/tnslsnr/racone/listener/alert/log.XML

    Summary of endpoints listening...

    (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = LISTENER)))

    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=192.168.32.151) (PORT = 1521)))

    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=192.168.32.155) (PORT = 1521)))

    Summary of services...

    Service '+ ASM' a 1 instance (s).

    Instance '+ ASM1' READY State, has 1 operation for this service...

    'CARS' service has 1 instance (s).

    Instance "RAC1" READY State, has 1 operation for this service...

    Service 'RACXDB' has 1 instance (s).

    Instance "RAC1" READY State, has 1 operation for this service...

    The command completed successfully

    In the two node

    ============

    Oracle 4990 1 0 11:02?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr EARPHONE-inherit

    Oracle 5034 1 0 11:02?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN3-inherit

    Oracle 5044 1 0 11:02?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN2-inherit

    Oracle 6407 5239-0 11:15 pts/1 00:00:00 grep tns

    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on October 3, 2015 11:23:26

    Copyright (c) 1991, 2009, Oracle.  All rights reserved.

    Connection to (ADDRESS = (PROTOCOL = tcp)(HOST=) (PORT = 1521))

    STATUS of the LISTENER

    ------------------------

    Alias LISTENER

    Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production

    Start date October 3, 2015 11:02:39

    Uptime 0 days 0 h 20 min 46 sec

    Draw level off

    Security ON: OS Local Authentication

    SNMP OFF

    Parameter Listener of the /u01/app/11.2.0/grid/network/admin/listener.ora file

    The listener log file /U01/app/Oracle/diag/tnslsnr/ractwo/listener/alert/log.XML

    Summary of endpoints listening...

    (DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = LISTENER)))

    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=192.168.32.152) (PORT = 1521)))

    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=192.168.32.156) (PORT = 1521)))

    Summary of services...

    Service '+ ASM' a 1 instance (s).

    Instance '+ ASM2' READY State, has 1 operation for this service...

    'CARS' service has 1 instance (s).

    Instance "RAC2" READY State, has 1 operation for this service...

    Service 'RACXDB' has 1 instance (s).

    Instance "RAC2" READY State, has 1 operation for this service...

    The command completed successfully

    I want to mention the name of the service in tnsentry in the new host and connect to the RAC database using tnsname.

    Kind regards

    007

    Hi all

    I solved this problem. Remote_listener parameter has not been set, and after that I am able to connect to the database using scan ip.

    Thank you all for your answers.

    Kind regards

    007

  • With the help of inplace column number of the column name in the SQL Select statement

    Is it possible to execute instructions select sql with the number of columns in
    place names of columns?

    Run SQL
    select AddressId,Name,City from Address
    Is it possible
    select 1,2,5 from Address
    Thanks in advance

    You can extract the names of the columns for user_tab_columns
    with

    SELECT Column_name
    FROM user_tab_columns
    where table_name = 'MY_TABLE'
    and Column_id in (1,2,5)
    

    Use dynamic SQL and then the result to get the values.

    But as others already mentioned, this wil it be given incorrect if your table is changed.

  • Invalid identifier on the Select statement

    New to SQL. I'm having some trouble with a function.
    Assignment is:
    1. develop and execute a CREATE FUNCTION statement to create the DAY_ORD_SF function. Use the column DTCREATED table bb_basket as the date that the basket was created. Call the function TO_CHAR using the option of the DAY to extract the day of the week for a date value.
    1. create a SELECT statement that lists the basket id and the day of the week set for each basket.
    3. create a SELECT with a GROUP BY clause query to list the total number of baskets by day of the week. Who is the most popular of a day shopping? (Should discover that it is FRIDAY).

    So far, I have the function:
    CREATE OR REPLACE FUNCTION DAY_ORD_SF (P_ORDER_DATE IN BB_BASKET.DTORDERED%TYPE)
     RETURN VARCHAR2
     IS
       LV_DAY_WK VARCHAR2(3);
    BEGIN
     SELECT TO_CHAR(P_ORDER_DATE, 'DAY') 
      INTO LV_DAY_WK
      FROM BB_BASKET
      WHERE P_ORDER_DATE = DTORDERED;
     RETURN LV_DAY_WK;
    END;
    /
    Have you tried a select invalid identifier and get on o_dt. have you tried several different variables and impossible to find one that works.
    SELECT DAY_ORD_SF(O_DT) "DAY", COUNT(*)
    FROM BB_BASKET
    GROUP BY DAY_ORD_SF(O_DT)
    ;
    Any help would be appreciated.

    >
    DTCREATED is a column name in the table BB_BASKET. When I pass O_DT to DTCREATED, I get an error:
    >
    So track what causes this error. Your instructions were to use DTCREATED.

    You use this query in your service

    SELECT TO_CHAR(P_ORDER_DATE, 'DAY')
      INTO LV_DAY_WK
      FROM BB_BASKET
      WHERE P_ORDER_DATE = DTORDERED;
    

    And the error tells you that LV_DAY_WK is too small. Why is it too small? Look at how it is defined and then look at the results of this query

    SELECT TO_CHAR(DTCREATED, 'DAY')
      FROM BB_BASKET
    

    and see if you can see what the problem is.

    You do your development backward. Failed to start by trying to call a function that does not work. And you can't start by writing a function that includes queries that have not been tested.

    The right way to generate code is to create simple components. Then test these simple components (for example a query) to ensure they work. Then mix the simple components in a component more complex as a function. Then, you can test the function of another request call.

    The key is to start with simple things that work.

  • What is the problem with my sql says invalid identifier

    CREATE THE TABLE PROJECT

    (proj # NUMBER (6) NOT NULL,)

    p_name VARCHAR2 (15) NOT NULL,

    p_desc VARCHAR2 (150) NOT NULL,

    p_budget NUMBER (8).

    CONSTRAINT project_proj PRIMARY KEY #pname_pk (proj #, p_name));

    CREATE TABLE WORK ORDERS

    (wo # NUMBER (6))

    proj # NUMBER (6).

    wo_desc VARCHAR2 (150).

    wo_assigned VARCHAR2 (30),

    wo_hours NUMBER (5),

    wo_start DATE,

    wo_due DATE,

    wo_complete char (1),

    CONSTRAINT workorders_wo #_pk KEY(wo#) primary SCHOOL.

    CONSTRAINT workorders_wo #_fk FOREIGN KEY (proj #)

    REFERENCES PROJECT (proj #).

    Workorders_wodesc_uk of CONSTRAINT UNIQUE (wo_desc).

    CONSTRAINT workorders_hours_ck CHECK (wo_hours > = 0).

    CONSTRAINT workorders_wocomplete_ck CHECK (wo_complete in ('Y', 'n')));

    Whenever you have an error message the best thing to do is post a copy of your session with your statement sqlplus output. Like this.

    I have no problem with your first statement regarding the syntax and semantics

    SQL> create table project
      2  (
      3  proj# number(6) not null,
      4  p_name varchar2(15)not null,
      5  p_desc varchar2(150)not null,
      6  p_budget number(8),
      7  constraint project_proj#pname_pk primary key (proj#, p_name)
      8  );
    
    Table created.
    

    Second table a problem that his tent to make reference to project.proj #. But the problem is that it doesn't have a primary or unique key defined in this topic.

    SQL> create table workorders
      2  (
      3  wo# number(6),
      4  proj# number(6),
      5  wo_desc varchar2(150),
      6  wo_assigned varchar2(30),
      7  wo_hours number(5),
      8  wo_start date,
      9  wo_due date,
     10  wo_complete char(1),
     11  constraint workorders_wo#_pk primary key(wo#),
     12  constraint workorders_wo#_fk foreign key (proj#)
     13  references project (proj#),
     14  constraint workorders_wodesc_uk unique (wo_desc),
     15  constraint workorders_hours_ck check (wo_hours >=0),
     16  constraint workorders_wocomplete_ck check (wo_complete in ('y' ,'n'))
     17  );
    references project (proj#),
                        *
    ERROR at line 13:
    ORA-02270: no matching unique or primary key for this column-list
    

    I defined a

    SQL> alter table project add constraint project_proj#_uk unique (proj#);
    
    Table altered.
    

    Now, the second table is also created correctly

    SQL> create table workorders
      2  (
      3  wo# number(6),
      4  proj# number(6),
      5  wo_desc varchar2(150),
      6  wo_assigned varchar2(30),
      7  wo_hours number(5),
      8  wo_start date,
      9  wo_due date,
     10  wo_complete char(1),
     11  constraint workorders_wo#_pk primary key(wo#),
     12  constraint workorders_wo#_fk foreign key (proj#)
     13  references project (proj#),
     14  constraint workorders_wodesc_uk unique (wo_desc),
     15  constraint workorders_hours_ck check (wo_hours >=0),
     16  constraint workorders_wocomplete_ck check (wo_complete in ('y' ,'n'))
     17  );
    
    Table created.
    
    SQL>
    

    My Version of DB's

    SQL> select * from v$version where rownum = 1;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    
    SQL>
    
  • A loop using the SQL select query.

    Hello

    I wanted to know, if the concept of loop is possible thanks to the SQL select statement.

    For example
    =======

    Table T1

    Col1 Col2
    Slim 10

    I want to write a query in such a way, so that when I get the result of the query, I format below.

    Col1 Col2
    Slim 10
    Slim 10
    Slim 10

    Basically what I'm trying to achieve is, I have a table with two columns and it has a single line displayed above.

    I want to display this line several times as the output of my SELECT query.

    Let me know, if this target is achievable.

    Kind regards
    Saurabh

    Like this?

    SQL> SELECT 10 col1, 'Sourabh' col2
      2    FROM DUAL
      3  CONNECT BY LEVEL <= 3;
    
          COL1 COL2
    ---------- -------
            10 Sourabh
            10 Sourabh
            10 Sourabh
    
    SQL> 
    
  • There are two select statement, which are as follows: 1) select project id, the name of ppm.pm_projects project_name and request_id 2) select id, name from request_type_name to kcrt_request_details. There is a column called entity that allows you to store

    There are two select statement, which are as follows: 1) select project id, the name of ppm.pm_projects project_name and request_id 2) select id, name from request_type_name to kcrt_request_details. There is a column called entity that can store a value i.e. project or request. I want to write a select statement containing a condition that is if the entity name is project and then run the select statement 1 otherwise, if the name of the entity's request, then run the select statement 2. All this must be written in a select statement. Can someone help me how to write this select statement type.

    Hello

    Hello

    2726057 wrote:

    ... There is a column called entity that can store a value i.e. project or request. ...

    In which table is this column?  Assuming that it is in a table called entity_table, you can do something like this:

    SELECT project AS id

    project name AS the name

    OF ppm.pm_projects

    WHEN THERE IS)

    SELECT 1

    Of entity_table

    Entity WHERE = "Project".

    )

    UNION ALL

    SELECT request_id ID

    request_type_name AS name

    OF kcrt_request_details

    WHEN THERE IS)

    SELECT 1

    Of entity_table

    Entity WHERE = 'ask '.

    )

    ;

    This does not have anything on the number of lines is entity_table, or what are the values in the column of the entity.  In other words, the query works in all cases.  If any line in entity_table entity = 'Project', then the pm_projects data will be included in the result set.  If any line in entity_table entity = 'Request', kcrt_request_details data will be included.

    I hope that answers your question.

    If this isn't the case, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the results desired from these data.

    Explain, using specific examples, how you get these results from these data.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: https://forums.oracle.com/message/9362002#9362002

  • What is the most effective way to run this sql

    I have a sql like this:
    select 
    ((select q_avg24 from view1 where years=2009 and qtr=1) - (select q_avg24 from view1 where years=2010 and qtr=1)) as sub_s1_avg24,
    ((select q_avg24 from view2 where years=2009 and qtr=1) - (select q_avg24 from view2 where years=2010 and qtr=1)) as sub_s2_avg24,
    ((select q_avg24 from view3 where years=2009 and qtr=1) - (select q_avg24 from view3 where years=2010 and qtr=1)) as sub_s3_avg24,
    ((select q_avg24 from view4 where years=2009 and qtr=1) - (select q_avg24 from view4 where years=2010 and qtr=1)) as sub_s4_avg24
    from dual
    As you can see, the sql calculate a field value to another view (View1 view2 View3, view4).
    It returns the difference between the 2 years.

    In this sql, you can see she will solicit the views of the 2 x 4 = 8 times to get result table.
    Each query sql (select statement) return a result within 5 seconds, then... for total = 8 X 5 = 40secs...

    40 dry is not so big problem... but in fact, I have at least 5 games queries (select statements) with other parameters are not an entry for the calculation of this query...
    There are a lot of your time in SQL that results from: (8X5secs) x 5 = 200secs...

    I would like to know is there a solution better if we face such problems?
    Thank you!!!

    You can use as... not tested...
    But if you provide additional information on the data, I think we can think best solution

    select sum(decode(id,1,decode(yers,2009,av,0),0))-sum(decode(id,1,decode(yers,2010,av,0),0)) av1,
           sum(decode(id,2,decode(yers,2009,av,0),0))-sum(decode(id,2,decode(yers,2010,av,0),0)) av2,
           sum(decode(id,3,decode(yers,2009,av,0),0))-sum(decode(id,3,decode(yers,2010,av,0),0)) av3,
           sum(decode(id,4,decode(yers,2009,av,0),0))-sum(decode(id,4,decode(yers,2010,av,0),0)) av4
    from(
      select 1 id,q_avg24 av,years
      from view1
      where years in (2009,2010)
      and qtr = 1
      union all
      select 2 id,q_avg24,years
      from view2
      where years in (2009,2010)
      and qtr = 1
      union all
      select 3 id,q_avg24,years
      from view3
      where years in (2009,2010)
      and qtr = 1
      union all
      select 4 id,q_avg24,years
      from view4
      where years in (2009,2010)
      and qtr = 1)
    

    Published by: JAC on March 30, 2012 13:31

  • What are the blocks in help &gt; Diagnostics &gt; review

    Hello

    To find the table names, we can check the history. Or go to the diagnostics > study >

    Choose system such as blocks and last_query as a field.

    Basically can anyone explain to me what is a block?

    And is there any other way to find table names?

    In this situation, I only give myself the view.

    A block is a part of the form itself.

    If you have the name of the view, you can use a SQL select statement to find the way in which it is built. For example:

    Select text

    from dba_views

    where view_name = "FA_BOOKS_V";

Maybe you are looking for