View constraints in 10g
In 10g what is the use of primary key constraint on view .
Data will come from base table. So constraints of base table will affect data.
Hi Avinash,
It enables sophisticated Query Rewrites, see:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/constra.htm#sthref418
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:636499119911#13041565979243
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:636499119911#2695797455172
Edited by: hoek on Jun 28, 2009 12:54 PM YAL
Similar Messages
-
I have added a constraing for my emp table
ALTER TABLE emp
add CONSTRAINT MyKey PRIMARY KEY (empno);
How can i view what are constraints for a table
How to view constraints?Query ALL_CONSTRAINTS
HR%xe> desc all_constraints
Naam
OWNER
CONSTRAINT_NAME
CONSTRAINT_TYPE
TABLE_NAME
SEARCH_CONDITION
R_OWNER
R_CONSTRAINT_NAME
DELETE_RULE
STATUS
DEFERRABLE
DEFERRED
VALIDATED
GENERATED
BAD
RELY
LAST_CHANGE
INDEX_OWNER
INDEX_NAME
INVALID
VIEW_RELATED
SELECT * FROM ALL_CONSTRAINTS WHERE TABLE_NAME = 'MY_TABLE'; -
Materialized View - Refresh in 10g FAST .. refresh in 11g SLOW
Sorry I'm not able to paste anything.
The customer moved their database from 10g to a 11gR2 database.
They created the MV in the new system and now it takes 26 hours to refresh
as opposed to 15 min in the old 10g database.
Just looking for a game plan for troubleshooting.
I know I'm not providing much of anything so please forgive me.
Where would you look first ? Explain plan .. system settings .. ? Let me know.
If you have a good reference then that would work. The docs are not working.
Thanks in advance.
BBDo you mean they upgraded their existing database from 10g to 11gr2?
Or do you mean they loaded the data into a new 11gr2 database?Yeah I confirmed this morning that they data-pumped the entire database to the 11g host.
Unless you provide more information there is no way to provide any specific suggestions.
What kind of MV? Are the source and MV on the same server?They do a manual refresh :
create materialized view (mview_name as select ...)
dbms_snapshot.refresh(mview_name, 'C')
The source is the same for both however it is from a place that uses a connection.
If it is a new DB then there may be missing indexes or constraints.
The MV may initially be empty and the first refresh will be a COMPLETE
one that will take a lot longer than an incremental.
Some of the objects or constraints could be invalid. The indexes appear to be the same and the constraints enabled/disabled in the same manner.
They confirmed that the refresh after the initial is taking way too long compared to before (10g).
Oddly some of the mviews see no performance degradation in the new environment.
They have many.
Thanks for taking the time to think about it. It was much appreciated.
If I get to the bottom of it I'll let everybody know.
BB -
VIEWING CONSTRAINT NAME IN QUERY TOOL
hi ,
i am using oracle lite 10g database lite R3 in windows platform . Now i have done a fresh client setup and datadownload in my machine. i am using query tool to view the datas . how to get
the constraint names in the query tool of a particular table.Which tool are you using?
SELECT * FROM ALL_CONSTRAINTS WHERE TABLE_NAME = :TABLE_NAME -
How to create materlised view in oracle 10g what are the step to create it
hi,
this hafeez i have a database in oracle 10g now i want to create materlised view to the database what arre the step required for it.You should refer to documentation for more information:
[Overview of Materialized Views|http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/schema.htm#CNCPT411]
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com
[Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/] -
What's the impact of rowid materialized view in oracle 10g
Hello to all ;
Oracle official docs saying
ROWID materialized views should be used only for materialized views based on master tables from an Oracle7 database, and should not be used from Oracle8 or higher.
For 10g or higher versions can we consider rowid materizlized view ?
product 10.2.0.4 and 11g r2 on Redhat 5.1No
should not be used from Oracle8 or higher10g is higher -
Where do i see all the default tables and views in oracle 10g
hi,
I have installed oracle 10g in the linux os.
I just wanna see the list of deffault tables and views created by oracle.
can anyoone hlep me on this
thanx in advance....Check DBA_OBJECTS for all seeded objects in an Oracle database. For tables, check DBA_TABLES. For views, check DBA_VIEWS. All of this is documented in the fine documentation - take some time out to read thru it.
http://docs.oracle.com/cd/E11882_01/server.112/e25513/statviews_4156.htm#REFRN23146
http://docs.oracle.com/cd/E11882_01/server.112/e25513/statviews_5056.htm#sthref2482
http://docs.oracle.com/cd/E11882_01/server.112/e25513/statviews_5085.htm#sthref2521
HTH
Srini -
Materialized View - 9i and 10g
Hello,
I have some questions:
1. What are the differences in Materialized View between Oracle 9i and 10g?
2. It is said that in 9i, Materialized View does not support self join, is it true? Does 10g has this restriction?
3. It is said that in 10g, the select list cannot have subquery, is it true? Does 9i has this restriction?
Thanks,1. Is a docs question: http://tahiti.oracle.com
2. Is a docs question: http://tahiti.oracle.com
3. Is a docs question: http://tahiti.oracle.com
Why do you find it easier to ask someone else to read the docs for you than to read them yourself? -
NVL in view: discrepancy between 10G and 11G
Hi,
I've discovered some discrepancy between 10G and 11G in a way how view deals with NVL-based column in a where clause.
Here are two examples:
*10G:*
Connected to:
Oracle Database 10g Release 10.2.0.4.0 - Production
SQL> create table test_nvl (null_column number);
Table created.
SQL> insert into test_nvl values (null);
1 row created.
SQL> commit;
Commit complete.
SQL> create view view_nvl as select nvl(null_column,0) null_column from test_nvl;
View created.
SQL> select * from view_nvl where null_column is not null and null_column = 0;
NULL_COLUMN
0
*11G*
Connected to:
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
SQL> create table test_nvl (null_column number);
Table created.
SQL> insert into test_nvl values (null);
1 row created.
SQL> commit;
Commit complete.
SQL> create view view_nvl as select nvl(null_column,0) null_column from test_nvl;
View created.
SQL> select * from view_nvl where null_column is not null and null_column = 0;
no rows selected
Does anyone know why it behaves differently?
I couldn't find any documentation regarding this.
Or I'm just missing something here.
ThanksBANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for HPUX: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
CREATE TABLE test_nvl (null_column NUMBER);
INSERT INTO test_nvl
VALUES (NULL);
COMMIT;
CREATE VIEW view_nvl
AS
SELECT NVL (null_column, 0) null_column FROM test_nvl;
SELECT *
FROM view_nvl
WHERE null_column IS NOT NULL AND null_column = 0;
NULL_COLUMN
0 -
Removing fields from Discoverer Viewer Login Page 10g
Hi,
I am new to discoverer 10g. I wanted to know if its possible to remove the non mandatory fields from the Disco viewer home page like Locale, End user layer and Connect To since they can be configured to take default values.
Once a user logs in, he views a set of workbooks. Can this page be replace with a customized report?
Thanks
SujathaAre you on a 11.5.10 environment? If so please make sure your DBC-file is generated correctly. Since 11.5.10 Discoverer will be started using SSL mode.
Do you have the same issue when connecting thourg the Desktop or even with the Plus (directly from the /discoverer/plus url)? If so, please make sure the 'ICX: Launch Discoverer Plus/Viewer' have the correct value. E.g. http://<server.domain>:<port>/discoverer/plus?Connect=[APPS_SECURE] -
Hi,
last week we upgraded our 9i DB to 10g R2. Now even though I gave permission SELECT on view getting 'ora-1031: insufficient privilige' message. I have tried to assign SELECT role and also tried to give inidividual SELECT on tables. But still getting the error. What permission am I missing?
Regards,
BimalThanks all for the reply,
ibsaddons is the user I am trying to execute the view which on streports schema and all the tables are under ibsadmin schema. For ibsaddons user I have assigned a role which has got select privilige on ibsadmin and also individual table permissions too. The funny part is I can select all the tables mentioned in the view and also the select statement in the view without any, but getting error when selecting from view as below:
SQL> select * from streports.view_act_base;
select * from streports.view_act_base
ERROR at line 1:
ORA-01031: insufficient privileges
select * from streports.view_act_base (view under streports schema)
and tables under ibsadmin scheme are below:
ibsadmin.prodsubs p,
ibsadmin.subscrib s,
ibsadmin.address a,
ibsadmin.products d,
ibsadmin.methopay m,
ibsadmin.suinvoic i
Regards,
Bimal -
Why i can not use only 10 view in JHeadstart 10g ?
Hi,
I am a student in King Saud University and i want to use a product help me to enter data and see my project as interface in web page and my project has 19 tables , and i heard a bout JHeadstart 10g it is a nice product just few steps and you will see your project completely finish as a web pages.
But when i use the JHeadstart 10g 10.1.3 i can not only use 10 view , why ?
Is there a way to use JHeadstart 10g in my project that has only 19 tables ?
Please I need help !!!!Michael is correct, this is a limitation of the evaluation version. JHeadstart is not a free product, you can use the evaluation version on a limited set of tables, and if you like the product, please buy Jheadstart licenses, and you get access to the unlimited production version.
Steven Davelaar,
JHeadstart Team. -
Exporting data from a materialized view in Oracle 10g
Can anybody tell me how to export data to a remote server and import data in that remote server without using ftp utility. Actually I want to export the data from a materialized view to the remote server and import the same in the remote server.
If everything works well, I'll put the exporting and importing in a cronjob.
Please let me know how can I do that if that's possible .
Any reply would be appreciated.
Thanks.Here is what I'm trying to do.
I created materialized views using multiple base tables in my local server and the base tables got populated using a long process.
Now I want to copy those data alone to some remote server since it doesn't have any base tables in it. For now, the remote server should depends on the localserver's data. I'm going to use the remote server's data for some testing purposes.
I know it is easy to create mat.views in the remote server but it doesn't have I don't want to do that now. I just want to copy the snapshots from my local server to the remote server.
Please let me know how to do that.
Thanks. -
Customization of filter view in obiee 10g
Hi,
I have a report with chart view and filter view.
We have some implicit filters in the report(static filters).
Is it possible to hide the static filers and display only the selected prompt values(explicit filters/dynamic filters) in the filter view.
Thanks in advance.
Sankat.Hi,
I dont know if this idea works for your requirement.
Try to have a dummy condition validate the static and the dynamic filters in the reports.
For example-
column_name less than 0
and static filters
OR
column_name greater than 1
and dynamic filters
Hope this helped/ answered
Regards
MuRam -
Hi Folks
In which DBA view I found the reference between tables, example:
I have three tables (emp,dept,sal) the emp has a primary key that is referenced by the tables dept and salary, but I only know the primary key name where I want to know the tables that reference the emp table?
Thanks and regards,
WilsonALL_CONS_COLUMNS, DBA_CONS_COLUMNS, USER_CONS_COLUMNS
and also for more details -
USER_CONS_OBJ_COLUMNS
ALL_CONS_OBJ_COLUMNS
DBA_CONS_OBJ_COLUMNS
DBA_CONSTRAINTS, ALL_CONSTRAINTS.
Hope this helps
-Ash
Maybe you are looking for
-
Difference in between operator in oracle 8i and 9i version
Is their any difference between the functioning of Between operator in 8i and 9i?
-
How to set DHCP Class ID in OS X 10.2 ???
Hi everybody, At work we have a network that uses a specific DHCP class ID and the DHCP server does not issue IP's and stuff unless the class ID is correctly set on the client. I have been searching all over the net for the procedure to set the DHCP
-
How to use earphones microphone (iMac late 2006)?
Hey, On the late 2006 iMac, there are two jacks, One microphone and one speaker/earphones.. How can I use my Klipsch S4i's microphone with my iMac? As I can't use both the jacks at the same time, which is what I need :/ Is there something I could buy
-
My iPod Touch shows USB and arrow pointing to iTunes
It's a newer generation that I bought a while back, but i tried to system restore so my little brother couldn't access my vital applications that i had installed previously. Whilst plugged in, it said that a system update and iTunes update was requir
-
On my new iMac, I have iWeb 2.0.3 Can anyone tell me if that is the most current version? and if iWeb 08 is newer, different and better,, is it worth spending another $79 for another iLife? I also tried to download the iWeb 08 Manual from the downloa