SQL & PL/SQL :: View - How Grants Are Revoking Automatically

Nov 5, 2010

We have two schemas(sdt & sdm) in one database.

We have base tables in "sdt" ,
Views are created in "sdm" schema based on the "sdt" schema tables We have granted privileges on the base tables of "sdt" schema to "sdm" schema.

Sometimes views are not able to access by sdm schema.Again we are granted privileges on the base tables of "sdt" schemathen views are able to access.How grants are revoking automatically.

View 15 Replies


ADVERTISEMENT

Replication :: Materialized View Not Refreshing Automatically

Jan 25, 2011

I am confused to see one materialized view is not refreshing automatically, whereas the same thing I can do manually.

View 2 Replies View Related

SQL & PL/SQL :: How Query Call Embedded Materialized View Automatically

Jul 13, 2010

I have to optimize the queries for user online panel. We have already created 2 materialized views:

mv_channel, mv_area

mv_channel (article_id, area, aweg_txt3, sum(value), sum(units))
mv_area (article_id, area, sum(value), sum(units))

For this query:

SELECT /*+ REWRITE*/
sum(value) as value,
sum(units) as unit,
article_id
from
...
where
...
and area in ('RB','RR','RS')
and aweg_txt3 n ('SB')
...

is the matview mv_channel very useful. The execution time was just 8s-13s instead fo 190s. But if the user also asks for this query but without AWEG_TXT3 in the where-clause, then it lasted 1:25min (longer than if the matview mv_area will be used).

The problem is that, the matview mv_area cannot be used in the case, in which the AWEG_TXT3 is in where clause (because it doesn't have aweg_txt3).

How can i do, so that :

- in case of AWEG_TXT3 in where-clause the matview mv_channel will be used and
- in another one (without AWEG_TXT3 in where-clause) the matview mv_area will be called automatically from the query

View 1 Replies View Related

Replication :: Materialized View Is Not Refreshing Data Automatically

Feb 14, 2012

I have created a MV on Oracle 10gR2 using dblink. Source database is AS400 DB2.MV script:

CREATE MATERIALIZED VIEW MV_BU
TABLESPACE TB_XXX
PCTUSED 0
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
[code]...

Above query should be refreshing the data every minute but I realized that its not doing it.

View 1 Replies View Related

REFRESH GROUP Is Automatically Created When A Materialized View Is Created?

Aug 17, 2012

tell me if a REFRESH GROUP is automatically created when a materialized view is created?

View 3 Replies View Related

Grants And Privileges?

Jul 14, 2011

how to give grants and privileges that are assign to schema(clerk) to new schema(manager).

View 1 Replies View Related

Pl/sql Package For Giving Grants?

Mar 30, 2013

I am looking for a pl sql package which can give the following grants:

1. select_catalog_role
2 select any table

we want to run this package multiple names and each time we will give username as input during runtime.

View 1 Replies View Related

SQL & PL/SQL :: Filter The System Grants?

Jun 3, 2010

As per my req, i need to get the system grants of one user (GRANTEE) using DBMS_OUTPUT API. The requirement get completed using 'SYSTEM_GRANT' as parameter for OPEN function in the metadata api. Please look into part of code which works.

v_meta_handle := DBMS_METADATA.OPEN('SYSTEM_GRANT');
DBMS_METADATA.SET_FILTER(v_meta_handle, 'GRANTEE','SCOTT');

When using above piece, i get sys grants granted to SCOTT user. But i need to use 'DATABASE_EXPORT' as a parameter to my 'OPEN' function.

v_meta_handle := DBMS_METADATA.OPEN('DATABASE_EXPORT');
DBMS_METADATA.SET_FILTER(v_meta_handle, 'INCLUDE_PATH_EXPR','IN''SYSTEM_GRANT''');
DBMS_METADATA.SET_FILTER(v_meta_handle, 'NAME_EXPR','IN''SCOTT''','GRANTEE_EXPR');

The second set filter doesn't work to get SYS GRANTS of one user. It does not throw any error. Simply the filter doesn't work. 'GRANTEE_EXPR' is not a correct value in the 2nd set filter. What parameter need to pass in object_path_expr ('GRANTEE_EXPR')?

View 4 Replies View Related

JDeveloper, Java & XML :: Grants In Oracle

Jul 22, 2011

whether JAVA grants are needed for JAVA services in Oracle and what are those grants ?

View 1 Replies View Related

SQL & PL/SQL :: Grants On Nested Table To Other User

Jul 16, 2011

I have an issue on selecting data from a nested table owned by other user.

I have given select access on stc_irb_usr.stc_loy_settlebillpay_map_main to anthr user adminofs.

But when I try to query, it says insufficient privileges. adminofs is able to select other columns which are not nested.

I have given "grant execute on STC_IRB_USR.STC_BILLPAY_MAP_TAB_TYPE to adminofs;" but it did not

select * from stc_irb_usr.stc_loy_settlebillpay_map_main where rownum<3;

ERROR: OCI-21700: object does not exist or is marked for delete

SQL> desc stc_irb_usr.stc_loy_settlebillpay_map_main
Name Null? Type
----------------------------------------- -------- ----------------------------
BATCH_NUM NOT NULL NUMBER
ACCOUNT_NUM NOT NULL VARCHAR2(40)
PAY_BILL_SEQ_MAP STC_IRB_USR.STC_BILLPAY_MAP_

[Code]....

Name Null? Type
----------------------------------------- -------- ----------------------------
ALLOCATING_CREDIT_SEQ NUMBER
ALLOCATION_ENTITY_SEQ NUMBER
ALLOCATING_CREDIT_DATE DATE
ALLOCATING_CREDIT_TYPE VARCHAR2(20)
ALLOCATION_ENTITY_DATE DATE

[Code]...

View 2 Replies View Related

Security :: Automatic Generated Grants On Sys_plsql_xxxx_yy_z

Nov 13, 2012

in the dba_tab_privs we can find some entries like this:

SELECT *
FROM dba_tab_privs
WHERE GRANTEE IN ('XXXXXXXX')

GRANTEE OWNER TABLE_NAME GRANTOR PRIVILEGE GRANTABLE HIERARCHY
XXXXXXXX YYYYYYYYYYY SYS_PLSQL_71964_26_1 YYYYYYYYYYY EXECUTE YES NO

Those grants were generated automatically by oracle. Is there any way to prevent Oracle to grant them? An external audit-rule tells us not to give any grant directly to user - we always have to use databaseroles.

View 5 Replies View Related

Server Utilities :: Impdp Getting Grants And Privs

May 8, 2012

I did an export using the following parfile (see below) I want to import all the objects associated with this schema into another DB but I want don't want to over-write any of the permissions such as grants.

Is there a way I can get the grants into a sql file before I do the import. If so, provide an example.

cat exp_par

DUMPFILE=exp.dmp
LOGFILE=exp.log
DIRECTORY=DBBACKUP
schemas=t1

View 1 Replies View Related

Security :: Given Grants Doesn't Reflect On Oracle Forms 6i

Mar 14, 2013

regarding grants given on object doesn't reflect on Oracle forms 6i.When my developer compiled the form the error throws object was not declared which means oracle form not able to access the object which is synonym of other table.Also we recreated the synonym and given grants from table owner and compiled form still throws same error,But i can able to select object from backend command but not from oracle forms.

grants reflect in oracle forms after we restart the database.

View 2 Replies View Related

SQL & PL/SQL :: Is Select Privileges (grants) Needed For Created Synonym

Jun 4, 2012

After created synonym, Is select privileges(grants) needed for created synonym? SQL> create or replace synonym gm_holding for gmblbpna. gm_ holding;

Synonym created.

SQL> select *
2 from gm_holding;
from gm_holding
*
ERROR at line 2: ORA-00942: table or view does not exist

SQL> connect gmblbpna/gmblbpna@o03gpa0
Connected.
SQL> grant select on gm_holding to solvency;

Grant succeeded.

SQL> connect solvency/solvency@o03gpa0
Connected.
SQL> select count(1)
2 from gm_holding;
COUNT(1)
----------
346742
SQL>

why grant need for synonym?

View 4 Replies View Related

Server Utilities :: Expdp Using Remap_schema Will It Also Remap Grants And Synonyms

May 1, 2010

If I would be using expdp using remap_schema will it also remap grants and synonyms ?

View 5 Replies View Related

Export/Import/SQL Loader :: Grants And Synonyms While Importing Through Data Pump

Jul 22, 2012

OS: RHEL
DB: 11.2.0.2

Every time i try to refresh my production DB with the a old expdp dumpfile using data pump i always face the issue of grants and creation of synonym. I would like to tell you that my DB has three schemas which have lots of dependencies among them and before refreshing them i drop the schemas and recreate the same.

Drop user user_name cascade;So i want to know, is there a script from which i can get all the grants of the DB before dropping the schemas, so that after import i can grant the same and also a query with which i will be able to get all the synonyms of the DB.

View 8 Replies View Related

Server Administration :: How To Change Existing Materialized View To Normal View

Jan 17, 2013

can we change the existing materialized view to normal view? if yes how?

View 2 Replies View Related

Creating Materialized View On Remote Simple View

Dec 11, 2012

I'm trying to create a Materialized View on a remote database from a simple view. The reason is, the data owners don't want to grant explicit tables privileges to external subscribers.

A new schema is created to publish data in the form of a view. I've created mlogs on the master tables, and granted them to the subscriber, but it's still complaining about a missing primary key on the view. A primary key does exist in the master table.

Is there another work around for this situation without having to work inside the data sources' environment?

View 5 Replies View Related

SQL & PL/SQL :: Create Primary Key On View And Use This View For Creating Foreign Key?

Oct 8, 2010

is it possible to create primary key on view and use this view for creating foreign key .

View 3 Replies View Related

SQL & PL/SQL :: Change View Definition When Select Is Running On That View

Apr 25, 2012

We wrote one data load process to load GZ files into Database.during process we will change client facing view definitions to backup table so that we can work on base tables.

This view definition changes are related to FROM and WHERE clause (not columns/type). during load process, client/user may connect to current server and accessing these views. My question is what will be the reflection of changing view definition while user is accessing view?

I created a scenario-
STEP1: Created a view-
create or replace view view_01 as
select object_name from dba_objects union all
select object_name from dba_objects union all
select object_name from dba_objects union all
[code]....

View definition is replaced by new definition while select is executing on that view. select returned number of records as per view definition one.

View 6 Replies View Related

SQL & PL/SQL :: Get End Date Automatically?

Mar 24, 2012

I have these table :

create table mvt
(
id number(1) ,
dat date
)
/
insert into mvt values (1, '2.10.1999');
insert into mvt values (1, '1.08.2005');
insert into mvt values (1, '24.09.2008');
commit;

I want to build a query for id = 1 that retrieves this :

START END
-------- --------
02/10/99 31/07/05
01/08/05 23/09/08
24/09/08 {sysdate}

{sysdate} represents the current date.

I've tried with these query :

select
old.dat
, next.dat - 1
from mvt old, mvt next
where 1 = 1
and old.id = 1
and old.id = next.id
and next.dat in (select min(dat) from mvt where id = old.id and dat > old.dat)
/

But it delivers only this :

DAT NEXT.DAT
-------- --------
02/10/99 31/07/05
01/08/05 23/09/08

Is there a way to retrieve all what I want in one query (without unions or functions that gives the last date for id) ?

View 3 Replies View Related

SQL & PL/SQL :: Oracle View Have Dynamic View Function?

Jul 28, 2010

Are oracle view have Dynamic view function?

View 8 Replies View Related

SQL & PL/SQL :: Materialized View - Table Or View Does Not Exist

May 2, 2012

I have a materialized view "pro_mview",I am trying to refresh the MVIEW by using the following statement.

EXEC DBMS_MVIEW.REFRESH('pro_mview','C');

But I am getting the below error.

*
Error at line 1:
ORA-12008: error in materialized view refresh path
ORA-00942: table or view does not exist
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2256
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2462
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2431
ORA-06512: at line 1

I am able to fetch the data from that materialized view(pro_mview).

View 3 Replies View Related

How To Bounce Database Automatically

Aug 11, 2011

I want to write a script and schedule it in crontab, if it is ebs I have scripts addbctl.sh and addlnctl.sh to stop database and listner. But in another application (not ebs) these scripts are not available and I have to manually bounce database, giving commands SHUTDOWN IMMEDIATE and STARTUP after logging in into sqlplus, Is there any way to do this.

I tried a script to test whether it is connecting to database or not, but it is not working. This is the script I have written in invalids.sh

sqlplus apps/pwd
select count(*) from dba_objects where status='INVALID';
exit
echo "test ran at $(date)"

When I run this script in crontab , it is not working

04 12 * * * SCRIPT_PATH/invalids.sh >> SCRIPT_PATH/logs/test.txt

Also I tried whether crontab is working or not with this line

08 12 * * * echo "crontab tested at $(date)" >> SOME_PATH/tested.txt

In tested.txt, it is printing that output properly like this

crontab tested at Thu Aug 11 12:08:01 IST 2011

View 5 Replies View Related

Dbms Job Is Not Executing Automatically

Aug 11, 2011

Database 1(sm01):
=============
oracle, 9.2.0.6

there are 4 jobs scheduled in oracle dbms_job. 3 jobs will run everyday at 4.00AM. 1 job will run at every hour.Daily jobs are running fine. But hourly job is not executing automatically. If forced (exec dbms_job.run(<enter here job number>), this execute fine.

job_queue_processes=5
total jobs in schema=2503
total jobs in db = 2614

Even there are many jobs scheduled, next_date for 2234 jobs are lesser than the sysdate. Again in 269(2503-2234) jobs, 2265 are having NULL in the interval column.

Database 2(sm02):
=============
oracle, 9.2.0.6

there are 4 jobs scheduled in oracle dbms_job. 3 jobs will run everyday at 4.00AM. 1 job will run at every hour.All the jobs are not running automatically. If forced (exec dbms_job.run(<enter here job number>), these execute fine.

job_queue_processes=5
total jobs in schema=7
total jobs in db = 7

I planning to follow the below steps to avoid the above issue.

1.) Restart the job queue process by executing alter system set job_queue_processes=0

2.) Increase the value for the job_queue_processes.

3.) Restart the database

But I got stuck in the 2nd step. what value I need to put for this job_queue_processes parameter?

View 2 Replies View Related

Automatically Create Many Tables From 1 Big Table?

Aug 30, 2007

I have a table with over 100000 records.

The format and data is something like this:

Region Code,Name,Surname,ID_Number
1,John,Doe,67
1,Sarah,Jason,45
2,Bob,Marley,69
3,Steven,Johnson,900
2,Harry,Potter,890
3,Sandy,Bay,567
3,Else,Taylor,789 .....

I have about over 100 region codes and each region would like to get their own data. I can manually do the extraction and create a new table for every region, but it's going to take too long.

View 7 Replies View Related

Send CLOB Data Automatically Using CDC?

Jan 5, 2012

I want to know whether is it possible to send CLOB data automatically using CDC...i usually have to run a procedure manually to send such data to remote locations.

View 1 Replies View Related

How To Kill Inactive Connections Automatically

Apr 26, 2011

i was gone through the below link

[URL]

so when i changed my idle_time value in profile and the when the user exceeds the idle_time value the user still i can see in-active state in v$session.

and when i was tried to execute any query on inactive session that time i got an ORA- error and then session was not visible from v$session.

in my environment inactive session was not getting used afterwards so is there any way to kill that sessions automatically once reached idle_timeout value.

lets say i have 50 max sessions, out of which 10 are inactive state and 40 in active state .what if i created one more sessions will that give me ORA- error stating max sessions reached or it will kill the one session which are in-active state.

View 5 Replies View Related

TNSListener Service Stops Automatically?

Apr 7, 2011

In our production server, TNSListener Service stops automatically, atleast (once in a day). No alert in alert log file.

View 1 Replies View Related

Forms :: Commit Record Automatically?

Mar 15, 2010

I have a master detail form based on two tables and i want to save the record automatically when the user exits the last field.how i can do it.which trigger is appropriate and what is the code.

View 8 Replies View Related







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