Query Dictionary tables and V$ views in EM
Hello;
I want to query dba_ tables and v$ views from Enterprise manager (10g).
I hv tried that in the Tables -> SYS schema ; But these tables are not shown there. Im unable to query from the EM.
Able to query from the sql plus , Where i have logged as SYS
select status from v$instance;
From where can i access these tables; (in EM)
v$instance
v$database
dba_tablespaces
Edited by: Zerandib on Dec 8, 2009 8:39 AM
Zerandib wrote:
From where can i access these tables; (in EM)
v$instance
v$database
dba_tablespaces
Those are not tables, they are views. Try looking under Adminstration|Schema|Views with schema as SYS. Keep in mind many of the V$ names, such as V$INSTANCE, are public synonyms for V_$ views. For example V$INSTANCE is a public synonym for V_$INSTANCE.
Similar Messages
-
Table and Materialized View in different namespaces?
I've just faced something completly new for me. It appears that there are two objects with the same name and owner. Table and Materialized View have the same names and when I look into system dictionary I can se sth. like that:
OWNER OBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE NAMESPACE
USER_A USER_TABLE 159381 159381 TABLE 1
USER_A USER_TABLE 159382 MATERIALIZED VIEW 19
(I couldn't find how to write above with const length font).
Two object in different namespace? I thought that Tables and Materialized Vievs have the same namespace.
Can you please tell me how can I create objects to achieve above result? I would also be grateful if you tell me where to find that topic in documentation.Perfectly normal.
SQL> select object_name, object_type from user_objects where object_name = 'TEST_MV';
no rows selected
SQL>
SQL> create materialized view test_mv
2 as
3 select sysdate from dual;
Materialized view created.
SQL>
SQL> select object_name, object_type from user_objects where object_name = 'TEST_MV';
OBJECT_NAME OBJECT_TYPE
TEST_MV TABLE
TEST_MV MATERIALIZED VIEW
SQL>
SQL> drop materialized view test_mv;
Materialized view dropped.
SQL>
SQL> select object_name, object_type from user_objects where object_name = 'TEST_MV';
no rows selected
SQL> -
How to find schema of a table and a view
Hi,
I have an old form which uses one table and one view. I know its database. Now I'm making another form in some other database and want to use the old form but for that I need to know the schema of that table and the view so that I can give the schema name and db link to connect (meaning schema.table_name@dbname). How do I find out the schema for that table and view.
I did a search by using "select owner from all_objects where object_name = tablen" and it says PUBLIC. There's no schema called Public. I can see Public Synonyms but cannot find that table and view in it. So please help. I'm trying since long to find its schema.
Thanks.Hi ,
Isn't it peculiar that i have declared a public synonym on table BIOGR as user523269 does.... and the sql statement:
select owner from all_objects where object_name='BIOGR' works.... whereas of user523269 does not...?????
SQL> select * from dba_synonyms where table_name='BIOGR';
OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME DB_LINK
PUBLIC BIOGR HIS BIOGR Regards,
Simon -
Oracle equals_path condition NOT working with table and materialized view
The user i am using is xdb with dba role.
1.When i try to use the statement
SELECT PATH FROM xdb.path_VIEW
WHERE
EQUALS_PATH(res, '/home/OE/PurchaseOrders/2002')=1
the result is
/home/OE/PurchaseOrders/2002
2. When i drop the path_view and recreated it like materialized view with statement
create MATERIALIZED view path_view as
select /*+ ORDERED */ t2.path path, t.res res,
xmltype.createxml(xdb.xdb_link_type(NULL, r2.xmldata.dispname, t.name,
h.name, h.flags, h.parent_oid, h.child_oid),
'http://xmlns.oracle.com/xdb/XDBStandard.xsd', 'LINK') link,
t.resid
from ( select xdb.all_path(9999) paths, value(p) res, p.sys_nc_oid$ resid,
p.xmldata.dispname name
from xdb.xdb$resource p
where xdb.under_path(value(p), '/', 9999)=1 ) t,
TABLE( cast (t.paths as xdb.path_array) ) t2,
xdb.xdb$h_link h, xdb.xdb$resource r2
where t2.parent_oid = h.parent_oid and t2.childname = h.name and
t2.parent_oid = r2.sys_nc_oid$
then the equals_path condition STOP working !!!
3. The same experiment, but i recreate it like table
create table path_view as .... using the rest of the statement ...
Can someone help me to understand why equals_path is NOT working on table and materialized view !Thanks Jonah. I was under the impression that I already had it but seems like it has to be a direct priv - thru a role doesn't work.
I granted the reqd privs and then it worked fine. Thx for your help! -
View on "Transparent Table and DataBase View" ????
Hi
I have three transparent tables and four database views in R/3.
Is it possible to create the view on "Transparent Table and DataBase View". Please let me know
kumarno it's not possible.
-
How to query a table and result together with autonumber
Hi all
How to query a table and the result return autonumber for each row together with the table values.
I have tried rowid but it provide me with characters.
TjWhat is your exact requirement?
If you want the number of rows selected, you can use rownum.
select rownum, a.* from <table> a;
Cheers
Deepak -
Query a table and exit when first record found
I want to query a table and just want to know if any rows matching my query criteria exist in the table. I just want to find one row, irrespective of order and stop the query right there. How do I do that?
The most efficient way would be either to use rownum = 1 as part of the condition in your second query, but, as written, both will return multiple rows. Your first will need to have an additional predicate and rownum = 1 in addition to the exists.
Assuming that the predicate can use an index, then the most efficient approach would be either:
SELECT 1 FROM table
WHERE <conditions> and
rownum = 1or possibly:
SELECT 1 FROM dual
WHERE EXISTS (SELECT 1 FROM table
WHERE <conditions>)Both will do a range scan on the applicable index, stopping when the find the first matching entry. To my mind, the first is clearer in intent.
To illustrate the error in your first query, consider:
SQL> SELECT * FROM t;
ID DESCR
1 One
2 Two
3 Three
4 Four
5 Five
1 One
2 Two
3 Three
4 Four
5 Five
SQL> SELECT * FROM t
2 WHERE id = 1 and
3 rownum = 1;
ID DESCR
1 One
SQL> SELECT * FROM t
2 WHERE EXISTS (SELECT 1 FROM t
3 WHERE id = 1);
ID DESCR
1 One
2 Two
3 Three
4 Four
5 Five
1 One
2 Two
3 Three
4 Four
5 FiveJohn
Edited by: John Spencer on Oct 2, 2009 12:06 PM
Added queries from t -
How to write a Query a table and the return result is the column name
Hi All
Pls advise how to write a query whereas the return result is the
column name.
I know there is describe <table_name>;
Is there any other ways?
Pls advise
Tj
Edited by: user600866 on Oct 14, 2008 12:13 AMData Dictionary table user_tab_columns has all the column names. You can query that and get what ever you want.
To get the column list of a table just query
select *
from user_tab_columns
where table_name = <your_table>Edited by: Karthick_Arp on Oct 14, 2008 12:18 AM -
Performance difference between tables and materialized views
hi ,
I created a materialized view on a query that involves partition table in it.
When i used the same query and created a table out of it <create table xyz as select * from (the query)> ,the table got created quickly.
So does that mean performance wise creating table is faster than creating/refreshing the materialized view ?or is that due to the refresh method i use ?Currently i use a complete refreshI created a materialized view on a query that involves partition table in it.
When i used the same query and created a table out of it <create table xyz as select * from (the query)> ,the table got created quickly.
So does that mean performance wise creating table is faster than creating/refreshing the materialized view ?or is that due to the refresh method i use ?Currently i use a complete refresh Well, for starters, if you created the materialized view first and then the standard table, the data for the second one has already been fetched recently and so will reduce your I/O due to caching, and will therefore be quicker. There are also other factors such as the materialized view creating other internal bits that are required to allow for refreshes to be done quickly, such as the primary key etc which you haven't created on your second creation.
What you have shown is that two completely different statements running at different times, appear to operate with different speed. It is not a comparison of whether the materialized view is slower or quicker than the create table statement. -
Select data from a table and a view: field with same content and different type
hi all,
I need data from a table hrp1001 and a view V_USR_NAME. What they have in common are the content of the fields SOBID and BNAME .
It will be easier if those fields add a same type but they dont.
Any suggestions for a workaround?
ThanksHi Ramesh,
Specify the date format as YYYYMMDD in where condition.
Dates are internally stored in SAP as YYYYMMDD only.
Change your date format in WHERE condition as follows.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and bdatu = <b>'99991231'.</b>
I doubt check your data base table EQUK on this date for the existince of data.
Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and <b> bdatu <= '99991231'.</b>
Thanks,
Vinay
Thanks,
Vinay -
How to rename tables and refresh views
Hi all
I need to write a script that will rename several tables and at the same time I would like to refresh all the views that point to this table.
questions:
- how do I rename a table
- how do I refresh the views that point to this table?
Thanks
JHello,
You might have to write pl/sql to recreate all views depends upon the tables you just renamed. You can use user_dependencies to identify the views and create sql to use new_table_name
DECLARE
CURSOR mcur
IS
SELECT table_name
FROM user_tables
WHERE table_name IN ('A1');
v_sql VARCHAR2 (100);
BEGIN
FOR cur IN mcur
LOOP
v_sql :=
'RENAME ' || cur.table_name || ' to ' || cur.table_name || '_NEW';
DBMS_OUTPUT.put_line (v_sql);
EXECUTE IMMEDIATE v_sql;
END LOOP;
END;Regards -
How to Query from table and insert into another table.
Hi
I am using the following query in VO and all the columns are attached to EO ( table name emp_temp)
select a.npw_number, a.person_id,b.assignment_id,a.title,a.last_name,a.first_name,a.date_of_birth,a.sex,
b.organization_name,b.organization_id,b.job_id,b.job_name,b.position_id,b.position_name,b.supervisor_id,
b.supervisor_name,b.location_id,b.effective_start_date,b.effective_end_date
from per_all_people_f a,per_assignments_v b
where a.person_id=b.person_id
and a.npw_number=:1
I can query the data in screen. I need into insert the data into the emp_temp.
I don't know how to do this . Please help me.
Thanks
SubraYou can create a VO based on EO on emp_temp table.....
And u have attached a Different VO on the page... Right...
Now what u can do is....once u click on apply....
u can set the each attributes of EO based VO explicitly via code, from the values of second VO.... and then commit.....
Perhaps this might help... -
Truncate table and materialized view log
I user oracle 10 R2
I have a table and on that table a materialized view log.
I execute in a pl/sql procedure:
1) execute immediate('drop materialized view log on tab1');
then:
2) execute immediate('truncate table tab1');
3) Now I insert a lot of records in tab1
4) execute immediate('create materialized view log on tab1 WITH rowid INCLUDING NEW VALUES');
When I create the materialized view log I recieved this message:
ora32321: refresh fast on tab2 unsupported after detail table truncate
Why?Refresh fast after truncate operation on container table is not supported, regardless the container table is or is not partitioned.
Perform a refresh complete.
ORA-32321 :
Cause: A detail table has been truncated and no materialized view
supports fast refersh after a detail table has been truncated
Action: Use REFRESH COMPLETE. Note: you can determine why your
materialized view does not support fast refresh after TRUNCATE
using the DBMS_MVIEW.EXPLAIN_MV() API. -
How to create a cluster table and cluster view?
Hi,
Can anyone guide me in creation of cluster table in general and also creation of cluster view?Hi,
check this links.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21f0b7446011d189700000e8322d00/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/d0/999246b2aa11d1a5700000e82deaaa/content.htm
Regard's
SHAIK. -
User_catalog - object listed as both 'TABLE' and 'MATERIALIZED VIEW'
SELECT * FROM USER_CATALOG ORDER BY OBJECT_NAME
returns ...
OBJECT_NAME OBJECT_TYPE
BLOBBY SYNONYM
BONUS TABLE
DEPT TABLE
EMP TABLE
EMPLOYEES SYNONYM
EMPWITHDEPT MATERIALIZED VIEW
EMPWITHDEPT TABLE
^^^^^^^^^^^^Any ideas to show only the 'MATERIALIZED VIEW' row for the above query?
Thanks in advance,
Mike NormanSo, I would need some sort of logic to
check if the OBJECT_NAME from user_objects
is present in user_snapshots print 'MATERIALIZED VIEW'
otherwise take the OBJECT_TYPE from user_objects -
some sort of DECODE?
Maybe you are looking for
-
How to connect my perfectly-working 20-year-old Apple Personal Laserwriter 320 to my iMac running Mountain Lion? Thank you, Morty S.
-
Can I have more than one user account on my Ipod touch?
I have an account on my IPod touch and would like to add an account for my son using his own laptop and itunes account is that possible?
-
My ancient iPod is not being recognized by the computer.
If I plug my iPhone in using the same cord, the iPhone is recognized. It was recognizing it earlier when I was trying to upload files. Now it just has a message about coming to the support page. I haven't used it in a long time, but was hoping to s
-
SAFARI DOES NOT DISPLAY PDF DOCS.
Does anyone know why my Safari browser suddenly does not show PDF docs in the browser window? It used to. I use Version 2.04. A message does appear that says "plug-in cancelled". I don't know why. Acrobat opens it in Firefox fine, but nothing happens
-
Hi, I have recently uninstalled Adobe Reader 8.0 and installed Version 9,0. Now I have a pop up box on booting up which says it can't find 'C\Prog Files\ADOBE\Reader 8.0\Reader\ SL.EXE' After seeing this the first time I deleted it from the List -