Security :: Virtual Private Database Update Policy On Complex Views

Aug 21, 2013

1)I have created a complex view, and created an instead of trigger on this view

example:

create or replace trigger tr_x instead of before update on test_view_name for each row
-------
2) I have created an update policy on this view

DBMS_RLS.ADD_POLICY (
object_schema := schema_name,
object_name := name of the view,
policy_name := ploicy name,
function_schema := func schema name,
policy_function := pkg_test.fn_get_where,
statement_types := 'UPDATE',
update_check := TRUE,
policy_type := dbms_rls.dynamic);

3) function pkg_test.fn_get_where, which is used in the policy function always return 1 = 2, so that update should fail.

4) Now I will issue an update statement on the view test_view_name

update test_view_name set test_col = 1;

but still it updates the records, though update policy returns the where cluse 1 = 2

same where clause for select policy works perfectly fine.

View 4 Replies


ADVERTISEMENT

Security :: How To Edit Created Policy (Virtual Private Database)

Mar 28, 2012

I Created the Security Policy as user sysadmin_vpd as follows

BEGIN
DBMS_RLS.ADD_POLICY (
object_schema => 'scott',
object_name => 'orders_tab',
policy_name => 'orders_policy',
function_schema => 'sysadmin_vpd',
policy_function => 'get_user_orders',
statement_types => 'select');
END;

After creation this policy I want to view & edit them.By default where they are saved.

View 3 Replies View Related

SQL & PL/SQL :: Oracle Virtual Private Database Policy

Mar 31, 2012

I created policy as follow.

BEGIN
DBMS_RLS.ADD_POLICY (
object_schema => 'scott',
object_name => 'orders_tab',
policy_name => 'orders_policy',
function_schema => 'nisadmin_vpd',
policy_function => 'get_user_orders',
statement_types => 'select');
END;
/

After the creation of this policy for the table when I select the table Orders_tab then getting the below error.

ORA-00904: "ORA_ROWSCN": invalid identifier

When I dropped this policy then I can see the records of Order_tab table.

View 3 Replies View Related

Security :: Virtual Private Database

Aug 25, 2012

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?

View 25 Replies View Related

Security :: How To Implement RLS Policy Of Oracle

Apr 28, 2011

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

SQL> BEGIN
2 DBMS_RLS.add_policy
3 (object_schema => 'X1',
4 object_name => 'EMP',

[code]...

ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_RLS", line 20
ORA-06512: at line 2

View 7 Replies View Related

PL/SQL :: Update Table Column Using Complex Sequence

Feb 6, 2013

I use a sequence to generate an alphanumeric code and I need to update all rows of a table with that sequence. The sequence is created with this code:

SELECT (CHR(TRUNC(s.nextval/1000) + ASCII('A')) || LTRIM(TO_CHAR(MOD(s.currval,1000),'099'))
FROM dual;

I have tried many things - most recently

Update t3_temp_table
SET mergecode =
SELECT (CHR(TRUNC(s.nextval/1000) + ASCII('A')) || LTRIM(TO_CHAR(MOD(s.currval,1000),'099'))
FROM dual;

I get missing expression error.

It works fine if I use a straight s.nextval

View 5 Replies View Related

ODP.NET :: ORA-54017 - UPDATE Operation Disallowed On Virtual Columns?

Sep 2, 2013

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? 

View 1 Replies View Related

Networking And Gateways :: Testing Private Database Link With Same Name As Public

Oct 13, 2010

We are currently replacing all public database links with private db links in our prod environment. The requirement is

1) private db link name should be same as public
2) Need to create and test out private db links before we can drop public db links.

How can we test out private db links while public db links are still there with the same name?

when I execute SELECT * FROM DUAL@DBLINK from user who created this private db link, which db link it will be using- public or private?

View 9 Replies View Related

Client Tools :: How To Configure SQL DEVELOPER Via Virtual Machine Oracle Database

Mar 21, 2012

i have oel installed on my parallel Virtual machine.

i have a problem with configuring sql developer to the oracle database which is located in my virtual machine.

my os is windows7 32 bit.

View 13 Replies View Related

Installation :: Oracle Database 11gR2 On Virtual Box on Windows 32bits Machine

Oct 31, 2013

I have an issue during the database configuration using DBCA at 85% it blocs, then it displays an error asking to reconfigure ORACLE_UNQNAME.

View 6 Replies View Related

Server Administration :: Graphical Analysis Of Dynamic Performance Views (V$ Views)?

Nov 5, 2012

is there some open source or free tool which can graphical display V$ Views. Can TOAD do that in a good maner?

in UNIX there is the "sar" command, but a Java tool "ksar" for displaying the statistics in user friendly fashion.

View 2 Replies View Related

Security :: Audit Update / Modify And Insert

Oct 18, 2011

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'.

View 12 Replies View Related

Security :: Applying Critical Patch Update?

May 23, 2012

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.

View 2 Replies View Related

Hit All Views One After Other In Database?

Aug 26, 2003

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).

View 5 Replies View Related

Refresh Materialized Views Based On Remote Views?

Aug 4, 2011

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.

View 1 Replies View Related

PL/SQL :: Get List Of Materialized Views / Views Using Column Of Table

Oct 17, 2013

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.

View 3 Replies View Related

SQL & PL/SQL :: Create Materialized Views On A Database

Jan 5, 2011

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.

View 11 Replies View Related

Replication :: Materialized Views On 3 Database?

Apr 8, 2012

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.

View 7 Replies View Related

Group Policy In VPD

Jun 19, 2013

Give me some examples of creating grouped in VPD .

Group policy example for
1) Grouped policy on same table for different columns
2) Grouped policy on two different table for different columns

View 1 Replies View Related

Server Utilities :: Export Procedure Views Function And Packages In Database

Sep 29, 2010

How to export the procedure,views,function and packages in a database, by using Export commmand.

View 2 Replies View Related

Convert Some Existing Materialized Views (fast Refresh) To Partition Materialized Views

Jul 7, 2010

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?

View 3 Replies View Related

Sparing Archived Redo Logs From Retention Policy?

Oct 4, 2010

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.

View 3 Replies View Related

RMAN :: Restoring Backup From Tape Beyond Retention Policy?

Nov 7, 2013

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.

View 1 Replies View Related

Backup & Recovery :: RMAN - Archivelog Deletion Policy Not Working?

Oct 4, 2012

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.

View 4 Replies View Related

Data Guard :: Configure Archivelog Deletion Policy To Applied On Standby

Nov 16, 2012

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?

View 6 Replies View Related

SQL & PL/SQL :: Query Can Be Restructured To A Less Complex

Apr 27, 2010

I have a table "TSKIDENT" with below structure:

CREATE TABLE TSKIDENT
(
TSKID CHAR(11 BYTE) NOT NULL,
NBRSEQ INTEGER,
IDCODE INTEGER,
FIELDNBR INTEGER,
FIELDVALUE CHAR(50 BYTE) NOT NULL
[code]....

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:

IDCODE = 97
FLDNBR = 1
FIELDVALUE = 1
IDCODE = 97
FLDNBR = 2
[code]....

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.

View 5 Replies View Related

SQL & PL/SQL :: Complex Bulk Collection?

Mar 25, 2011

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
-----------------------------------------------------------------
| | | |

[code]...

View 2 Replies View Related

SQL & PL/SQL :: Facing Complex Constraint?

Sep 27, 2013

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))

View 10 Replies View Related

REF Partitioning Is Affecting On Complex Queries

Apr 30, 2013

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?

View 1 Replies View Related

Reports & Discoverer :: Develop Complex Report?

Feb 1, 2011

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

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved