Name of table to data dictionary

Hi all

Please help to get the dictionary table name that can be used to get the block running (part) of a procedure, which is currently run and take a long time?

Is there any other alternative method to find the same.

I hope my question is clear.


Thank you very much in advance!

This is the query that I personally use to check queries actuive.

SELECT sid,machine, a.username, b.sql_text, a.status
  FROM v$session a ,v$sqlarea b
       where a.sql_address = b.address
   AND LOWER (status) = 'active'

For long-running queries and completion percentage, I use the following query

SELECT b.username,
  a.sid,
  b.opname,
  b.target,
  ROUND(b.SOFAR*100 / b.TOTALWORK,0)
  || '%' AS "%DONE",
  b.TIME_REMAINING,
  TO_CHAR(b.start_time,'YYYY/MM/DD HH24:MI:SS') START_TIME
FROM V$SESSION_LONGOPS b,
  V$SESSION a
WHERE a.sid         =b.sid
AND TIME_REMAINING <> 0
ORDER BY b.SOFAR/b.TOTALWORK;

Hope this will help you.

Tags: Database

Similar Questions

  • Cannot select Tables or data dictionary views

    Hello

    I have a normal user from where I want to visualize the data dictionary tables and views as DBA_ and V$ _ because I do not want to log the SYS account each time.

    I have granted all the privileges of the user, but it does not work. Here are the commands I used.

    all the privileges of the user;

    Grant sysdba to user;

    Can you help me please

    Hello

    grant this user SELECT_CATALOG_ROLE. Revoke all privileges that the user didn't need, or he would be able to do all sorts of things destructive (up to drop the entire database) by accident.

    Best regards

    Nikolai

  • Re-import table data dictionary

    Hello

    I recently created a relational model with more than 2000 paintings by importing the data from the data dictionary. Unfortunately, I left out a few tables when I originally created the template. How can I add the tables after the fact? I tried to go through the process of reimportation again, but it doesn't seem like it adds tables. Thank you!

    Hello

    Are there any error messages in the log file?  (This is normally datamodeler.log file in the datamodeler\datamodeler\log folder, unless you set a different location on the environment/log preferences page.)

    Note that if you want to update the properties of Java, the updated file is different for the version 4.0.0.833 Data Modeler.  AddVMOption reports should be updated in the product.conf file and not in the datamodeler64.conf file. Assuming you are on Windows 7, you should be able to find the product.conf file in the file C:\Users\\AppData\Roaming\Oracle SQL Developer Data Modeler\4.0.0.833.

    David

  • How to add an existing connection name already model to be able to synchronize to a data dictionary

    If I import my objects of a data dictionary I can change my objects and then sync my data dictionary (database). I'm even able to determine another connection to do this synchronization. But if I conceived my entire model from scratch, I am not able to sync to an existing data dictionary. Already, I produced my script and used to create a new scheme, with all my items in there. Now, I need to modify my objects and synchronize it at this existing data dictionary.

    Hello

    You can compare the database to import the dictionary Wizard - check 'Swap' indicator if you want to generate updated database. If you are importing at least one table in the model, you can use the synchronization feature. This step won't be necessary in the next version.

    Philippe

  • Can I use the data dictionary tables based on RLS policy?

    Hello guys, I use the package level security line to limit certain lines to some users.

    I created several roles, I want to just enable certain roles to see all the columns, but the other roles, I'm not that they see all the lines. I mean to do this I use the session_roles table data dictionary however it did not work.

    What to do in order to not allow rows of user roles?
    Can I use the data dictionary tables in RLS?


    Thank you very much.

    Polat says:
    What to do in order to not allow rows of user roles?
    Can I use the data dictionary tables in RLS?

    Ensure that:

    SQL> CREATE OR REPLACE
      2    FUNCTION no_sal_access(
      3                           p_owner IN VARCHAR2,
      4                           p_name IN VARCHAR2
      5                          )
      6      RETURN VARCHAR2 AS
      7      BEGIN
      8          RETURN '''NO_SAL_ACCESS'' NOT IN (SELECT * FROM SESSION_ROLES)';
      9  END;
     10  /
    
    Function created.
    
    SQL> BEGIN
      2    DBMS_RLS.ADD_POLICY (
      3                         object_schema         => 'scott',
      4                         object_name           => 'emp',
      5                         policy_name           => 'no_sal_access',
      6                         function_schema       => 'scott',
      7                         policy_function       => 'no_sal_access',
      8                         policy_type           => DBMS_RLS.STATIC,
      9                         sec_relevant_cols     => 'sal',
     10                         sec_relevant_cols_opt => DBMS_RLS.ALL_ROWS);
     11  END;
     12  /
    
    PL/SQL procedure successfully completed.
    
    SQL> GRANT EXECUTE ON no_sal_access TO PUBLIC
      2  /
    
    Grant succeeded.
    
    SQL> CREATE ROLE NO_SAL_ACCESS
      2  /
    
    Role created.
    
    SQL> GRANT SELECT ON EMP TO U1
      2  /
    
    Grant succeeded.
    
    SQL> CONNECT u1@orcl/u1
    Connected.
    SQL> select ename,sal FROM scott.emp
      2  /
    
    ENAME             SAL
    ---------- ----------
    SMITH             800
    ALLEN            1600
    WARD             1250
    JONES            2975
    MARTIN           1250
    BLAKE            2850
    CLARK            2450
    SCOTT            3000
    KING             5000
    TURNER           1500
    ADAMS            1100
    
    ENAME             SAL
    ---------- ----------
    JAMES             950
    FORD             3000
    MILLER           1300
    
    14 rows selected.
    
    SQL> connect scott@orcl
    Enter password: *****
    Connected.
    SQL> GRANT NO_SAL_ACCESS TO U1
      2  /
    
    Grant succeeded.
    
    SQL> connect u1@orcl/u1
    Connected.
    SQL> select ename,sal FROM scott.emp
      2  /
    
    ENAME             SAL
    ---------- ----------
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    
    ENAME             SAL
    ---------- ----------
    JAMES
    FORD
    MILLER
    
    14 rows selected.
    
    SQL> 
    

    SY.

  • DataModeler: import of the data dictionary table comments

    Hi, I begin barely using SQL DataModeler and seems to have a problem with regard to the comments of reverse engineering table.

    When you use Import > data dictionary, I have no trouble importing column comments, but the comment table always seem to come up empty. I see no obvious option for y understood/off table/column comments so am puzzled as to why column comments import very well but the comments in the table are not (Yes, the tables, I'm importing have comments on the tables and columns).

    What Miss me? Any help is appreciated.

    -Andy.

    Hi Andy,.

    There is no option for this. They should be included, but unfortunately there is a bug and not included.

    Philippe

  • Import of data dictionary

    Hello

    I have a problem with the Import of data dictionary.

    1. I have all the tables in the DB schema Oracle 11 (Test - the name of the schema).

    2 Date Modeler 4.0 I use Import / data dictionary.

    3. in the data dictionary import wizard I create the name of the connection, select schema and select objects to import.

    4. After completing this process I see the tables in the relational model but with the schema name: schema_name.table_name. I would have just table_name. I tried to use the options to compare models (before merger) but no result.

    Concerning

    Hello

    Dimitar response stop scheme displayed on the diagram name.

    If you don't want the schema name to appear in the generated DDL, you can unset the 'include schema DDL' option on the Data Modeler/DDL preferences page (which is accessible in the Help menu).

    David

  • SDDM 4.0 - synchronize the data dictionary can not detect existing CF

    I started a data model implemented in version 3 of SDDM somewhere, then had to ask for about 9 months and pick it back up.  When I picked up back, 4.0 RC3 shone, so I used to work on the old model.  Some problems have emerged, and one that is currently more frustrating is when I use the "Sync data dictionary" feature to create the DDL to change the physical table based on changes to the model that I made.

    I used to be able to just do a right-click on the table, choose Synchronize the data dictionary, and then only the changes I made would be generated.  Now, however, the function Compare seems to not be able to detect certain properties of the physical implementation table he is comparing it to.  For example, there is a table with FK 3 and compare it detects that one of them, then it attempts to create them from scratch.  Of course fails because there are actually the CF.  I tried not to drop and re-create the keys in the comics because I don't want to go to this effort for each table.

    I can post screenshots if you illustrate the problem like this.  Does anyone have advice?  It seems that there is a bug in the software.  Thank you.

    Hi Mike,.

    Thanks for reporting the problem. I logged a bug for this.

    The synchronization works without problem if all of the tables involved are included in the sync operation. The problem is caused by PK/UK constraints with system-generated names.

    You can call the synchronization on a selection of objects (one or more), on a subview or the entire model. You can use "Select neighbors" in order to obtain selected related objects or

    'Create subview with neighbors' available in the context menu for the table in the browser.

    Philippe

  • Problems with synchronization model with the data dictionary

    Let me start by saying that I do something wrong (there not much documentation on this product so far...).

    I designed my whole from scratch in SDDM 3 and then put model upgraded to SDDM 4. There is already a problem with the sync option from the data dictionary model, in which it works only if first import you an object any in the data dictionary for the model for the reverse to work. I did, and now I can't start the synchronization successfully. The thing is, but I have all the objects already created in my database, according to a specific schema, each time I start the synchronization, it always tells me that none of my model objects exist on the destination! I've tried setting the owner on the physical model, remove, modify the connection to connect with the owner objects, but nothing seems to work.

    Any ideas?

    Hello

    You need clear information source banner and rename the schema in the relational model if you want to use the Sync feature, otherwise, you can use import wizard of data dictionary (possibly to check 'target swap') and to

    don't check box "use schema property in compare features" If your schema is changed.-"preferences > Data Modeler > DOF > compare > ' or to compare options in compare dialog.

    You can clear information source banner by selecting all the objects on the diagram (Ctrl-A) and use 'Clear stamp source' in the context menu for the selected objects.

    In the next version - there are options to work around the source schema and the name of the source object, and you can use different user and change the name of the table in the physical model in order to synchronize with a different schema or even track changes in table name.

    Philippe

  • Table of data in column

    Hi all

    I was asked by an interviewer,

    I have a table with 10 columns. in this 10 columns, I have data in a single column. Is it possible to know that the name of the column in which the data are with the help of any view data dictionary.

    Sorry if I ask a stupid question.

    Thank you

    Collect statistics of the table and use USER_TAB_COLUMNS view datadictionary (or one of the related views)
    http://docs.Oracle.com/CD/E11882_01/server.112/e25513/statviews_5465.htm#REFRN26276

    SQL> create table t
      2  (c1 number,c2 number,c3 number,c4 number,c5 number,c6 number,c7 number,c8 number,c9 number,c10
    number);
    
    Table created.
    
    SQL> insert into t (c7) values (42);
    
    1 row created.
    
    SQL> begin
      2    dbms_stats.gather_table_stats(user, 'T');
      3  end;
      4  /
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from t;
    
            C1         C2         C3         C4         C5         C6         C7
    ---------- ---------- ---------- ---------- ---------- ---------- ----------
            C8         C9        C10
    ---------- ---------- ----------
                                                                              42
    
    1 row selected.
    
    SQL> select table_name
      2  ,      column_name
      3  from   user_tab_columns
      4  where  table_name = 'T'
      5  and    num_nulls = 0;
    
    TABLE_NAME                     COLUMN_NAME
    ------------------------------ ------------------------------
    T                              C7
    
    1 row selected.
    
  • data dictionary...

    is there a data dictionary where I can find the name of the base table of particular display... ?
    select text from all_views
    where view_name = 
    and owner = ;
    

    or

    select * from dba_dependencies
    where owner = 
    and lower(type) = 'view'
    and name = 
    

    Hope this helps
    Vanessa B.

    Published by: Vanessa B on November 23, 2012 12:29

  • Data dictionary... Help please

    I have create this query for my college courses. I need help. I have half of the request, according to me. Need an another join clause in the declaration for the views, do not know what to do. Any help will be appreciated! Thank you!



    Create and run a simple query on the Oracle data dictionary to show all the foreign key constraints in the HR schema. Note that the foreign key constraints are constraint type 'R '. For each constraint of the list the type of constraint, constraint name, the name of the table referencing, the position of column referencing, referencing column name, the name of the referenced constraint (i.e. the name of constraint primary key from another table), the referenced table and the columns that are referenced. Sort your results by name of constraint, table_name and position.

    TIPS: You'll need two views of different data dictionary for this query. One of the points of view should be mentioned twice in the FROM clause, and so you will need two alias names. With this agreement, you must also join two conditions.


    That's what I have so far...

    SELECT uc.constraint_type, uc.constraint_name, uc.table_name, r_constraint_name,
    UCC.table_name, ucc.position, ucc.column_name, ucc.constraint_name
    From user_constraints uc JOIN user_cons_columns ucc
    ON uc.table_name = ucc.table_name
    AND uc.constraint_name = ucc.constraint_name
    WHERE constraint_type = 'R '.
    AND IN r_constraint_name
    (SELECT constraint_name
    Of all_constraints
    WHERE constraint_type
    IN ('P', 'U')
    AND table_name = 'hr')
    ORDER BY uc.constraint_name, ucc.table_name, ucc.position;

    Try this.

    SELECT uc.constraint_type,
           uc.constraint_name,
           uc.table_name,
           uc.r_constraint_name,
           ucc1.table_name ref_table_name,
           ucc.position,
           ucc.column_name,
           ucc1.column_name ref_column_name
      FROM user_constraints uc
           JOIN user_cons_columns ucc
             ON uc.table_name = ucc.table_name
            AND uc.constraint_name = ucc.constraint_name
           JOIN user_cons_columns ucc1
             ON uc.r_constraint_name = ucc1.constraint_name
            AND ucc.position = ucc1.position
     WHERE uc.constraint_type = 'R'
    ORDER BY uc.constraint_name, ucc.table_name, ucc.position;
    

    G.

  • data dictionary views and result_cache

    Hello
    Are there special aspects when caching the results of a function that uses data dictionary views to determine its results?
    This issue arose because I have a such a result_cached function for which the result_cache objects are not get invalidated, even when the underlying data dictionary views have changed and the function gives 'fade' in it values came out. Addition of article relies_on has not helped either.

    Here's what I'm trying to do:
    The function accepts the name of the table as its input and trying to determine all the child tables by using the sys.dba_constraints view. The results are returned in a pl/sql table and are cached so that subsequent calls to this function use the result_cache.
    Everything works well for the parent/child tables that were created before the creation of this function. All the results are correct.

    The problem starts when a child table is added to an existing table in the parent.
    V$ result_cache_objects view shows the result of this function as "Published" and the output of the function do not show the child table that is newly created.
    The same is when an existing child table is deleted; the function continues to return in the output as it is extracted from the result_cache.

    Oracle version:
    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    AMT for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production

    >
    Restrictions on result caching functions *.

    To be cached in result, a function must meet all of these criteria:

    * It is not defined in a module that has the rights to the plaintiff, or in an anonymous block.
    * It is not a function table in pipeline.
    * It does not reference dictionary tables, temporary tables, sequences or not deterministic SQL.
    For more information, see Oracle Database Performance Tuning Guide.
    * It has no OUT or IN OUT parameters.
    * No parameter has one of these types:
    o BLOB
    o CLOB
    o NCLOB
    o REF CURSOR
    o Collection
    o object
    o file
    Return type is none:
    o BLOB
    o CLOB
    o NCLOB
    o REF CURSOR
    o object
    o collect Record or PL/SQL that contains a return unsupported type

    It is recommended that a result caching function also meet these criteria:

    * It has no side effects.
    For more information about side effects, see "subprogram Side Effects".
    * It is not specific to the session settings.
    For more information, see "Making Result-Cached functions manage Session-specific settings.
    * It is not specific to the session application contexts.
    >
    http://download.Oracle.com/docs/CD/E11882_01/AppDev.112/e17126/subprograms.htm#LNPLS698

  • outcome of conversion with loss of the csscan data dictionary

    Hello

    I ran csscan week last to a migration of US7ASCII to WE8ISO8859P1 character set. I was a little surprised to see the message in the .txt file that the data dictionary could not safely migrated by using the CSALTER script.

    The table was sys.histgrm$ and there were two lines which had a conversion with loss. Later, I found a script in the docs under the "how to handle Convertible or lossy data...» "documentation of globalization and executed the script. He showed me the objects that are the problem, but one of the two steps that was spoken in the docs who have discussed how to handle this error let me in a bit of a loss.

    First step was to confirm that FROMCHAR was the real character in the database. I confirmed.

    Second step was to correct the object definitions. That is my problem. The object of two who have been identified were a table and a table for that table partition. How can I determine the problem with definitions of dba_objects? How can I determine if there are special characters in the definition of the object?

    I haven't found anything on Metalink still dealing this yet so if someone can point out a note, please do.

    Thanks in advance!

    The column is of type VARCHAR2 or NVARCHAR2 (I forgot to ask for values of col$ .charsetid and col$ .charsetform columns). In a database US7ASCII, VARCHAR2 columns must not contain anything that would cause such a strange histogram endpoint value.

    You can try this:

    SELECT u.name 'Plan', 'Table' o.name, c.name "column.
    U sys.user$, o sys.obj$, sys.col$ c
    WHERE u.user # = o.owner # AND o.obj # c.obj # AND =
    (c.obj #, c.intcol #) = (SELECT obj #, intcol # sys.histgrm$ FROM WHERE ROWID = 'AAA...) »)

    This should give you the column which poses problem. Could you look at the data and see if it is actually 7-bit ASCII?

    The bug I'm talking about has not been diagnosed, I think. I'm trying to diagnose by asking yourself these questions. For this particular case, I'm trying to find out if the problem is with the abuse of the data type VARCHAR2 for the epvalue column or if you actually have these strange data in the affected column (for example, incorrectly stored encrypted values).

    The solution is simple: drop the statistics for the affected columns and re-create them after migration.

    -Sergiusz

  • A full import by using datapump will overwrite the target database data dictionary?

    Hello

    I have a 11G with 127 GB database. I did a full export using expdp as a user of the system. I'll import the created dump file (which is 33 GB) on the basis of data from 12 c target.

    When I do the full import on the 12 c database data dictionary is updated with new data. But as is it already contained data dictionary? It will also change?

    Thanks in advance

    Hello

    In addition to the responses of the other comrades

    To start, you need to know some basic things:

    The dictionary database tables are owned by SYS and must of these tables is created when the database is created.

    Thus, in the different versions of database Oracle there could be less or more data dictionary tables of different structure database,.

    so if this SYSTEM base tables are exported and imported between different versions of oracle, could damage the features of database

    because the tables do not correspond with the version of database.

    See the Ref:

    SYS, owner of the data dictionary

    Database Oracle SYS user is owner of all the base tables and a view of the data available to the user dictionary. No Oracle database user should never change (UPDATE, DELETE, or INSERT) ranks or schema objects contained in the SYS schema, because this activity can compromise the integrity of the data. Security administrator must keep strict control of this central account.

    Source: http://docs.oracle.com/cd/B28359_01/server.111/b28318/datadict.htm

    Prosecutor, the utilities for export cannot export the dictionary SYS base tables and is marked

    as a note in the documentation:

    Data Pump export Modes

    Note:

    Several patterns of system cannot be exported because they are not user patterns; they contain metadata and data managed by Oracle. Examples of system schemas that are not exported MDSYS SYS and ORDSYS.

    Source: https://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_export.htm#SUTIL826

    That's why import cannot modify/alter/drop/create dictionary database tables. If you can not export, so you can not import.

    Import just to add new Non - SYS objects/data in the database, therefore new data are added to the dictionary base tables (as new users, new tables, code pl/sql etc).

    I hope that this might answer your question.

    Kind regards

    Juan M

Maybe you are looking for

  • launch *.exe to view lab &amp; write on it.

    Hello I use LV 8.2. I understand that 'executable system' can be used to launch applications or files *.exe, which works very well for me. My problem is writing text in the application is started or the exe file. I can explain for example - I used 'e

  • Modify a particular element in a table of database

    Hi, I use database tools. I created tadle as shown below with DB tools insert data vi. one one Name Marks KAV 88 ANI 56 Christophe 90 Sug 89 Jey 97 I want to change the name of Christopher and the mark corresponding to the name ghoulish someone give

  • Low rate display on a good laptop!

    Hello Recently I bought a new laptop called the: HP 15-P032ND Specification of the laptop: Processor: AMD Quad Core A8-6410 2.0 GHz (up to 3.5) RAM: 12 GB / HARD drive: 1 TB + 8 GB ExpressCache Graphics card: AMD Radeon R7 M260(2GB) OS: Windows 8.1 M

  • problem games I already downloaded and played

    I'm a vista OS operating home premium 64-bit. I previously downloaded from realarcade games and played 20 + times.3 days there are games to react as if there is a pop-up blocker by not allowing the games seem to desk top

  • HP Envy m7-j120dx screen issues.

    I just bought this a little over a month and today I noticed a black spot on the screen, it won't go away. Interesting what happened three days during the return policy. Any suggestions? I would really appreciate if you could help.