Query to obtain tables in SH schema using data-dictionary views/tables.

Hi,
I have just installed Oracle 10g Database. Logged on to SQL Plus by scott (changed the password as prompted).
I want to see the tables in SH schema (which comes by default with Oracle 10g database).
The problem, I am facing is:
I can see the schema name: SH in the result of the below query:
SELECT * FROM ALL_USERS
but, nothing is returned in the result of the below query:
SQL> SELECT OWNER FROM ALL_TABLES WHERE OWNER='SH';
Result: no rows selected.
Why is this happening?
What will be the correct query to obtain tables present in SH schema ?
Thanks in Advance & Regards,
Deeba

conn /as sysdba
SQL> select table_name from dba_tables where owner='SH';
I think the user SCOTT have no privilege to see SH schema tables through all_tables view.
Thanks

Similar Messages

  • Query on 0TCT_MC01 to get the last used date of a query

    Dear All,
    I tried to create a query on 0TCT_MC01 to get the last used date of a query.
    Since we do not have readily available key figure for Last used date, could any one help me out to achieve this result?
    I am interested to find the old queries which are not being used anymore.
    Thanks in advance.

    You can get the info from the below tables
    if you are working with BW 3.5 you can look in table RSDDSTAT in BI 7.0 it is RSDDSTAT_OLAP.
    Make a selction on the infocube and the OLAP Statistic Object which is the query ID and execute. Then you should see how often the query was executed, by whom and which date/time.
    in field Statistics Object Name Query ID you type in the tech name of the query
    from the Counter for statistics event calls -- will give the count... no of times the query used least the count lesser the query is used.
    Regards
    KP
    Edited by: Konduru Prashanth. on Dec 22, 2011 2:44 PM

  • Using data dictionary in PL/SQL

    What people think about using data dictionary in PL/SQL witch supposed to be used for a long time (selects, type declarations and so on)?
    Oracle does not guarantee data dictionary names will be same forever.
    Is it a good idea to restrict the using of this in the Development standards?

    The reason I open this thread I am trying to improve the Development Standards
    My attempt was to restrict using SELECT FROM Data Dictionary if it is possible.
    Here are examples, what I trying to figure out
    SELECT SYS_CONTEXT ('USERENV', 'DB_NAME')
      FROM DUAL;
    or
    SELECT VALUE
      FROM gv$parameter
    WHERE NAME = 'db_name';
    SELECT SYS_CONTEXT ('USERENV', 'CURRENT_SCHEMAID')
      FROM DUAL;
    or
    SELECT user#
      FROM SYS.user$
    WHERE NAME = USER;
    I am not asking ‘Can I...?’ I am asking ‘What people think?’
    Probably, it is not an issue.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Procedure to Export schema using DATA PUMP

    Hi All,
    This is pandiarajan and i want to know the procedure to export schema using datapump in oracle 10g.
    Please help me
    Thanks in Advance

    expdp directory=<xxxxx> dumpfile=<yyyyyyy> schemas=<schema name>

  • Add multiple entries to dropdown list without using data dictionary

    Hi,
    By default when we use a data dictionary element for dropdown list, all the possible values are listed in the dropdown. However when no data dictionary element is used for the dropdown list, it behaves like a parameter with a single line.
    I would like to know if it is possible to not use the data dictionary element and still have multiple lines in the dropdown.
    Thanks in advance.
    Shamia

    Check the below program :
    *report zxyz.
    report zxyz.
    Table diclaration
    tables: tvdir.
    Selection screento table View
      selection-screen skip 2.
      parameter p_tabnm(30) as listbox visible length 30 obligatory.
      selection-screen skip 1.
      selection-screen begin of block s1 with frame title text-001.
      parameter: p_radio1 radiobutton group g1,
                 p_radio radiobutton group g1.
      selection-screen end of block s1.
    Add values to list box
    at selection-screen output.
      type-pools: vrm.
      data: name  type vrm_id,
            list  type vrm_values,
            value like line of list.
      name = 'P_TABNM'.
      refresh list.
      value-key = 'V_024'.
      value-text = text-002. "'V_024-Purchasing Groups'.
      append value to list.
      value-key = 'V_T024D'.
      value-text = text-003. "'V_T024D-MRP Controllers'.
      append value to list.
      value-key = 'ZT604'.
      value-text = text-004. "'T604-Commodity Codes'.
      append value to list.
      value-key = 'T179'.
      value-text = text-005. "'T179-Product Hierarchies'.
      append value to list.
      value-key = 'TVM1T'.
      value-text = text-006. "'TVM1T-Business Manager'.
      append value to list.
      value-key = 'TVM2T'.
      value-text = text-007. "'TVM2T-Division manager'.
      append value to list.
      value-key = 'TVM3T'.
      value-text = text-008. "'TVM3T-Director'.
      append value to list.
      value-key = 'V_TVV2'.
      value-text = text-009. "'V_TVV2-Customer Group 2'.
      append value to list.
      call function 'VRM_SET_VALUES'
           exporting
                id     = name
                values = list.
    start-of-selection.
    Get flag of corresponding table view
      select single tabname flag from tvdir into tvdir
                    where tabname = p_tabnm.
    Set flag of corresponding table view
      if p_radio1 eq 'X'.
        if tvdir-flag ne 'X'.
          update tvdir set: flag  = 'X'
                     where tabname = p_tabnm.
        endif.
      endif.
      if p_radio eq 'X'.
        if tvdir-flag eq 'X'.
          update tvdir set: flag  = ''
                       where tabname = p_tabnm.
        endif.
      endif.
    Execute View/Table
      call function 'VIEW_MAINTENANCE_CALL'
        exporting
          action                               = 'U'
          view_name                            = p_tabnm
       exceptions
         client_reference                     = 1
         foreign_lock                         = 2
         invalid_action                       = 3
         no_clientindependent_auth            = 4
         no_database_function                 = 5
         no_editor_function                   = 6
         no_show_auth                         = 7
         no_tvdir_entry                       = 8
         no_upd_auth                          = 9
         only_show_allowed                    = 10
         system_failure                       = 11
         unknown_field_in_dba_sellist         = 12
         view_not_found                       = 13
         others                               = 14.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    Reset flag of corresponding table view
      update tvdir set: flag  = tvdir-flag
                    where tabname = p_tabnm.
    Thanks
    Seshu

  • Import table to differnet schema using data pump

    Hello All,
    I am trying to export a table from schema MIPS_MDM and import it to MIPS_QUIRINO schema in different database. I am getting the below error.
    expdp MIPS_MDM/MIPS_MDM@ext01mdm tables=QUARANTINE directory=DP_EXP_DIR dumpfile=quarantine.dmp logfile=qunat.log
    To Import
    impdp MIPS_QUIRINO/MIPS_QUIRINO@mps01dev tables=QUARANTINE directory=DP_EXP_DIR dumpfile=quarantine.dmp logfile=impd.log
    Please can I know what is the exact syntax to import in the differnet schema.
    thanks.

    Error when importing is
    To Import
    impdp MIPS_QUIRINO/MIPS_QUIRINO@mps01dev tables=QUARANTINE directory=DP_EXP_DIR dumpfile=quarantine.dmp logfile=impd.log
    ORA-39166: Object MIPS_QUIRINO.QUARANTINE was not found.
    Please can I know what is the exact syntax to import in the differnet schema.
    thanks.

  • EXPORT ONLY TABLES IN A SCHEMA USING DATA PUMP

    Hi folks,
    Good day. I will appreciate if I can get a data pump command to export only TABLE oBJECT in a specific shema .
    The server is a 4 node RAC with 16 CPU per node.
    Thanks in advance

    If all you want is the table definitions, why can you use something like:
    expdp user/password direcory=my_dir dumfile=my_dump.dmp tables=schama1.table1,schema1.table2,etc content=metadata_only include=table
    This will export just the table definitions. If you want the data to, then remove the content=metadata_only, if you want the dependent objects, like indexes, table_statistics, etc, then remove the include=table.
    Dean

  • Error while exporting a schema using data pump

    Hi all,
    I have 11.1.0.7 database and am using expdp to export a schema. The schema is quite huge and has roughly about 4 GB of data. When i export using the following command,
    expdp owb_exp_v1/welcome directory=dmpdir dumpfile=owb_exp_v1.dmp
    i get the following error after running for around 1 hour.
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.UNLOAD_METADATA [TABLESPACE_QUOTA:"OWB_EXP_V1"]
    ORA-22813: operand value exceeds system limits
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.KUPW$WORKER", line 7839
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    4A974B9C 18237 package body SYS.KUPW$WORKER
    4A974B9C 7866 package body SYS.KUPW$WORKER
    4A974B9C 2744 package body SYS.KUPW$WORKER
    4A974B9C 8504 package body SYS.KUPW$WORKER
    4A961BF0 1 anonymous block
    4A9DAA4C 1575 package body SYS.DBMS_SQL
    4A974B9C 8342 package body SYS.KUPW$WORKER
    4A974B9C 1545 package body SYS.KUPW$WORKER
    4A8CD200 2 anonymous block
    Job "SYS"."SYS_EXPORT_SCHEMA_01" stopped due to fatal error at 14:01:23
    This owb_exp_v1 user has dba privileges. I am not sure what is causing this error. I have tried running it almost thrice but in vain. I also tried increasing the sort_area_size parameter. Even then, i get this error.
    Kindly help.
    Thanks,
    Vidhya

    Hi,
    Can you let us know what the last object type it was working on? It would be the line in the log file that looks like:
    Processing object type SCHEMA_EXPORT/...
    Thanks
    Dean

  • How to create/import a target schema from a source schema using data pump?

    I have seen some examples where schema remapping will be done through remote link which I cannot as both the target schema and source schema are in same machine ...but I am not sure how to do it with out using remote link? I would be great if some one could provide a example
    Thanks in Advance

    I'm not sure what you are asking here, but I'll try to give some examples on remapping a schema:
    expdp prived_user/password schemas=orig_schema_1 directory=dpump_dir dumpfile=orig_schema_1.dmp
    impdp prived_user/password schemas=orig_schema_1 directory=dpump_dir dumpfile=orig_schema_1.dmp remap_schema=orig_schema_1:new_schema_1
    If you want to try without a dumpfile then you need a loop back dblink.  (A dblink on your database that points to the same database.  This would be your command:
    impdp prived_user/password schemas=orig_schema_1 directory=dpump_dir network_link=loop_back_link remap_schema=orig_schema_1:new_schema_1
    Hope this helps.  If not, can you explain your question a little more?
    Dean

  • Import schemas using data pump

    Hi
    I have taken full schema export dump using exp ..
    (expdp username/password directory=dump dumpfile=scott.dmp schams=scott)
    When i try to import this dump into another schema , i am getting the error user scott doesn't exist.. How to over come this.. put ur ideas and suggestions
    following is the command i tried:
    (impdp username/pasword directory=dump dumpfile=scott.dmp)
    (impdp username/pasword directory=dump dumpfile=scott.dmp schemas=test)

    Hi
    You can watch the documentation for import.
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96652/ch02.htm#1005922
    Think you have to use the "FROMUSER", "TOUSER" clause for import.
    Hope it helps

  • Using data dictionary

    Hi everyone,
    I am a new user to Oracle 10g XE.
    I would like to know if there is any way for me to list the size of each object in my current schema follow by the object name.
    Any advice / help would be appreciated.
    Regards

    Hello,
    You may use the following query:
    connect <schema_user>/<password>
    select segment_name, segment_type, bytes/(1024*1024) "MB"
    from user_segments
    order by bytes desc;It will list all the Segments (Tables, Index, ...) belonging to the current Schema from the largest one to the smallest one.
    The View user_segments has also a column tablespace_name which can give you the name of the Tablespace where the Segment is stored.
    Hope this help.
    Best regards,
    Jean-Valentin
    Edited by: Lubiez Jean-Valentin on Feb 20, 2011 9:37 AM

  • Query to list tables with a particular column name in a schema!!

    Is there any way to know?
    Thanks in advance.

    You can query the data dictionary views to get this information.
    For example
    untested
    select table_name
    from user_tab_columns
    where column_name = 'my particular column name';There is also all_tab_columns and dba_tab_columns. Both of which would include the schema name.
    Edited by: Sven W. on Sep 9, 2011 2:24 PM

  • SQL query to see table names for specific columns

    hi
    i have a database containing more than 100 tables. I want to see all the tables containg a column 'Employee_id'. plz tell me SQL query some other way.
    Thanks

    Time to learn data dictionary basics
    SELECT DISTINCT table_name
    FROM all_tab_cols
    WHERE column_name ='EMPLOYEE_ID';

  • What are the 'gotcha' for exporting using Data Pump(10205) from HPUX to Win

    Hello,
    I have to export a schema using data pump from 10205 on HPUX 64bit to Windows 64bit same 10205 version database. What are the 'gotcha' can I expect from doing this? I mean export data pump is cross platform so this sounds straight forward. But are there issues I might face from export data pump on HPUX platform and then import data dump on to Windows 2008 platform same database version 10205? Thank you in advance.

    On the HPUX database, run this statement and look for the value for NLS_CHARACTERSET
    SQL> select * from NLS_DATABASE_PARAMETERS;http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_4218.htm#sthref2018
    When creating the database on Windows, you have two options - manually create the database or use DBCA. If you plan to create the database manually, specify the database characterset in the CREATE DATABASE statement - http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_5004.htm#SQLRF01204
    If using DBCA, see http://docs.oracle.com/cd/B19306_01/server.102/b14196/install.htm#ADMQS0021 (especially http://docs.oracle.com/cd/B19306_01/server.102/b14196/install.htm#BABJBDIF)
    HTH
    Srini

  • OBIEE to properly query tables in target schema using "Mixed_Case" names

    We encounter the following error when using the BI Administration tool (to update a row count of a physical table) or the Analysis tool (to run a query) 11g against our target schema:
    View Display Error
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 17001] Oracle Error code: 942, message: ORA-00942: table or view does not exist at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
    SQL Issued: SELECT 0 s_0, "OTM"."Cheese"."Cheese" s_1 FROM "OTM" FETCH FIRST 65001 ROWS ONLY
    The reason for this error seems to be that our target schema contains tables that have quotes in the name when the table is created, which I understands enforces the preservation of letter case-- in this case Mixed_Case names. Since this is not "our own" application, we don't really have any control over how the schema is created or the table/views named. Interestingly enough, the table appears in the BI Administration with the expected columns though the querying for rows count and data fails.
    One way we've worked around this is to manually create a VIEW of the table of interest in the target schema using all capitals. This works, but seems unnecessarily messy, especially if we are interested in using a VIEW that is already created as part of the schema.
    I have found the following various discussions about setting the NQSConfig.ini file on line, but changing the value and restarting the OBIEE server doesn't seem to make a difference.
    # Case sensitivity should be set to match the remote
    # target database.
    CASE_SENSITIVE_CHARACTER_COMPARISON = ON;
    Are there other ways to get OBIEE to recognize mixed-case table names?

    BI Admin: Physical / Database / Features tab / (scroll to bottom or use Find) IDENTIFIER_QUOTE_CHAR: set this to a double quote: "

Maybe you are looking for

  • IPhoto 6 bug(not on iPhoto 5)

    Why I can't import images with "Color space: CMYK" ?? I can only import images with "Color space: RGB". I got this error everytime I try to import CMYK images Unreadable Files: The following file could not be imported. (The import failed) .(list of f

  • Soundtrack Pro and Compressor greyed out on installation

    For some reason the option to install Soundtrack Pro and Compressor are greyed out when performing installation of Logic Stdio. I had installed Logic Studio previously but ran out of disk space and so uninstalled the program, upgraded my hard drive a

  • Need Help with scope in event handlers in AS 2.0!

    I am trying to integrate an XML loading script into my FLA. I got the script from a book (I'm learning this) and it worked fine when in a timeline frame (loaded all perfectly well), but when I put it into an AS 2.0 class (which I'd been using with ha

  • A problem about CodeSign error

    Hi all, I've download a sample code "MoviePlayer" form Apple webside and tried to install it to my iPhone device. But an error message was showed as "CodeSign error: code signing is required for product type 'Bundle'in SDK 'Device - iPhone OS 2.2.1'"

  • Closing PrintWithDialog()

    Hi guys, I am opening a PDF document in a child browser window and calling PrintWithDialog() in order to display the print dialog to encourage our users to print a document. What I then want to do is to close that dialog, or close the browser, while