Search in database in all the tables

Hi friends,
I want to search following text in database in all the tables :
Paris-Murex BO for BNL- Panorama(Roma) / BNL-Panorama for Paris-Murex BO(Roma)
above text is thr in our client site which is getting retrieved from database, I know the database instance name but but dont know from which table this value (text) is comming from.
please help it's urgent!!!

This is a depressingly common request. Why are there so many shonky undocumented applications out there?
Anyway, the solution for a one-off exercise is this brute force approach. It's not pretty and the performance will be Teh Suck, but it will find the string. If you think that the string might be in more than one column you should remove the EXIT and let the thing grind on for as long as it takes.
set serveroutput on
declare
    n number;
begin
    for r in ( select owner, table_name, column_name
               from all_tab_columns
               where owner not in ('SYS', 'SYSTEM')
               and   data_type in ('CHAR', 'VARCHAR2')
               and   data_length >= 43 )
    loop
        dbms_output.put_line('checking!!'||r.owner||'.'||r.table_name||'.'||r.column_name);
        begin
            execute immediate 'select 1 from '||r.owner||'.'||r.table_name
                          ||' where '||r.column_name||' like ''%Paris-Murex BO for BNL- Panorama(Roma) / BNL-Panorama for Paris-Murex BO(Roma)%'''
                          ||' and rownum = 1'
            into n;
            dbms_output.put_line('found it!!'||r.owner||'.'||r.table_name||'.'||r.column_name);
            exit;
        exception
            when no_data_found
            then
                null;
        end;
    end loop;
end;
/If you have CLOBs and BLOBs you want to check as well then you'll need to run through a second query using CONTAINS(). Implementing that is left as an exercise for the reader.
Note that if you want to do this on a regular basis then you need a completely different, more architectural approach.
Cheers, APC
blog: http://radiofreetooting.blogspot.com

Similar Messages

  • To drop all the tables in a database

    hi,
    I have 25000 tables in a database.I want ot delete all the tables and then i have to import the dump.For deleting all the tables what query has to be given.
    Thanks in advance,
    R.Ratheesh

    The code would be
    BEGIN
       FOR c IN (SELECT owner,
                        table_name
                   FROM all_tables
                  WHERE owner IN ('YOUR_OWNER1', 'YOUR_OWNER2_ETC'))
       LOOP
          EXECUTE IMMEDIATE    'drop table '
                            || c.owner
                            || '.'
                            || c.table_name
                            || ' cascade constraints';
       END LOOP;
    END;
    the user ,tablespaces ,datafiles has to be recreatedbut still dropping the user would be the simplest option
    you don't have to recreate tablespaces and datafiles for that.

  • How to truncate all the tables of my database

    hi guys
    I am using SQL Server 2012 , i need to delete all  the data present in my database .I mean i want to truncate all the tables in my database , so please suggest me the easiest way .

    If the tables are referenced by FK it will be failed.... 
    Basically you can use the below statetemnt
    DECLARE @TruncateStatement nvarchar(4000)
    DECLARE TruncateStatements CURSOR LOCAL FAST_FORWARD
    FOR
    SELECT
        N'TRUNCATE TABLE ' +
        QUOTENAME(TABLE_SCHEMA) +
        N'.' +
        QUOTENAME(TABLE_NAME)
    FROM
        INFORMATION_SCHEMA.TABLES
    WHERE
        TABLE_TYPE = 'BASE TABLE' AND
        OBJECTPROPERTY(OBJECT_ID(QUOTENAME(TABLE_SCHEMA) +
            N'.' +
            QUOTENAME(TABLE_NAME)), 'IsMSShipped') = 0
    OPEN TruncateStatements
    WHILE 1 = 1
    BEGIN
        FETCH NEXT FROM TruncateStatements INTO @TruncateStatement
        IF @@FETCH_STATUS <> 0 BREAK
        RAISERROR (@TruncateStatement, 0, 1) WITH NOWAIT
        EXEC(@TruncateStatement)
    END
    CLOSE TruncateStatements
    DEALLOCATE TruncateStatements
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?

    How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?
    I tried using DROP Tables, Truncate Database, Delete and many more but it is not working.  I want to delete all tables using Query Analyzer, i.e. through SQL Query.
    Please help me out in this concern.
    Nishith Shah

    Informative thread indeed. Wish I saw it early enough. Managed to come up with the code below before I saw this thread.
    declare @TTName Table
    (TableSchemaTableName
    varchar
    (500),
    [status] int
    default 0);
    with AvailableTables
    (TableSchemaTableName)
    as
    (select
    QUOTENAME(TABLE_SCHEMA)
    +
    +
    QUOTENAME(TABLE_NAME)
    from
    INFORMATION_SCHEMA.TABLES)
    insert into @TTName
    (TableSchemaTableName)
    select *
    from AvailableTables
    declare @TableSchemaTableName varchar
    (500)
    declare @sqlstatement nvarchar
    (1000)
    while 1=1
    begin
    set @sqlstatement
    =
    'DROP TABLE '
    + @TableSchemaTableName
    exec
    sp_executeSQL
    @sqlstatement
    print
    'Dropped Table : '
    + @TableSchemaTableName
    update @TTName
    set [status]
    = 1
    where TableSchemaTableName
    = @TableSchemaTableName
    if
    (select
    count([Status])
    from @TTName
    where [Status]
    = 0)
    = 0
    break
    end

  • Selecting string from all the tables in databse

    Hi All,
    I need a help in finding the data from all the database tables at one time using single query.
    For e.g. I wanna search a string 'ABC' in all the database tables for a schema.
    I want to find out,which all tables (in either of its columns) contain this string strored inside themselves.
    For brand name changing,I need to find out all the tables and in turn all the columns containing that string where databse consisting of 1000 tables.
    Could anyone suggest me some option for this?Is it possible to avoid this tedious task to search individual table?

    Why is it necessary to search every column? Does your data model permit the brand name to be stored in any column?
    Whatever.
    I suggest starting with dba_tab_columns (where owner = 'WHATEVER') and look for those tables/columns that could possibly hold the brand name. You can eliminate NUMBER and DATE columns and VARCHAR columns that are too short.
    Spool that out to another script where each select statement is like this:
    SELECT 'TABLE_NAME.COLUMN_NAME', column_name
    FROM table_name
    WHERE UPPER(COLUMN_NAME) LIKE '%BRAND NAME%'
    AND rownum = 1;

  • Error: "The search cannot be executed because the table has pending changes that would be lost."

    Hello,
    I'm working a developing an OA page that will displays the contents of an Oracle table and allows the user to update records in a table as needed.
    When I hit submit button to save the changes in the update page, the control goes back to main page (where all the table records are displayed). It displays the updated record with the new information.However when I hit "Go" button on the mainPG, I get the error "The search cannot be executed because the table has pending changes that would be lost. and the changes are not committed.
    ANy suggestions on where I should look will be greatly appreciated.
    Posting code for my controller
    =======================
              if ( pageContext.getParameter("saveRate") != null )
              personam.invokeMethod("saveRateToDatabase");
    Code from my AM
    =============
        public void saveRateToDatabase()
          getOADBTransaction().commit();
          System.out.println("40--After commit has been executed");
    Code from my VORowImpl
    ===================
    package cggv.oracle.apps.gl.server;
    import oracle.apps.fnd.framework.server.OAViewRowImpl;
    import oracle.jbo.domain.Date;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.AttributeDefImpl;
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    public class xxCggGlRatesVORowImpl extends OAViewRowImpl {
        public static final int RATEID = 0;
        public static final int FROMCURRENCY = 1;
        public static final int TOCURRENCY = 2;
        public static final int FROMCONVERSIONDATE = 3;
        public static final int TOCONVERSIONDATE = 4;
        public static final int USERCONVERSIONTYPE = 5;
        public static final int CONVERSIONRATE = 6;
        public static final int MODEFLAG = 7;
        /**This is the default constructor (do not remove)
        public xxCggGlRatesVORowImpl() {
        /**Gets the attribute value for the calculated attribute RateId
        public Number getRateId() {
            return (Number) getAttributeInternal(RATEID);
        /**Sets <code>value</code> as the attribute value for the calculated attribute RateId
        public void setRateId(Number value) {
            setAttributeInternal(RATEID, value);
            //populateAttribute(RATEID, value);
        /**Gets the attribute value for the calculated attribute FromCurrency
        public String getFromCurrency() {
            return (String) getAttributeInternal(FROMCURRENCY);
        /**Sets <code>value</code> as the attribute value for the calculated attribute FromCurrency
        public void setFromCurrency(String value) {
            setAttributeInternal(FROMCURRENCY, value);      
        /**Gets the attribute value for the calculated attribute ToCurrency
        public String getToCurrency() {
            return (String) getAttributeInternal(TOCURRENCY);
        /**Sets <code>value</code> as the attribute value for the calculated attribute ToCurrency
        public void setToCurrency(String value) {
            setAttributeInternal(TOCURRENCY, value);
        /**Gets the attribute value for the calculated attribute FromConversionDate
        public Date getFromConversionDate() {
            return (Date) getAttributeInternal(FROMCONVERSIONDATE);
        /**Sets <code>value</code> as the attribute value for the calculated attribute FromConversionDate
        public void setFromConversionDate(Date value) {
            setAttributeInternal(FROMCONVERSIONDATE, value);      
        /**Gets the attribute value for the calculated attribute ToConversionDate
        public Date getToConversionDate() {
            return (Date) getAttributeInternal(TOCONVERSIONDATE);
        /**Sets <code>value</code> as the attribute value for the calculated attribute ToConversionDate
        public void setToConversionDate(Date value) {
            setAttributeInternal(TOCONVERSIONDATE, value);       
        /**Gets the attribute value for the calculated attribute UserConversionType
        public String getUserConversionType() {
            return (String) getAttributeInternal(USERCONVERSIONTYPE);
        /**Sets <code>value</code> as the attribute value for the calculated attribute UserConversionType
        public void setUserConversionType(String value) {
            setAttributeInternal(USERCONVERSIONTYPE, value);
        /**Gets the attribute value for the calculated attribute ConversionRate
        public Number getConversionRate() {
            return (Number) getAttributeInternal(CONVERSIONRATE);
        /**Sets <code>value</code> as the attribute value for the calculated attribute ConversionRate
        public void setConversionRate(Number value) {
            setAttributeInternal(CONVERSIONRATE, value);
        /**Gets the attribute value for the calculated attribute ModeFlag
        public String getModeFlag() {
            return (String) getAttributeInternal(MODEFLAG);
        /**Sets <code>value</code> as the attribute value for the calculated attribute ModeFlag
        public void setModeFlag(String value) {
            setAttributeInternal(MODEFLAG, value);      
        /**getAttrInvokeAccessor: generated method. Do not modify.
        protected Object getAttrInvokeAccessor(int index,
                                               AttributeDefImpl attrDef) throws Exception {
            switch (index) {
            case RATEID:
                return getRateId();
            case FROMCURRENCY:
                return getFromCurrency();
            case TOCURRENCY:
                return getToCurrency();
            case FROMCONVERSIONDATE:
                return getFromConversionDate();
            case TOCONVERSIONDATE:
                return getToConversionDate();
            case USERCONVERSIONTYPE:
                return getUserConversionType();
            case CONVERSIONRATE:
                return getConversionRate();
            case MODEFLAG:
                return getModeFlag();
            default:
                return super.getAttrInvokeAccessor(index, attrDef);
        /**setAttrInvokeAccessor: generated method. Do not modify.
        protected void setAttrInvokeAccessor(int index, Object value,
                                             AttributeDefImpl attrDef) throws Exception {
            switch (index) {
            case RATEID:
                setRateId((Number)value);
                return;
            case FROMCURRENCY:
                setFromCurrency((String)value);
                return;
            case TOCURRENCY:
                setToCurrency((String)value);
                return;
            case FROMCONVERSIONDATE:
                setFromConversionDate((Date)value);
                return;
            case TOCONVERSIONDATE:
                setToConversionDate((Date)value);
                return;
            case USERCONVERSIONTYPE:
                setUserConversionType((String)value);
                return;
            case CONVERSIONRATE:
                setConversionRate((Number)value);
                return;
            case MODEFLAG:
                setModeFlag((String)value);
                return;
            default:
                super.setAttrInvokeAccessor(index, value, attrDef);
                return;
        /**Gets xxCggGlRatesEO entity object.
        public xxCggGlRatesEOImpl getxxCggGlRatesEO() {
            return (xxCggGlRatesEOImpl)getEntity(0);

    Hi,
    Check these links:
    Oracle Apps: Search cannot be executed because the table has pending changes that would be lost
    Re: Getting error in search page search cannot be executed
    http://jneelmani.blogspot.in/2009/11/oaf-search-cannot-be-executed-because.html
    --Sushant

  • "Error:The search cannot be executed because the table has pending changes that would be lost", after DELETE

    Good day,
    On Search Page, I have searched for the record(s) then deleted a record and got confirmation message i.e. Record has deleted. Next when I search for any record I'm getting below error.
    Error
    The search cannot be executed because the table has pending changes that would be lost.
    Could you please help me to fix this issue. Your response is highly appreciated.
    Item properties:
    Item Style : Image
    Action Type: Fire Action
    Event : delete
    Below is the code using in CO and AM
    Controller (processFormRequest):
    if ("delete".equals(pageContext.getParameter(EVENT_PARAM)))
              // The user has clicked a "Delete" icon so we want to display a "Warning"
              // dialog asking if she really wants to delete the employee. Note that we
              // configure the dialog so that pressing the "Yes" button submits to
              // this page so we can handle the action in this processFormRequest( ) method.
              String visit_id = pageContext.getParameter("visit_id");
              String employeeName = pageContext.getParameter("last_name") + ", " + pageContext.getParameter("first_name");
              MessageToken[] tokens = { new MessageToken("EMP_NAME", employeeName)};
              OAException mainMessage = new OAException("FND", "XXXX_EMP_DELETE_WARN", tokens);
              // Note that even though we're going to make our Yes/No buttons submit a
              // form, we still need some non-null value in the constructor's Yes/No
              // URL parameters for the buttons to render, so we just pass empty
              // Strings for this.
              OADialogPage dialogPage = new OADialogPage(OAException.WARNING,
                mainMessage, null, "", "");
              // Always use Message Dictionary for any Strings you want to display.
              String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);
              String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);
              // We set this value so the code that handles this button press is
              // descriptive.
    dialogPage.setOkButtonItemName("DeleteYesButton");
              // The following configures the Yes/No buttons to be submit buttons,
              // and makes sure that we handle the form submit in the originating
              // page (the "Employee" summary) so we can handle the "Yes"
              // button selection in this controller.
    dialogPage.setOkButtonToPost(true);
    dialogPage.setNoButtonToPost(true);
    dialogPage.setPostToCallingPage(true);
              // Now set our Yes/No labels instead of the default OK/Cancel.
    dialogPage.setOkButtonLabel(yes);
    dialogPage.setNoButtonLabel(no);
              // We need to keep hold of the employeeNumber and employeeName.
              // The OADialogPage gives us a convenient means
              // of doing this. Note that the use of the Hashtable is 
              // most appropriate for passing multiple parameters. See the OADialogPage
              // javadoc for an alternative when dealing with a single parameter.
              java.util.Hashtable formParams = new java.util.Hashtable(1);
    formParams.put("visit_id", visit_id);
    formParams.put("empName", employeeName);
    dialogPage.setFormParameters(formParams);
              pageContext.redirectToDialogPage(dialogPage);
        else if (pageContext.getParameter("DeleteYesButton") != null)
              // User has confirmed that she wants to delete this employee.
              // Invoke a method on the AM to set the current row in the VO and
              // call remove() on this row.
              String employeeNumber = pageContext.getParameter("visit_id");
              String employeeName = pageContext.getParameter("empName");
              Serializable[] parameters = { employeeNumber };
             // OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("deleteEmployee", parameters);
              // Now, redisplay the page with a confirmation message at the top. Note
              // that the deleteEmployee() method in the AM commits, and our code
              // won't get this far if any exceptions are thrown.
              MessageToken[] tokens = { new MessageToken("EMP_NAME", employeeName) };
              OAException message = new OAException("FND",
                "XXXX_EMP_DELETE_CONFIRM", tokens, OAException.CONFIRMATION, null);
    pageContext.putDialogMessage(message);
    Application Module:
      public void deleteEmployee(String visit_id)
            // First, we need to find the selected employee in our VO.
            // When we find it, we call remove( ) on the row which in turn
            // calls remove on the associated EmployeeEOImpl object.
            int empToDelete = Integer.parseInt(visit_id);
              OAViewObject vo = (OAViewObject)getNonEmployeesSummaryVO1();
        NonEmployeesSummaryVORowImpl row = null;
            // This tells us the number of rows that have been fetched in the
            // row set, and will not pull additional rows in like some of the
            // other "get count" methods.
           int fetchedRowCount = vo.getFetchedRowCount();
            // We use a separate iterator -- even though we could step through the
            // rows without it -- because we don't want to affect row currency.
            RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
    if (fetchedRowCount > 0)
              deleteIter.setRangeStart(0);
              deleteIter.setRangeSize(fetchedRowCount);
              for (int i = 0; i < fetchedRowCount; i++)
                row = (NonEmployeesSummaryVORowImpl)deleteIter.getRowAtRangeIndex(i);
                // For performance reasons, we generate ViewRowImpls for all
                // View Objects. When we need to obtain an attribute value,
                // we use the named accessors instead of a generic String lookup.
                // Number primaryKey = (Number)row.getAttribute("EmployeeId");
                Number primaryKey = row.getVisitId();
                if (primaryKey.compareTo(empToDelete) == 0)
                  // This performs the actual delete.
                  row.remove();
                    getTransaction().commit();
                  break; // only one possible selected row in this case
            // Always close the iterator when you're done.
            deleteIter.closeRowSetIterator();
          } // end deleteEmployee
    Thanks,
    Ravi

    Hi
    Check this link Getting error in search page search cannot be executed
    Regards,
    Dilip

  • How to find all the tables associated for a particular transaction

    Hi-
    May I know how to find all the tables, related(foreign key) tables for a transaction within SAP GUI?
    Up to my technical knowledge, this can be achieved by looking database diagrams from DB level. But that would be for entire database as a whole. What I'm expecting is to see transaction level relative tables that too from SAP GUI. Please share the possibilities if any.
    Regards
    Sekhar

    Dear Micky Oestreich
    May be we possess expertise or high level experience, it should not show up in our way of communication. Every professional starts with the basic stuff to learn. When the question is raised in such minimum polite way, the same level of courtesy is expected in return. If you felt my question was basic, you might have refused it gently. If you are in good mood or bad mood it doesn't matters.
    Hi Vengal Rao
    Thanks for your response. It helped me.
    Regards
    Sekhar

  • To find particular value in all the tables in the db

    Hi All
    I need to find out all the tables, corresponding column name by querying a particular string that appears in any of the columns in the any of the tables in the db.
    Please help me of this.
    Thanks

    Oh dear you want to look for a particular data in all the tables in the database and say this data is available in these tables in these columns. Oh boy thats going to cost you a lot. why do you want to do that. can you share with us why you want to do that.
    Thanks,
    Karthick.

  • Select data from all the table names in the view

    Hi,
    "I have some tables with names T_SRI_MMYYYY in my database.
    I created a view ,Say "Summary_View" for all the table names
    with "T_SRI_%".
    Now i want to select data from all the tables in the view
    Summary_View.
    How can i do that ? Please throw some light on the same?
    Thanks and Regards
    Srinivas Chebolu

    Srinivas,
    There are a couple of things that I am unsure of here.
    Firstly, does your view definition say something like ...
    Select ...
    From "T_SRI_%"
    If so, it is not valid. Oracle won't allow this.
    The second thing is that your naming convention for the
    tables suggests to me that each table is the same except
    that they store data for different time periods. This would be
    a very bad design methodology. You should have a single
    table with an extra column to state what period is referred to,
    although you can partition it into segments for each period if
    appropriate.
    Apologies if i am misinterpreting your question, but perhaps
    you could post your view definition and table definitions
    here.

  • Problem while displaying all the table names from a MS Access Data Source.

    I started preparing a small Database application. I want to display all the Table Names which are in the 'MS Access' Data Source.
    I started to executing by "Select * from Tab" as if in SQL.
    But i got an error saying that "Not able to resolve Symbol 'Tab' in the query".
    Please let me know how can i display all the table Names in the MS Access Dats Source.

    Here i am developing the application in Swing using JDBC for accessing the database.
    I want to display all the Table names from the data source in a ListBox for easy selection of tables to view their details.

  • Significance of 3 flags used in almost all the tables

    Hello everyone,
    Please let me know the significance of flags used in almost all the tables in BI/BW.
    If the flags are initial, what does that signify ?
    CHCKFL : Flag: Value in check tables
    DATAFL : Flag: Value in dimension or available as attribute
    INCFL     : Flag: Value is built into all inclusion tables
    If CHCKFL is initial, means this record is not maintained in Check table, and so i wont see it if i search it in its InfoObject (That conatins this table).
    How should i retrieve such a record?
    Thanks
    Edited by: shalaxy s on Nov 19, 2009 5:44 PM

    Hi,
    These flags are a kind of "where used" flags.
    CHCKFL, DATAFL
    Re: Meaning of CHCKFL    DATAFL  INCFL   in sid table of  IO
    INCFL
    Used in inclusion tables of external hierarchies
    These fields are also initial when you delete master data of a characteristic with option not to delete related SIDs.
    Hope this helps
    Joe

  • What are all the tables updates..

    Hello experts,
         Do we have any option provided by SAP to find , what are all the tables get updates when we run a transaction (ex: VA01)..
    Thanks & Regards,
    Prakash Reddy .S

    >
    Naveen Inuganti wrote:
    But please dont under estimate my answer as it deffenately meets all the angles of that question.
    The problem is with you answer, that it requires lots of manual work and that will bring lots of possible errors as well (and in case of transactions like VA01, "lots of" has to be understood as "LOTS OF")
    >
    Naveen Inuganti wrote:
    Ex: If you not having authorization or correct inputs or Dont know the screen sequences for VA01, then how can you people can analize it from ST05?
    St05 will only give you a list of DB tables, you don't have to be aware of screen sequences (I believe 99% of developers are not). And if you don't have authorizations, than you have to ask for it
    (My original concern was, if someone searches SCN and finds this thread will think the most points were given to the best answer, but the point assignment was changed meanwhile.)

  • To Get all the Table Names

    Hi All
    I have nearly 70 procedures in my database.
    I want to get all the distinct table names used in the 70 procedures.
    Is it possible?
    Note:
    All the table names are prefixed by schema name like DEVSRC.table_name.
    Please advice
    Thanks
    Jo

    Johney  wrote:
    Hi VT
    One doubt.
    This query will give the table names of only select stmt used in the procedure
    or
    List of table names that are with in any DML operations inside the procedure?
    Thanks
    JoIt will give all the table either used in select or in any DML..
    You can also check by creating a temp proc
    SQL> drop procedure proc_test;
    Procedure dropped.
    SQL> select name, referenced_name, dependency_type from user_dependencies
      2  where type = 'PROCEDURE' and referenced_type = 'TABLE' and name='PROC_TEST';
    no rows selected
    SQL> create or replace
      2  PROCEDURE proc_test
      3  IS
      4  v_ID    number;
      5  v_PRID  number;
      6  v_PRLID number;
      7  v_DATERECEIVED date;
      8  Cursor C1 is
      9  select * from table_c;
    10   BEGIN
    11   open c1;
    12     LOOP
    13      FETCH c1 INTO v_ID,v_PRID,v_PRLID,v_DATERECEIVED;
    14      EXIT WHEN c1%NOTFOUND;
    15      insert into table_b values(v_ID,v_PRID,v_PRLID,v_DATERECEIVED);
    16      Commit;
    17     END LOOP;
    18   CLOSE C1;
    19   END;
    20  /
    Procedure created.
    SQL> select name, referenced_name, dependency_type from user_dependencies
      2  where type = 'PROCEDURE' and referenced_type = 'TABLE' and name='PROC_TEST';
    NAME
    REFERENCED_NAME                                                  DEPE
    PROC_TEST
    TABLE_B                                                          HARD
    PROC_TEST
    TABLE_C                                                          HARD
    SQL> Regards
    Umesh

  • How to find accurate number of Rows, and size of all the tables of a Schema

    HI,
    How to find the accurate number of Rows, and size of all the tables of a Schema ????
    Thanks.

    SELECT t.table_name AS "Table Name",
    t.num_rows AS "Rows",
    t.avg_row_len AS "Avg Row Len",
    Trunc((t.blocks * p.value)/1024) AS "Size KB",
    t.last_analyzed AS "Last Analyzed"
    FROM dba_tables t,
    v$parameter p
    WHERE t.owner = Decode(Upper('&1'), 'ALL', t.owner, Upper('&1'))
    AND p.name = 'db_block_size'
    ORDER by 4 desc nulls last;
    ## Gather schema stats
    begin
    dbms_stats.gather_schema_stats(ownname=>'SYSLOG');
    end;
    ## Gather a particular table stats of a schema
    begin
    DBMS_STATS.gather_table_stats(ownname=>'syslog',tabname=>'logs');
    end;
    http://www.oradev.com/create_statistics.jsp
    Hope this will work.
    Regards
    Asif Kabir
    -- Mark the answer as correct/helpful

Maybe you are looking for

  • The music on my iPhone is WRONG, plays a different song when I click another one.

    I recently plugged in my iPhone 4S to sync music with my relatively new Macbook Air. I had a song that someone had sent to me (a mix, not from iTunes) that I wanted to add to my phone. When I (safely) unconnected my phone and checked it, I found that

  • How to fill array with random number?

    I need to fill a 3-dimensional array that has user-controlled dimension sizes with random numbers (1-10). I'm unsure of how to do this. I feel like I have to use the initialize array and maybe the build array functions somehow but I'm not entirely su

  • Publishing Site Template Missing - MOSS 2007

    Hi All, I can't see the "Publishing Site" template in the list while creating a site/site collection. The publishing feature is activated in both site collection level and site level. I can see only "Publishing Site with Workflow" and "News site" und

  • Schedule Line Category change-USER EXIT

    REQUIREMENT: When saving a SALES ORDER, Change the schedule line category on the SALES ORDER from CP(Standard Availability Check) to CS(Third Party Processing u2013Trigger Purchase Requisition) Initially when we create the SALES ORDER, we have Schedu

  • Sharing a web dynpro project

    I want to know few details about Web dynpro project 1.I have created a wd project and started working on it creating some views etc. Same is being done by another colegue of mine. for example he also had created same structure of the project started