I am having one table Where,different country names are stored. while viewing data, I have to make sure that if country name having "USA" can only view its data. How can i do at DB level without passing where clause. Is Virtual Database in this case?
I have tried to implement RLS policy of oracle.I have two Schema X1 & X1_DBA.
I have created the emp table in X1_DBA create table emp(empid number,ename varchar2(10),deptno number) and inserted some rows into the Table. i have created the below function in X1_DBA schema & Given Select Privilege to X1.
CREATE OR REPLACE FUNCTION no_dept10( p_schema IN VARCHAR2, p_object IN VARCHAR2) RETURN VARCHAR2
[code]...
When i Add the Policy in X1_DBA.schema i am getting the Error as Table does not exist
I am usingOracle 12cODAC 12.1.010 and when make an update on table with virtual column i have this error:ORA-54017: UPDATE operation disallowed on virtual columns. I have seen that on edmx file the virtual column, the StoreGeneratedPattern property is not setted as Computed. Setting it (handly) works ok. Is a bug of ODAC?
I am using 'Novell Sentinel Log Manager' to collect/fetch logs from my Oracle 11g R2.To enable auditing, first I did following:
login as sys, then SQL> create user testuser identified by "testuser"; SQL> grant connect to testuser SQL> grant dba to sharf SQL> grant CREATE SESSION to testuser; SQL> grant select on v_$session to testuser; SQL> grant select on v_$version to testuser; SQL> grant select on SYS.DBA_AUDIT_TRAIL to testuser; SQL> grant select_catalog_role to testuser; SQL> grant select any dictionary to testuser;
Now logon/logof of user 'testuser' are logged , as well as if testuser drops a table or creates a table, its also logged . but when 'testuser' insert a new record, this information does not logged ;( while I need to know exactly what was added SQL> insert into emp (empid, name, salary) values (10002, 'Ron', 6000)
likewise if 'testuser' modify/update an existing record it also does not logged. SQL> update emp set salary=700 where empid=10001;
which sql statements I have to execute to start auditing 'insert' and 'update', so that I know what was added/inserted and exactly what was updated/ changed/modify by user 'testuser'.
Just to confirm with you if we can apply the October 2011 Critical Patch Update (CPU) to address vulnerabilities covered from CPU 2007 up to CPU 2011?
The PC Server (staging) where patching will be applied is running under Windows Vista have not been patched since it's database creation. This is maintained by our Contractors.
I am writing a checker that should hit all the views one after other in database and report if there is an SQL error ( Page: Data cannot be retrived from the view XYZ).
The query I am running is "select * from $view fetch first 1 rows only".
better query which runs faster as I have to query all the views in db in the script ( script runs every 10 mins on cron).
I have a created a materialized view which is based on a view on remote database. Now how do I refresh the view.
Materialized view is created by
CREATE MATERIALIZED VIEW mv_employee_name AS SELECT EMPLID, EMPL_NAME FROM VEMPDATA@REMOTEDB WHERE REGION = 'US';
I am wondering how the refersh happens or how do I specify the refresh clause.REFRESH FAST option is looking for VIEW LOG on the master table but in this case its a remote view, so I cannot create any object on remote db.
I am removing sal column from table tab_emp; i want to check whether any materialized view or view using this column by querying using data dictionary :- if i use like condition against query column of all_mviews it is throwing error sicne it is long data type. is there a way to search it without creating any function and use it in a query.
I'm trying to create a materialized view on a database on my local laptop, and when I execute the create it fails with the following error: ORA-06550: line 1, column 60:
PLS-00103: Encountered the symbol ".16" when expecting one of the following: . ( @ ; with the table name highlighted.
CREATE MATERIALIZED VIEW Schema.MV (col1, col2,) BUILD IMMEDIATE REFRESH Complete ON DEMAND WITH PRIMARY KEY AS select EXTRACTVALUE (rawxml, '/Test.class/@ID') AS col1, EXTRACTVALUE (rawxml, '/test.class/test.attribute.name') AS col2, from RAWXML where Type = 'test.classvalue';
The query on its own though executes fine.
select EXTRACTVALUE (rawxml, '/Test.class/@ID') AS col1, EXTRACTVALUE (rawxml, '/test.class/test.attribute.name') AS col2, from RAWXML where Type = 'test.classvalue';
Is there something wrong with the table setup? I have tried creating a public synonym and still the error comes up.
There is a database db1 which has user U1 in in it contains T1 as table.
Likely,
There is also another database db2 which also has a user named U2 containing table T2 in it.
Now
I want to use the concept of JOINS and Join Table T1 of database named DB1 and Table T2 of database named DB2 and access from database named DB3 using Materialized View Concept.
what shall i do to access tables of DB1 and DB2 from database DB3 using Materialized View.
I have to convert some existing materialized views (fast refresh) to partition materialized views.
Database version is oracle 10.1.0.4. I have decided to use on prebuilt table option to do the partitioning as it minimizes the time to transfer from the master site.
1) stop replication 1) create interim tables with similar structure as the materialized views 2) transfer all data from the materialized views to the interim tables 4) script out the materialized views structure and add in on prebuilt table option in the scripts 5) drop the materialized views 6) rename the interim tables with the same name as the materialized views 7) run the scripts to create the materialized views with on prebuilt table option 8) refresh the newly created materialized views -> it should take a short time since I am using on prebuilt table option
But I am facing one major issue. That is if I drop the materialized views, the materialized view logs of the master tables are purged. When the materialized views are refreshed fast, there are some data missing. the data that are purged out when the materialized view are dropped.
Do you happen to know other ways that existing materialized views can be converted to partitioned materialized views? Do you have any workaround to prevent the materialized view logs from being purged?
I'm running Oracle 9i on AIX 5.2. I'm not using a recovery catalog, nor am I using media management software. I perform a full, online rman backup of the database and archived redo logs daily to disk, then use operating system commands to copy the backup to tape. There is only space on disk for two days' backups, so I need to have a retention policy of "redundancy = 1", and run a "delete obsolete" prior to the backup. The problem is that I don't want to subject the archived redo logs to this retention policy.
I have two physical standby databases connected by WAN to the primary site, and I might need archived redo logs that are a few days (or more) old in the event of a prolonged WAN outage. I've read about the "keep forever" option, but apparently it isn't available without using a recovery catalog. Is there any way to spare the archived redo logs from my retention policy?
Note: I want to "protect" the actual archived redo logs from the retention policy, not the backups of the archived redo logs.
How we can use RMAN backup to restore oracle database when the RMAN backup pushed to tape already and being a OLD backup ( before retention policy date).Just to elaborate a more.. Say my retention policy is 3 days. I want to restore from a old backup like 30 days old.So surely the requesting backup is behind retention date and has been pushed to tape.
I'm on a Windows server 2003 R2 64 bit, database is 11.1.0.7. From RMAN connected to the target and the catalog, this is a show all;
RMAN> show all;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS; CONFIGURE BACKUP OPTIMIZATION OFF; CONFIGURE DEFAULT DEVICE TYPE TO DISK; CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'F:oracleadmin
[code]....
I'm running incremental backups, a level 0 on sunday and a level 1 the other days of the week, this is the ctl file:
LEVEL 0: connect target /@ORCL connect catalog rman/rmanpw@rmancat RUN {
[code]....
The level 0 does delete the archive logs (because of the delete input). Each backupset has two copies of the archive logs (which is what I want), and I expected the logs to be deleted after being backed up 2 days (each day is twice, 2 days = 4 times). But it's not deleting the logs, even after 6 runs.
I have a DR setup with the following configuration
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS; CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY
I dont want to backup the STDBY DB but I want the ARC files to be removed when applied so my flash area does not fill up. Is there some command(rman or not) that can fire off this policy?
For each TSKID/IDCODE combination there are 4 FIELDNBRS with some values. For each set of 4, there is one NBRSEQ which can change depending on the order in which the a set of same TSKID/IDCODE is entered in the table. For 1st set of 4 for a given taskid, it will be 1. For second set for same Taskid it will be 2 and so on. But if the second set has a different taskid then the number starts from 1 for the new TASKID.
Now I want to Find all the tasks which has same FIELDVALUE for a complete SET of 4. Lets say I want to find a task which meets following criteria:
I want to know if the query can be restructured to a less complex than this and fetch the same results. In our example it should fetch taskid = T222222222.
I have the following questions you can create a bulk collect in which he has 3 fields and one of them is a type collect failing index or other bulk collect?.If so, how would the procedure for when to insert the first record sub fill the bulk collect. being for example something like this:
----------------------------------------------------------------- index | codigo | nombre | telefono | | |----------------------- | index | telefono ----------------------------------------------------------------- | | | |
I have folliwng table CREATE TABLE abcd ( trans_type VARCHAR2(10) nn, original_tran_no NUMBER, original_line_item NUMBER(20), original_trans_dt DATE);
I have to create a constraint when trans_type = 'R'then (original_tran_no and original_trans_dt ) should be not null else can be null able; is the follwing stmt right?
alter table abcd add constraint t1_chk1 check ( ( case when trans_type = 'R' then (original_tran_no is not null and original_trans_dt is not null))
I am having 7 tables consider A,B,C,D,E,F,G. whereas A is master table and others are dependent on table A. columnA is referential key for all tables. Table A is having one DateRange column.I have successfully created range partitioning with partitioning key is DateRange. and Refeernce partitioning on other tables with column referring to ColumnA with foreign key. Also created local indexes on partitioned key DateRange.
Problem is that, while fetching complex queries for reports, it is taking more time as compared to non partitioning structure. Is ref partitioning affecting on complex queries, queries returning more rows?
I need to develop a complex report , i have information in following table.vehicle with two fields number date_of_renewal date what i need is to generate a calendar that will show all the vehicles that due for renewal based on the date.On the top it will be years , next is months for that year and below vehicles which needs renewal