Dba_jobs_running dictionary view

i'm trying to query the dba_jobs_running dictionary view from PL/SQL procedure and am getting
Table or view does not exists Error at compile Time.
I also tried the same using Execute Immediate and am getting the same error
Table or view does not exists Error at run Time.
Also when I query the same dba_jobs_running from SQL*Plus
i am getting the required output.
The Oracle Version i'm using is 9.2.0.1.0
I tried all the above steps in Oracle version 8.1.5.0.0
and am not getting the above errors
Table or view does not exists(inside PL/SQL Procedure)
Pls can any one help me on the same.

Try SYS.dba_jobs, maybe there isn't a public synonym for that view.

Similar Messages

  • Can we determine path of my INIT.ORA file from data dictionary views.

    Hello Guru’s
    I am new to oracle, My question is for the sake of my knowledge: I work on oracle 10G.
    Is there any data dictionary view from where I can get the path of my INIT.ORA file.
    Regards,

    NewDay wrote:
    Hello Guru’s
    I am new to oracle, My question is for the sake of my knowledge: I work on oracle 10G.
    Is there any data dictionary view from where I can get the path of my INIT.ORA file.
    AFAIK , its no. You can check the path from the show parameter command like following,
    SQL> show parameter spfile
    NAME                                 TYPE
    VALUE
    spfile                               string
    /u01/app/oracle/product/10.2.0
    /db_1/dbs/spfileorcl.ora
    SQL>HTH
    Aman....

  • In which Data Dictionary View I can find ...

    Hello,
    I will do a Overview over all of our Full Backups.
    I am searching in the Data Dictionary Views but I colud not found the right information.
    I could find a nice overview over the last redo log archive etc but no overview over the full backups?!
    In which view I can find these informtaion?
    Thanks in advance!

    Check Summary of RMAN Recovery Catalog Views for the data dictionary views for RMAN.

  • H2 devide implicit and explicit created indexes by dictionary views?

    For migrating amounts of data it is useful to drop and recreate indexes and referencing constaints. A implicit created index by defining a primary/unique key constraint will be dropped implicitly by dropping the before mentioned constraint. Creating such a constraint after creating an equivalent index with the constraint name will result in an other behaviour. The explicit created index will not be dropped by dropping the referencing primary/unique key constraint.
    So far so good and well known. The question is: Which dictionary view columns will show me the difference between implicit and explict created indexes if I try to dynamically drop and recreate indexes and unique / primary key constraints?

    Oracle Version is always helpful in answering questions, but for 9i you can find the system generated by:
    dba_indexes.generated = 'Y'
    or
    'SYS_' naming convention for system generated indexes
    or
    dba_constraints.constraint_name = dba_constraints.index_name
    Hope this helps - JTommaney

  • Linking two fields in a dictionary view to the same field

    My DBA asked me if I knew how to do this without resorting to ABAP code, and I said I'd ask you guys over here.
    A customer wants a view on several tables.  Vendor name from LFA1 is one of the
    columns in the view.
    He has two other columns in the view which can hold two different vendor numbers at the same time.
    He wants the view to automatically bring in the names from LFA1 from both of them.
    My DBA knows how to do this directly in DB2, of course, but can it be done in native SAP dictionary ???
    Reason he's asking is because he suspects the customer wants to use the view directly in SQLQuery, where there's no chance for an ABAP code intercept.
    Or is there?  Are there ABAP exits in dictionary views?  Or in SQLQueries?

    Hi
    We can straight away write a select statement to a database view similar to a TABLE in ABAP
    see the sample views VIAUFKS and VIAUF_AFVC
    and see the select statement below for this view
    CLEAR: i_ord.
      REFRESH: i_ord.
      SELECT aufnr            " PM Order No
             equnr            " Equipment Number
             tplnr            " Functional Location
             auart            " Order Type
             aedat            " Order Date
             swerk            " Maintenance Plant
             werks            " Plant
             ktext            " Order Text
             kokrs            " Controlling Area
             objnr            " Object Id
             kostl            " Cost Center
        INTO TABLE i_ord
        FROM viaufks
        WHERE aufnr IN s_aufnr AND
              equnr IN s_equnr AND
              tplnr IN s_tplnr AND
              swerk IN s_swerk AND
              aedat IN s_date  AND
              auart IN s_auart.
    Reward points for useful Answers
    Regards
    Anji

  • Various Data DIctionary VIews

    After posting something here a few days back about the myriad views needing to be digested for the Fund.I Exam, I have just gleaned this lot from the Couchman book. No doubt some of the pros out there may well correct me, but this is simple what I have collected from the book, in the last 3 hours. Cheers.
    Dictionary Views
    Data Dictionary
    Which users are in the database password file:
    V$PWFILE_USERS
    Where values set in the init.ora file can be viewed – all parameters:
    V$PARAMETER
    Script used to create the objects that comprise the data dictionary:
    catalog.sql
    To grant a special role to users so they can look at DBA views:
    SELECT_CATALOG_ROLE
    Information about all database objects in the database:
    DBA_OBJECTS
    Information about all tables in the database:
    DBA_TABLES
    Information about all indexes in the database:
    DBA_INDEXES
    Information about all views (including dictionary views) in the database:
    DBA_VIEWS
    Information about all sequences in the database:
    DBA_SEQUENCES
    Information about all users in the database:
    DBA_USERS
    Information about all constraints in the database:
    DBA_CONSTRAINTS
    Information about all table columns that have constraints on them:
    DBA_CONS_COLUMNS
    Information about all columns that have indexes on them in the database:
    DBA_IND_COLUMNS
    Information about all columns in all the tables in the database:
    DBA_TAB_COLUMNS
    Information about all the roles in the database:
    DBA_ROLES
    Information about all object privileges in the database:
    DBA_TAB_PRIVS
    Information about all system privileges granted to all users in the database:
    DBA_SYS_PRIVS
    Displays all PL/SQL source code in the database:
    DBA_SOURCE
    Information about all triggers in the database:
    DBA_TRIGGERS
    Information about object privileges granted to roles
    ROLE_TAB_PRIVS
    Information about system privileges granted to roles
    ROLE_SYS_PRIVS
    Information about roles granted to roles
    ROLE_ROLE_PRIVS
    Information about all tablespaces in the database:
    DBA_TABLESPACES
    Information about all profiles in the database:
    DBA_PROFILES
    For all parameters?
    V$PARAMETER
    General information about the database mounted to your instance:
    V$DATABASE
    Most information about the performance of the database is kept here:
    V$SYSSTAT
    Most information about the performance for individual user sessions is stored here:
    V$SESSION , V$SESSTAT
    Information about online redo logs (2)
    V$LOG, V$LOGFILE
    Information about datafiles
    V$DATAFILE
    Basic information about control files, and the two columns it has:
    V$CONTROLFILE. STATUS / NAME
    An object you can query to obtain a listing of all data dictionary objects (4)
    CATALOG, CAT, DICTIONARY, DICT.
    When the control file was created, Sequence Number, most recent SCN:
    V$DATABASE
    Information stored in different sections of the control file, Sequence Number:
    V$CONTROLFILE_RECORD_SECTION
    To see the names and locations of all control files in the db? (2)
    V$PARAMETER. V$CONTROLFILE
    Tablespace and Datafiles
    Temporary Segments:
    Name, tablespace location, and owner of temporary segments:
    DBA_SEGMENTS
    Size of temporary tablespaces, current number of extents allocated to sort segments, and sort segment high-water mark information. Space usage allocation for temporary segments:
    V$SORT_SEGMENT
    Types of sorts that are happening currently on the database
    V$SORT_USAGE
    To see the username corresponding with the session:
    V$SESSION
    Information about every datafile in the database associated with a temporary tablespace:
    DBA_TEMP_FILES
    Similar to DBA_TEMP_FILES, this performance view gives Information about every datafile in the database associated with a temporary tablespace:
    V$TEMPFILE
    Storage Structures
    A summary view, contains all types of segments and their storage parameters, space utilization settings:
    DBA_SEGMENTS
    Tablespace quotas assigned to users:
    DBA_TS_QUOTAS
    Segment name, type, owner, total bytes of extent, name of tablespace storing the extent:
    DBA_EXTENTS
    The location and amount of free space by tablespace name:
    DBA_FREE_SPACE
    The location of free space in the tablespace that has been coalesced:
    DBA_FREE_SPACE_COALESCED
    Information about datafiles for every tablespace
    DBA_DATAFILES
    Performance view for information for datafiles for every tablespace
    V$DATAFILE
    To see the total amount of space allocated to a table?
    DBA_EXTENTS
    Table creation timestamp, information about the object ID:
    DBA_OBJECTS
    High water mark, all storage settings for a table, and statistics collected as part of the analyze (for row migration) operation on that table
    DBA_TABLES
    Information about every column in every table:
    DBA_TAB_COLUMNS
    To determine how many columns are marked unused for later removal?
    DBA_UNUSED_COL_TABS
    To find the number of deleted index entries ?
    INDEX_STATS
    To determine the columns on a table that have been indexed:
    DBA_ID_COLUMNS
    The dynamic view to show whether the index is being used in a meaningful way?
    V$OBJECT_USAGE
    To see whether a constraint exists on a particular column?
    DBA_CONS_COLUMNS
    To see the constraints associated with a particular table:
    DBA_CONSTRAINTS
    To find the username, ID number, (encrypted) password, default and temporary tablespace information, user profile of a user, password expiry date:
    DBA_USERS
    To all objects, which objects belong to which users, how many objects a user has created?
    DBA_OBJECTS
    Resource-usage parameters for a particular profile:
    DBA_PROFILES
    Identifies all resources in the database and their corresponding cost:
    RESOURCE_COST
    Identifies system resource limits for individual users:
    USER_RESOURCE_LIMITS
    Shows all system privileges:
    DBA_SYS_PRIVS
    Show all object privileges:
    DBA_TAB_PRIVS
    Shows all privileges in this session available to you as the current user:
    SESSION_PRIVS
    Views for audits currently taking place are created by this script:
    cataudit.sql
    a list of audit entries generated by the exists option of the audit command:
    DBA_AUDIT_EXISTS
    A list of audit entries generated for object audits:
    DBA_AUDIT_OBJECT
    A list of audit entries generated by session connects and disconnects:
    DBA_AUDIT_SESSION
    A list of audit entries generated by statement options of the audit command:
    DBA_AUDIT_STATEMENT
    A list of all entries in the AUD$ table collected by the audit command:
    DBA_AUDIT_TRAIL
    To determine the roles available in the database, the names of all the roles on the database and if a password is required to use each role:
    DBA_ROLES
    Names of all users and the roles granted to them:
    DBA_ROLE_PRIVS
    All the roles and the roles that are granted to them:
    ROLE_ROLE_PRIVS
    Which system privileges have been granted to a role:
    DBA_SYS_PRIVS
    All the system privileges granted only to roles:
    ROLE_SYS_PRIVS
    All the object privileges granted only to roles:
    ROLE_TAB_PRIVS
    All the roles available in the current session:
    SESSION_ROLES
    Which object privilege has been granted to a role:
    DBA_TAB_PRIVS
    To display the value of the NLS_CHARACTERSET parameter:
    NLS_DATABASE_PARAMETERS
    DA

    You can also find a lot of stuff by doing:
    SELECT *
    FROM dictionary;

  • Oracle dictionary view 2 find the queries run and it's execution time

    Hi All,
    I s there any oracle dictionary view which captures the queries being run by users on the database and time taken to execute those queries?
    We need to find out the OS user not the database user since we have to identify the users who are executing long running queries.
    We require this basically to monitor the long running queries on the database.
    Thanks in Advance

    Hi,
    welcome to the forum!
    Oracle doesn't store information about individual executions of SQL queries (that would've been too expensive), but you can find cumulative query execution stats in V$SQL. If you are interested in queries by a specific OS user, then Active Session History can help you (provided you have the Diagnostic Pack License).
    Best regards,
    Nikolay

  • Result_cache and data dictionary views

    Hi,
    Are there any special considerations when caching the results of a function which uses data dictionary views to determine it's results?
    This question has popped because I have a such a result_cached function for which the result_cache objects are not getting invalidated even when the underlying data dictionary views have changed and the function gives 'stale' values in it's output. Adding the relies_on clause has not helped either.
    Here is what I am trying to do:
    The function accepts table name as its input and tries to determine all the child tables using the sys.dba_constraints view. The results are returned in a pl/sql table and are cached so that the subsequent calls to this function use the result_cache.
    Everything works fine for the parent/child tables which have been created before the creation of this function. All the results are correct.
    The problem starts when a new child table is added to an existing parent table.
    The v$result_cache_objects view shows the result of this function as 'Published' and the output of the function does not show the newly created child table.
    Same is the case when an existing child table is deleted; the function continues to return it in the output as it is pulled from the result_cache.
    Oracle version:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production

    >
    Restrictions on Result-Cached Functions*
    To be result-cached, a function must meet all of these criteria:
    * It is not defined in a module that has invoker's rights or in an anonymous block.
    * It is not a pipelined table function.
    * It does not reference dictionary tables, temporary tables, sequences, or nondeterministic SQL functions.
    For more information, see Oracle Database Performance Tuning Guide.
    * It has no OUT or IN OUT parameters.
    * No IN parameter has one of these types:
    o BLOB
    o CLOB
    o NCLOB
    o REF CURSOR
    o Collection
    o Object
    o Record
    * The return type is none of these:
    o BLOB
    o CLOB
    o NCLOB
    o REF CURSOR
    o Object
    o Record or PL/SQL collection that contains an unsupported return type
    It is recommended that a result-cached function also meet these criteria:
    * It has no side effects.
    For information about side effects, see "Subprogram Side Effects".
    * It does not depend on session-specific settings.
    For more information, see "Making Result-Cached Functions Handle Session-Specific Settings".
    * It does not depend on session-specific application contexts.
    >
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17126/subprograms.htm#LNPLS698

  • Reporting on Data Dictionary Views

    We are in the process of documenting our database, and it seems like there should be an easy way of doing so, given all the information provided in the data dictionary views. I haven't used Oracle Reports yet, and I was wondering if it will create reports based on these tables/views. I tried Crystal, and it does not see these views. I assume I could write a SQL statement with formatting to create a text report, but I would rather use the Reports tool. Will this work? Is there another tool/better way to document the relationships, constraints, etc., etc., of the database?

    Oracle Designer - This is the best tool to use for your requirements. impact analysis reports, db design, reverse engineering and uml modelling etc... all in one tool.
    Regards
    Simon.

  • Create custom dictionary viewer

    Hello there!
    I've got a digital version of a very old but very good German-Latin dictionary (maybe German users know Digitale Bibliothek), however the GUI which I have to wrap in wine is absolutely not KISS and it doesn't fit into my workflow in a tiling wm. I just discovered that I can export the whole dictionary into different formats notably XHTML, which should make it possible to create a more user friendly interface.
    The situation is as follows:
    A file which contains all the German and latin lemmata alphabetically sorted (Latin and German mixed); sample:
    abhinc#A139
    abhold#C60768
    abholen#C60769
    Abholen#D60769
    abholzen#C60770
    abhorchen#C60771
    abhorreo#A140
    abhorresco#A142
    abhorride#A143
    A file which contains all the data; sample:
    <p><a id="p0000139" /><strong>ab-hinc</strong>, Adv. I) <em>räumlich =</em> <em><strong>von hier,</strong></em> aufer abhinc lacrimas, Lucr. 3, 953 (954): toto abhinc orbe, Apul. flor. 16. – II) <em>in der Zeit:</em> 1) <em>von der gegenwärtigen Zeit rückwärts gerechnet,</em> a) <em>absol. =</em> <em><strong>von jetzt an,</strong></em> dies abhinc quintus an sextus est, cum etc., Apul.: centesimo usque abhinc saeculo, Fronto: anno abhinc tertio, Gell. – b) <em>mit</em> Acc. = <em><strong>seit nun, vor,</strong></em> abhinc annos sedecim, Caes.: abhinc annos prope viginti, Cic.: abhinc triennium, Cic., <em>Komik. u.</em> Apul. – c) <em>mit</em> Abl. = <em><strong>vor, vor ungefähr,</strong></em> qui abhinc sexaginta annis occisus foret, Plaut.: comitiis iam abhinc diebus triginta factis, Cic. <em>Vgl. (über</em> no. a <em>u.</em> b) <em>Madvig Bemerkgg. S. 65 f. Lorenz zu</em> Plaut. most. 479. – 2)<em> selten von der gegenwärtigen Zeit vorwärts gerechnet, absol. =</em> <em><strong>von jetzt an, von hier</strong></em> <em>od.</em> <em><strong>da ab,</strong></em> Pallad. 4, 13, 9. Symm. ep. 4, 59: <em>verb.</em> inde abhinc, Pacuv. 21.</p>
    <div class="db5PageBreak"> </div>
    <p> </p>
    <p><a id="p0000140" /><strong>ab-horreo</strong>, uī, ēre, I) <em>vor etwas</em> <em><strong>zurückschaudern,</strong></em><em> etwas</em> <em><strong>verabscheuen,</strong></em> <em>gegen etwas</em> <em><strong>eine starke Abneigung haben,</strong></em> <em>von etwas</em> <em><strong>aus Abscheu oder Abneigung fernbleiben, -nichts wissen wollen,</strong></em> <em>jmdm. od. einer Sache</em> <em><strong>abhold sein,</strong></em> <em>gegen jmd. od. etwas</em><em><strong> eingenommen sein,</strong></em> <em>m.</em> ab <em>u. Abl.,</em> ab hac domo, Titin.: a pace, Caes.: ab re uxoria, Ter.: a ducenda uxore, Cic.: a Berenice, Tac.: <em>mit bl.</em> Abl. <em>(s. Nipperd. zu</em> Tac. ann. 14, 21), tanto facinore procul animo, Curt.: non abh. spectaculorum oblectamentis, Tac. – <em>nachaug. m.</em> Acc., cadaverum tabem, Suet.: pumilos, Suet.: exemplum huius modi, Dict.: <em>m.</em> Infinit., Augustin. serm. 184, 3. Porphyr. Hor. carm. 1, 1, 16. – <em>absol.,</em> sin plane abhorrebit et absurdus erit,<em> sollte er aber dazu gar keine Neigung u. Fähigkeit haben,</em> Cic. de or. 2, 85: omnes aspernabantur, omnes abhorrebant, Cic. Clu. 41: ut aut cupiant (sc. reo) aut abhorreant, Cic. de or. 2, 185: postquam abhorrere eos videt, Auct. b. Afr. 73, 5. – II) <em>übtr., gleichs. von Natur mit etwas</em> <em><strong>nicht im Einklang-, im Widerspruch stehen, unverträglich-,</strong></em> <em>ihm</em> <em><strong>zuwider sein, nicht zusagen, zuwiderlaufen,</strong></em> <em>zu etwas</em> <em><strong>nicht passen,</strong></em> <em>von etw.</em> <em><strong>abweichen,</strong></em> <em>von etw.</em> <em><strong>verschieden-, fern-,</strong></em> <em>ihm</em> <em><strong>fremd sein,</strong></em> ab oculorum auriumque approbatione, <em>den Augen und Ohren anstößig sein,</em> Cic.: oratio abhorret a persona hominis gravissimi, Cic.: abh. a fide, <em>unglaublich sein,</em> Liv.: consilium abhorret a tuo scelere, Cic.: spes ab effectu haud abhorrens, <em>Hoffnung der Ausführbarkeit,</em> Liv.: temeritas tanta, ut non procul abhorreat ab insania, Cic.: longe ab ista suspicione abhorrere debet, Cic.: a quo (vitae statu) mea longissime ratio voluntasque abhorret, Cic.: orationes abhorrent inter se, <em>widersprechen einander,</em> Liv.: <em>m. bl.</em> Abl. <em>(s. Nipperd. zu</em> Tac. ann. 14, 21), abhorrens peregrinis auribus carmen, Curt.: neque abhorret vero, Tac.: nec abhorrebat moribus uxor, Flor.: <em>u.m. bl.</em> Dat., huic tam pacatae profectioni abhorrens mos, Liv.: nec abhorret a veritate <em>m.</em> folg. Acc. <em>u.</em> Infin., Suet. Cal. 12, 3. – <em>Dah.</em> abhorrens, <em><strong>unpassend, unstatthaft,</strong></em> carmen nunc abhorrens, Liv.: vestrae istae absurdae atque abhorrentes lacrimae, Liv. – ☞ Abl. abhorrenti, Gell. 10, 12, 10.</p>
    <div class="db5PageBreak"> </div>
    <p> </p>
    <p><a id="p0000142" /><strong>ab-horrēsco</strong>, ere, <em><strong>einen Abscheu bekommen,</strong></em> Eccl.<em> u.</em> Gloss.</p>
    <div class="db5PageBreak"> </div>
    Note how the id of the anchor tags correspond to the lemmata (the uppercase letter after the # may be ignored, it indicates the language or section of the lemma in the original binary file).
    In a quick-n-dirty approach I hacked a bash script (I am a bloody beginner) making use of dmenu and lynx:
    #!/bin/bash
    # display dmenu with all the lemmata, strip the id's (lemmatas in the file "data/lemmata")
    lemma="$(cat data/lemmata | sed -e 's/#[A-Z][0-9]*$//g' | dmenu)"
    # search for the selected lemmata to get the whole string with the id
    str="$(grep "^${lemma}[ .0-9()]*#[A-Z][0-9]*$" "data/lemmata")"
    id="${str#*\#[A-Z]}"
    # finally take the definition from the xml and pipe output to lynx
    awk "/<a id=\"p0*${id}\" \/>/,/<div class=\"db5PageBreak\">/{if (!/<div class=\"db5PageBreak\">/)print}" < data/dictionary.xml | lynx -stdin
    The script fires up dmenu which displays all the lemmata with all the identifiers (#<number>) stripped, then it searches the selected lemma in the lemmata file again to find the identifier and finally then the corresponding paragraph(s) is (are) taken and piped to lynx. (Using the tee program I could bind the script to a keybinding and open/close a terminal window displaying lynx)
    However this is not robust -  there are identical Latin and German lemmata:
    ab#B43
    ab#C60601
    So the approach above must fail because I don't pipe the identifiers to dmenu. I could alter the list which gets piped to dmenu to
    ab [de]
    ab [lat]
    and could then get back to the identifier...
    But the longterm goal would be a more suitable custom console interface: I am thinking of
    a terminal window which is divided into two parts, the left showing the lemmata, the right showing the definition of the lemma currently selected (think of something like a console music player, e.g. moc)
    possibility of an on the fly dmenu-like search of the lemmata while typing
    for the viewer part: automatical wrapping of the lines, colored text for <strong> and <em> tags, stripping of the HTML, scrolling (a lemma definition/translation may be very long) and display of UTF-8
    I tend to hack this in C as I lack the knowledge of any other language (as an emacs user I also thought of using emacs and displaying the definitions in w3m but I don't know any lisp other then setting variables...).
    So my questions are:
    Is this doable? If yes, which libraries should I consider? (ncurses, libhtml....)
    Does anyone know a program which does something similar?
    So far this would be my first program which makes use of menues, so any suggestions are very welcome! Any other ideas how to access lemmata and their definitions in a simple manner?
    Last edited by ball (2013-06-19 09:44:33)

    As you may have seen from the lack of replies, this is a bit hard to advise on.  Things that occur to me:
    Rather than a library, you could use regular expressions for parsing, as you already did with awk.  They are available in C via POSIX functions, see the regex (3) manual page.
    If all input you need is a decision between a small number of duplicate words, curses seems overkill.  Why not print all of them?  If you want more interaction, using curses is probably the right thing.
    Personally I would probably use Perl for this task, which is the most productive programming language I know and is especially suited for text processing.  Seeing the rather advanced shell script you wrote (definitely more than beginner level), you may like it, as it was inspired by the shell scripts using sed, awk and the like.

  • Data dictionary views

    Hi,
    What are the the views in the data dictionary that store the user packages (spec, body, function list and parameters etc) ?
    TIA.
    Stephan

    You could always DESCRIBE (or DESC) the package, function, or procedure to get the overview
    SQL> desc pkg_test
    PROCEDURE READ_FILE
    PROCEDURE WRITE_FILE
    Argument Name                  Type                    In/Out Default?
    P_PKG                          VARCHAR2                IN

  • Optimizing query against Dictionary views

    I have some tables which contain varray of objects. I need a quick way to get a list of the attributes of each of those objects, and the data types they are.
    I came up with this query. It runs in 16 seconds in my database for a table with 2 varrays, each of an object with 2 attributes (4 rows returned). In the PL/SQL program needing this info, I have implemented a 3 cursors manual nested loop version of this that runs in sub-second.
    Just curious for curiosity's sake if anybody had any tips on how to speed the single query version?
    select
    dtc.owner table_owner
    ,dtc.table_name table_name
    ,dtc.column_name column_name
    ,dtc.data_type varray_type
    ,dct.elem_type_owner varray_element_owner
    ,dct.elem_type_name varray_element_type
    ,dct.upper_bound max_element_count
    ,dta.attr_name attribute_name
    ,dta.attr_type_name
    from all_tab_columns dtc
    ,all_coll_types dct
    ,all_type_attrs dta
    where dtc.owner = :OWNER
    and dtc.table_name = :TABLE_NAME
    and dtc.data_type_owner is not null
    and dtc.data_type_owner = dct.owner
    and dtc.data_type = dct.type_name
    and dct.elem_type_owner = dta.owner
    and dct.elem_type_name = dta.type_name;

    1. You can check if your current optimizer setting affects this query: Just set for your particular session the "optimizer_features_enable" back to the default "10.2.0.4" using ALTER SESSION or use the "OPTIMIZER_FEATURES_ENABLE('10.2.0.4')" hint (undocumented, so better use the ALTER SESSION command) as part of your statement to check if the execution is any different.
    2. Are you aware of any other optimizer related parameters that are set to non-default values?
    3. Can you check in the DBA_SCHEDULER_JOBS view if the GATHER_STATS_JOB is ENABLED and the LAST_START_DATE of the job?
    4. Sometimes you can help the optimizer by providing more information, although in this case it's a bit inaccurate, because the TYPE owner might of course be different from the table owner:
    select
    dtc.owner table_owner
    ,dtc.table_name table_name
    ,dtc.column_name column_name
    ,dtc.data_type varray_type
    ,dct.elem_type_owner varray_element_owner
    ,dct.elem_type_name varray_element_type
    ,dct.upper_bound max_element_count
    ,dta.attr_name attribute_name
    ,dta.attr_type_name
    from all_tab_columns dtc
    ,all_coll_types dct
    ,all_type_attrs dta
    where dtc.owner = :OWNER
    and dtc.table_name = :TABLE_NAME
    and dtc.data_type_owner is not null
    and dtc.data_type_owner = dct.owner
    and dct.owner = :OWNER
    and dtc.data_type = dct.type_name
    and dct.elem_type_owner = dta.owner
    and dta.owner = :OWNER
    and dct.elem_type_name = dta.type_name;As already mentioned, this is only applicable if the owner is the same for all the objects. You could also try to omit the join on the owner and use only the bind variables as shown.
    5. Can you post your "tuning" attempt? I assume you tried to use the WITH-clause and the (undocumented) MATERIALIZE hint to materialize a part of the query?
    6. Are you aware of any unusual high number of dictionary objects in your database, e.g. thousands of tables, types, synonyms etc. that might lead to partially large SYS base tables, like SYS.OBJ$?
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Can not select from data dictionary view from a procedure

    Hi,
    I wonder, which privilege is missing here:
    my schema has this roles and privs:
    GRANT CONNECT, RESOURCE TO cb ;
    GRANT CREATE SESSION TO cb ;
    GRANT SELECT_CATALOG_ROLE TO cb ;
    GRANT CREATE SYNONYM TO CB;
    GRANT CREATE VIEW TO CB;
    I create a procedure:
    create or replace procedure dd_test as
    begin
         dbms_output.enable(2000000);
         for r in (select table_name from sys.dba_tab_partitions     where owner = 'CB') loop
                   dbms_output.put_line(r.table_name);
         end loop;
    end;
    sho err
    4/38 PL/SQL: ORA-00942: table or view does not exist
    When I run the core statement form sql prompt, it works !
    so what privilege is missing here ???
    thanks for any hint, Lao De

    Hi,
    thanks for that reply, after doing that I can not select this DD-view from sql-prompt anymore (which I don't wonder ;-). Can you tell me, what idea you had behind that test ?
    I found another instance, where the procedure works and I will compare those privileges, but it's hard to sort out that complex structure of nested roles and sys_privs.
    How ever, I will update here, when I found the missing privilege.
    regards LaoDe

  • Data Dictionary View for Procedure Text

    Hi,
    Is there a data-dictionary where I can see the body of procedures. In fact, I received a request from a collegue to give him the procedure name which access a table "table_1".
    So, my idea is to write a query as follows:
    SELECT <procedure_name> FROM <data_dictionary> WHERE <text> LIKE '%table_1%'.
    Thanks in advance.

    You can try with DBA_SOURCE or USER_SOURCE.
    i.e.
    SELECT NAME FROM DBA_SOURCE
    WHERE OWNER='<OWNER NAME>'
    AND TYPE='PROCEDURE'
    AND TEXT LIKE '%table_1%';
    Regards,
    Sabdar Syed.

  • Granting SELECT on dictionary views ... (?)

    Hi there,
    please try to find out, what I am doing wrong below:
    1. I connect as sys:
    connect sys as sysdba
    2. Create a role. Just to point out the problem, it will have just CREATE SESSION, CREATE PROCEDURE
    create role tr not identified;
    grant create session to tr;
    grant create procedure to tr;
    3. Now the problem: I want the role (users with that role) to have SELECT privilege, just on one dict-view, that is v$session:
    My first attempt is denied:
    grant select on v$session to tr;
    grant select on v$session to tr
    FEHLER in Zeile 1:
    ORA-02030: can only select from fixed tables/views
    Now this in itself is wierd. I read v$-objects are synonyms to v_$-objects. Is that right? What is the problem here? See, what happens next...
    4. grant select on v_$session to tr;
    That works!
    5. create user tu identified by tu;
    grant tr to tu;
    That works!
    6. Now connect as tu/tu
    sql*plus Test: select count(*) from v$session;
    COUNT(*)
    46
    works!
    7. Now: create a simple stored function to perform the same as my query:
    create or replace function testf
    return number
    is
    res number;
    begin
    select count(*) into res from v$session;
    return res;
    end;
    This is refused with ORA-00942: Table or view does not exist !!!
    Simple query on v$session works, but its usage inside a stored function is not allowed??? Please explain!!!
    Pointing out to the explanation in the documentation (just one link) would suffice. I just have not found an explanation for this behaviour!
    Many thanks in advance!
    Xenofon

    Ok, It seems this GRANT, even though it is an object privilege it is handled like of those privileges, which can be granted only directly to a user and not to a role;
    But on the other hand, the reaction is not the system:
    When you try to grant UNLIMITED tablespace to a role you get a definitive error message: ORA-01931.
    You don't get this error when granting SELECT on V_$SESSION to a role...
    It's getting more and more wierd...
    (Does anyone know a complete list of privs which can only be granted directly to a user? I thought it's only UNLIMITED TABLESPACE)

Maybe you are looking for

  • Queries related to web-ui configuration.

    Hi Experts, I have some queries related to web-ui configuration : I have copied standard component of Lead with values Role Key  = Zconfig key, Component Usage, Object Type, Object Subtype= Default and made some changes(renamed some fields) and assig

  • Balance sheet adjustment error

    Hi Guys, When we are running the balance sheet adjustment, F.5E , we are getting the error " correct the error eat ". when i go to display error message, it takes me to the GL account XXXXXX for this company code , and then says that this Balance she

  • Linked Object

    Hai, i can create a linked object & assign through the datasource to salesperson screen but its a problem when the sales person selected through the orrange arrow help Screen but this value should not reflect in my screen when i return to the origina

  • Ho to publisg .php files from oracle Applications R 12

    Hi, My requirement it to publish .php files from our E-Business R12 (12.1.3) application server. please provide the steps and confiuration settings to be done for this. Below are the deatils of our environment. OS : RedHat Linux 5 DB : 11.1.07 applic

  • After installing 10.7, cannot print to Fuji Xerox C3210DX

    Bother versions of the Driver 2.2 and the ps(Post script), do not work properly. The generic printer driver also does not work properly.