SQL Query to search all the tables for a given string

Hi all,
This is concerning a query to search each and every table/column for a given string.
I came across a similar post (Re: question about searching 600 tables and this query seems to be inline with my requirements:
select table_name,
column_name,
:search_string search_string,
result
from cols,
xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| :search_string || '%") > 0]')
columns result varchar2(10) path '.'
where table_name in ('MY_TABLE')
However, I am getting the following error:
ORA-24451: OCIKCallPushTrusted, Maximum call depth exceeded
I am using Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit and could you please let me know the best possible way to accomplish this task?
Thanks.
Edited by: itech.quest on Sep 19, 2010 8:30 AM

Hi Tamir,
Thanks so far. I am yet to make the crucial breakthrough as far my application goes. Are you talking about the EUL5_QPP_STATS table? I tried retrieving worksheets even from that table also with the following query
SELECT DISTINCT Eul5QppStats.QS_DOC_NAME,Eul5QppStats.QS_DOC_DETAILS
FROM EUL5_QPP_STATS Eul5QppStats,EUL5_DOCUMENTS Eul5Documents
WHERE Eul5QppStats.QS_DOC_NAME = Eul5Documents.DOC_NAME
However, the worksheet data retrieved by Discoverer Oracle's product is not matching my dataset for every workbook. Please suggest.
Reg
Thomas

Similar Messages

  • How will get the source code of all the tables in a given schema using SQL?

    Hi All,
    How can we get the source code of all the tables in a given schema using SQL?
    Thanks in Adv.
    Junu

    Try something like...
    set heading off
    set pagesize 0
    col meta_data for a96 word_wrapped
    set long 100000
    SELECT DBMS_METADATA.GET_DDL(object_type, object_name, owner) ||';' AS meta_data
    FROM dba_objects
    WHERE owner = '<SCHEMA NAME>'
      AND object_type not in (<list of stuff you do not want>);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • SQL query  which return all the NET SERVICES which are avaiable in tnsname

    hi all
    how to write a sql query which return all the net services which are avaiable in tnsname.ora
    Regards
    s

    Also, tnsnames.ora is stored on the client, and not necessarily on the server; it's possible (and quite likely) that the name I use for a database in my tnsnames.ora could be different from the name you use for the same database; conversely we might use the same name for two different databases.
    Regards Nigel

  • Sql query to identify all the responsibilities attached to a form

    (oracle - apps) Can anyone help me by giving a sql query to identify all the responsibilities attached to a form and corresponding menu should not be in the menu exclusion.
    Thanks in advance
    Venki

    Bump

  • Query to fetch all the responsibilities for which OA page is attached

    Hi Team,
    please help me to prepare a query to fetch all the responsibilities for which OA page is attached.
    thanks in advance
    Thanks & Regards,
    Sriram T

    Hi,
    Querys which you have provided was helpful.
    But i was struck with the following issue. As the function is not excluded directly it may be excluded via a menu to the responsibility.
    Even though it is displaying the responsibility name.
    The following query is used to display the responsibility name with menu and function exclusions.
    please help me on this.
    SELECT r.RESPONSIBILITY_NAME
    FROM
    fnd_responsibility_vl r,
    fnd_form_functions f
    WHERE f.function_name = 'VSFFFRMADMN'--f.form_id =p_form_id
    AND r.menu_id IN (SELECT me.menu_id
    FROM fnd_menu_entries me
    START WITH me.function_id = f.function_id
    CONNECT BY PRIOR me.menu_id = me.sub_menu_id)
    and r.menu_id not in (select frf.action_id
    from fnd_resp_functions frf
    where frf.action_id=r.menu_id
    and frf.rule_type='M')
    and f.function_id not in (select frf.action_id
    from fnd_resp_functions frf
    where frf.action_id=f.function_id
    and frf.rule_type='F')
    Thanks
    Sriram T

  • How to identify all the information for a given company code?

    Hi,
    Our company provides data migration services for SAP and other ERP applications. Our customers provide us the specifications for extractions and conversions. We use one or more 3rd party tools to extract data from legacy systems into text/Excel files. Customers use LSMW to load generated files.
    We just got an unusual request. This customer wants to get ALL the data from SAP for a given company code and dump into Excel. They would do some manual editing on the data and load it into a new SAP client.
    In the past, customers would be more specific in their requirements. For example, they will mention Materials, Customers, Inventory, etc. In this case, the customer simply wants ALL the data for a given company code.
    Q1. Is everything in SAP related to company code, either directly or indirectly? For example, can materials be filtered by company code?
    Q2. The tools that we use let us extract data from SAP using SQL-like queries. How do I identify ALL the tables that I would need for a given company code?
    My feeling is the customer themselves are not clear on what they really want. Perhaps they are expecting us to guide them.
    I would appreciate any thoughts that you may have.
    If there is a more appropriate forum for this question, please let me know.
    Thank you in advance for your help.
    Regards,
    Peter

    hi
    t001w is the master table for plants, u can see all plants in this table.
    regads:
    rajesh.k

  • SQL Query to return all the dependent objects

    Hi,
    I have a question.
    Suppose I am creating a table with a join on 10 other tables, views etc..
    And there are nested sub-queries in the CREATE statement.
    How can I get the list of all the dependent objects for that table without counting them manually.
    I know, we can right click the table/view name and check the dependent objects in Toad or SQL Developer.
    But, I want to know the SQL query for getting that information.
    Thanks
    Rajiv

    well there is no way oracle would know what query was used when the table was created.
    But here is one intuitive trick:
    Step 1: Create a procedure that will have a cursor declared on the query you want to know what tables/views are used.
    Step 2: Check USER_DEPENDENCIES to see what objects this procedure depends on
    Let say you want to create TEST_A table using the following statement:
    create table test_a
    as
    select *
    from scott.emp,
         scott.dept;
      1  create or replace procedure test_temp
      2  as
      3  cursor test_cur is
      4             select *
      5             from scott.emp,
      6                  scott.dept;
      7  begin
      8     null;
      9* end;
    SQL> /
    Procedure created.
    SQL> show errors
    No errors.
    SQL> desc user_dependencies
    Name                                      Null?    Type
    NAME                                      NOT NULL VARCHAR2(30)
    TYPE                                               VARCHAR2(17)
    REFERENCED_OWNER                                   VARCHAR2(30)
    REFERENCED_NAME                                    VARCHAR2(64)
    REFERENCED_TYPE                                    VARCHAR2(17)
    REFERENCED_LINK_NAME                               VARCHAR2(128)
    SCHEMAID                                           NUMBER
    DEPENDENCY_TYPE                                    VARCHAR2(4)
    SQL> select referenced_owner, referenced_name, referenced_type
      2  from user_dependencies
      3  where name='TEST_TEMP' and referenced_owner<>'SYS';
    REFERENCED_OWNER
    REFERENCED_NAME
    REFERENCED_TYPE
    SCOTT
    DEPT
    TABLE
    SCOTT
    EMP
    TABLE
    SQL>
    SQL> drop procedure test_temp;
    Procedure dropped.
    SQL>Message was edited by:
    tekicora
    Message was edited by:
    tekicora

  • A query to identify all the tables

    Is there a way to write a query (excuse my ignorance) to identify all the tables where an specifc code resides? I have something to play with it
    The table always have the SBGI_CODE identifier
    For example:
    SOBSBGI_SBGI_CODE
    SORBCNT_SBGI_CODE
    SORBCMT_SBGI_CODE
    There are more tables, I am familiar with some of them, but not all of them I need to write a project plan, so I need to be able to identify all the tables and I am one the individuals who like SQL not reading documentation
    If this is possible, I will appreciated any input

    Or do you try to find all tables which names contain the string 'SBGI_CODE'?
    Then USER_|ALL_|DBA_TABLES is the view to query upon.
    You see, different answers to one question. That seems to imply that you did not give sufficient information. Please try to be as clear as possible next time.

  • Query to Find all the Tables and their corresponding columns,dataType in DB

    Hi all,
    I need a query which can give me all the Tables existing in my DB and their corresponding Columns existed for those tables and Datatype for each column .
    Thanks in Advance,
    viajy

    Hi,
    For your user tables you can use USER_TAB_COLUMNS.
    Just give DESC USER_TAB_COLUMNS at your SQL> prompt.
    You will know on that object.
    Regards,
    Sailaja

  • SQL - Can u print all the dates between two given dates (Without PL/SQL)

    Hi Friends,
    I want to know if u can print all the dates between two given dates without using pl/sql.
    date1,date2 are given
    write a sql statement to display all the dates lying between those two dates.
    An earlier will be appreciated.
    Thanks in Advance
    Sriram
    null

    Sriram,
    Try this....
    select to_date('01-JAN-00')+to_number(rownum)
    from all_tables
    where rownum < to_date('10-JAN-00')-to_date('01-JAN-00')
    TO_DATE('
    02-JAN-00
    03-JAN-00
    04-JAN-00
    05-JAN-00
    06-JAN-00
    07-JAN-00
    08-JAN-00
    09-JAN-00

  • Looking for a SQL query to get all the possible Alert Messages from the Rules in a Management Pack

    For reporting, I'm looking to get a SQL query of all the possible Alert Messages for Rules configured in a Management Pack (not necessarily the ones that have thrown alerts).  I can do this for Monitors, but not for Rules. 
    The configured alert messages for the Management Pack Monitors
    go like this:  ManagementPack > MonitorView> RuleModule > RuleModule.Alert Message > Localized Text
    The configured alert messages for the Management Pack Rules
    should go something like this, but there is a missing link:  ManagementPack > RuleView > RuleModule > ? Missing Link ? > Localized Text
    The Rules are tied to the Module, but I don't see a connection from the RulesModule to the Alert Message that I see in the LocalizedText. The Rule names do not always equal the Alert name. 
    Can someone provide the missing link?

    Hi,
    please try below powershell code to find the corresponding management pack for specific alert:
    $Alert = get-scomalert | where {$_.Name -like 'Agent Proxy Not Enabled*'} | select -first 1
    If ($alert.IsMonitorAlert -eq "True") {
    write-host "Ths is a monitor-generated alert"
    get-scommonitor -ID $Alert.MonitoringRuleID | select Enabled, DisplayName, ManagementPack
    else
    write-host "This is a rule-generated alert"
    get-scomrule -ID $Alert.MonitoringRuleID | select Enabled, DisplayName, ManagementPack
    In addition, please also refer to the below link:
    http://blogs.technet.com/b/mazenahmed/archive/2011/12/02/using-powershell-to-map-opsmgr-active-alert-to-its-corresponding-rule-monitor-and-management-pack-name.aspx
    Regards,
    Yan Li
    Regards, Yan Li

  • Query to get all the worksheets for a particular work book

    Hi All,
    I want to get all the associated worksheets for a particular workbook. What query will fetch mne those details. Also, where can find the EUL5 tables documentation
    Regards
    Thomas

    Hi Tamir,
    Thanks so far. I am yet to make the crucial breakthrough as far my application goes. Are you talking about the EUL5_QPP_STATS table? I tried retrieving worksheets even from that table also with the following query
    SELECT DISTINCT Eul5QppStats.QS_DOC_NAME,Eul5QppStats.QS_DOC_DETAILS
    FROM EUL5_QPP_STATS Eul5QppStats,EUL5_DOCUMENTS Eul5Documents
    WHERE Eul5QppStats.QS_DOC_NAME = Eul5Documents.DOC_NAME
    However, the worksheet data retrieved by Discoverer Oracle's product is not matching my dataset for every workbook. Please suggest.
    Reg
    Thomas

  • SQL query to find all the custom folders in Discoverer (query posted)

    I know its not a question I am posting..this is just to inform community users that this query makes life easier in case someone wants to find out all the custom folders in a particular EUL (folder name starting with XX)
    select b.ba_name,f.obj_name folder_name,f.obj_id,f.obj_ext_owner Owner
    from
    APPS.EUL5_objs f
    , APPS.EUL5_ba_obj_links l
    , APPS.EUL5_bas b
    where 1=1
    and f.obj_id= l.bol_obj_id
    and b.ba_id= l.bol_ba_id
    and b.ba_name like 'XX%'
    order by b.ba_name,f.obj_name;
    Hopefully it would be useful to others!

    Connect as sysdba and try..
    To list all objects >100M in size.
    SQL> select owner, segment_type, segment_name, sum(bytes)/(1024*1021) from dba_segments
    group by owner, segment_type, segment_name
    having sum(bytes)/(1024*1021) > 100
    For tablespaces ..
    select tablespace_name, sum(bytes) tablespace_size
    from dba_data_files
    group by tablespace_name
    union all
    select tablespace_name, sum(bytes) tablespace_size
    from dba_temp_files
    group by tablespace_name
    order by tablespace_name

  • Query to see all the tables in db

    I want all tables seeing in the PLSQL

    Why PL/SQL?
    select table_name from dba_tables
    order by ;You can also check the variations with USER_TABLES (to see the tables owned by the current user), ALL_TABLES (to check the tables the current user has access to) etc.
    Cheers
    Sarma.

  • Query ---  to find all child tables for a master table

    Suppose i have a table master .
    I want to know all tables which are child tables for this master table .
    In other words i want to know all those table names which have foreign key constraint for the master table .
    regards
    shubha

    You may want to join on the owner in case you have multiple schemas with same table names and same primary key names
    SELECT c.table_nameFROM all_constraints c, all_constraints p
    WHERE c.constraint_type = 'R'
    AND c.r_constraint_name = p.constraint_name
    AND p.constraint_type = 'P'
    AND c.owner = p.owner
    AND p.table_name = '&YOUR_MASTER_TABLE'

Maybe you are looking for

  • Can't find FILTER CONDITION for filters or Function_Name for Functions

    In the Data Warehouse 11gr1 views all_iv_xform... I can't seem to find the Filter Conditions for filters and function name for functions that are called. I have looked at the other views in the documentation for the API's but can't seem to find this

  • How do I delete one of the two itunes accounts on my iPhone?

    I used to sync my phone on my daughter's computer, and somehow both accounts (mine and hers) got on my iPhone. When I try to download or update apps, it either asks for my password or my daughter's, and I can't update my apps anymore because I do not

  • IPhone won't activate after "auto" reset

    Hi, I went to bed at 10:30pm last night, set my iPhone alarm for 05:30am this morning, dimmed my brightness to its lowest setting (as I always do, so I don't get blinded when I check the time during the night) and then left my phone beside my bed. Th

  • In IPhoto '08, viewing single vs. multiple photos

    In IPhoto '08, in Library/Photos, I'm no longer able to view a screen of thumbnails.   I'm only able to view a single photo at one time.  This was not true in the past.

  • MDM API to read the Record Key Mapping table

    Hi, Does anybody know what class/method I can use to read the Record Key Mapping table? For the Business Partner table the Key Mapping table has this columns: <u>Default / MDM Partner ID / Remote System / Key</u> I have everything but the Key. How ca