Grants And Privileges?
Jul 14, 2011how to give grants and privileges that are assign to schema(clerk) to new schema(manager).
View 1 Replieshow to give grants and privileges that are assign to schema(clerk) to new schema(manager).
View 1 RepliesAfter 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?
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.
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')?
whether JAVA grants are needed for JAVA services in Oracle and what are those grants ?
View 1 Replies View RelatedWe 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.
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]...
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.
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
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.
If I would be using expdp using remap_schema will it also remap grants and synonyms ?
View 5 Replies View RelatedOS: 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.
I have a doubt, I wanted to set the AWR report in scheduler. So i have created the below procedure in SYS LOGING and working fine.
But when i trying to create in another user after grant required privileges, still it shows error message.
CREATE OR replace PROCEDURE Create a wr reports
AS
v_instance_number v$instance.instance_number%TYPE;
v_instance_name v$instance.instance_name%TYPE;
v_dbid v$database.dbid%TYPE;
v_file utl_file.file_type;
[code].........
How can i list all the object privileges from n user?
for example:
I granted to USER1:
GRANT ALL on my_table1 to USER1;
GRANT ALL on my_table2 to USER1;
GRANT ALL on my_tableN to USER1;
How can i list all privileges from this user over all tables?
I don't know if this is possible, but i wanna to list:
USER1 ----- UPDATE, INSERT, DELETE ON my_table1
USER1 ----- UPDATE, INSERT, DELETE ON my_table2
USER1 ----- UPDATE, INSERT, DELETE ON my_tableN
Is this possible?
I have installed oracle on my linux machne recently as an oracle2 user. To day i found my listener up when start my as database ( by logging in to the sqlplus ) sqlplus /nolog - i get into sqlplus
When i startup the database
SQL>startup - I get this error ORA-01031: insufficient privileges
I tried to check if my oracle user is in the dba and oinstall group. it wasn't
I added the user to the group by doing usermod -G dba,oinstall oracle2
i chek in the group to see if the user has been added to the group i see the user added but i still get the same error ORA-01031: insufficient privileges when i try to start the database.
I read some where that you can try to uncomment the SQLNET.AUTHENTICATION_SERVICES line on sqlnet.ora file but on by my file (SQLNET.ORA) there is only one line written (NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT))
i have three scheme in one instance for example
x,y and z
i create view in x as x_view
next step create view in y as y_view select from x_view ;
and finished, create another view in z as z_view select from y_view;
i gave grants to all user , but when i try this query with x user as select * from z.z_view get this message ORA-01031: insufficient privileges;
attention that connect as x and try select * from z.z_view
How can i find out or list all the privileges that were given to a role with sqlplus cmd?
View 2 Replies View RelatedIs there any data dictionary table to get the object grants for total objects in the database?
Using DBA_TAB_PRIVS, i get object grants for tables only. But i'm looking for remaining objects also. The list of remaining objects is below.
view, or materialized view
Sequence
Procedure, function, or package
User-defined type
Synonym for any of the preceding items
Directory, library, operator, or indextype
Java source, class, or resource
provide me the other data dictionary tables for querying.
I'm not sure if this belong to this place. move it to the proper place.
I'm having an annoying problem: (I'm not sure if it is a problem)
- In a package body I'm trying to delete/update/insert/select the contents of a table in other schema.
- The respective synonym exists.
- I had created a role with the respective privileges over the synonym.
- I granted the role to the package's owner.
- I try to compile the package, but it keeps returning compilation errors. (Not table found)
- In standard SQL, I can delete/insert/update/select over the table.
- The only way to compile the package, without errors, is to grant the privileges directly to the package's owner.
Is it supposed to work in this way?
My tables are in ers_stg schema and code which collects state on these table are in etls_ers schema, what permission i need in order to get the stats collected from etls_srs schema. i am getting in sufficient privilege error.
View 1 Replies View Relatedi have created a context from schema 'Schema1' using "accessed globally" option and created on package to set the values for conext. It is working fine.
When i deploy the same package on schema2 (remember the context is on schema1) and try to execute it on schema2 then it is giving me the following error.
Connected to:
Oracle Database 10g Release 10.2.0.1.0 - Production
SQL> exec krishna_pkg.MyProcedure
BEGIN krishna_pkg.MyProcedure; END;
*
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_SESSION", line 90
ORA-06512: at "LGE2008DEV.KRISHNA_PKG", line 6
ORA-06512: at line 1
Say we have db1 and db2 two databases installed on two different servers.For internal needs, I have to insert some data from a table t1 on db1 to a table t2 in db2. This can be done by issuing from a user on db1 :
insert into t2@dblink2
select *
from t1;
where dblink2 is a correct database link that points to u2 (the t2 owner for example) on db2.
Now what I want to do is to grant privileges remotely.Is there a way to issue somthing like
execute@dblink2 'grant select on t2 to public';
It would be like u2 has issued the statment...
I don't want to use OS scripts (.sh or .bat).
What is meant by Roles and privileges?
View 4 Replies View RelatedI have a role R.I want to see what privileges have been granted to this Role R. Where should i query?
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionPL/SQL Release 11.2.0.3.0 - Production"CORE 11.2.0.3.0 Production"TNS for Solaris: Version 11.2.0.3.0 - ProductionNLSRTL Version 11.2.0.3.0 - Production
How CONNECT Role in oracle works.
I have my schema "SchemaABC" with ROLES created as CONNECT and RESOURCE. Also it doesn't have DBA role (to say).
SQL> Select * from User_Role_Privs;
USERNAME GRANTED_ROLE ADMIN_OPTION DEFAULT_ROLE OS_GRANTED
------------------------------ ------------------------------ ------------ ------------ ----------
SCHEMAABC CONNECT NO YES NO
SCHEMAABC RESOURCE NO YES NO
SQL>Currently we are able connect to this schema through code as well as from PL/SQL Developer. And uses it for all coding purposes like Create, Insert, Update, Stored Procedures, functions, triggers etc.
Now my question is, can this schema be changed to a role/privilege where all the above said activities can be done through code, but not from PL/SQL developer (making it to Read-only)? Yet, I will be using the same schema Name in code as well to connect from PL/SQL Developer.
I understand Connect role has big share in this. But if I remove the connect privilege(role), then will that work when I connect to it through code?
I installed 11g in my system.
Then I used to login as username@admin/password.
It returns error as ORA-12154: TNS:could not resolve the connect identifier specified.
After that I tried sqlplus "/ as sysdba"
it returns as ORA-01031: insufficient privileges
and then i set ORACLE_SID and then try sqlplus "/ as sysdba"
it returns ORA-12560: TNS:protocol adapter error.
How can we find out what are the privileges the user is having on a object.
For example I want to find what are the privileges the "uesr1" is having on "stud_table".
> conn sys as sysdba;
enter password:TIGER
>create user ram identified by ram;
>grant create session to ram;
>conn scott/tiger
>create table ram.emp2
as select * from emp;
>ora-error:- 01520 NO PRIVILEGES ON TABLESPACE 'USERS'
this is the query and i want to create emp2 table for user ram while i am connected to scott,
ealier i was able to do this but now oracle shows error 01950,
then i connected to sys again and ran this command >alter user scott quota unlimited on scott;
but it also not worked
I am trying cleaner and simple way to spool out all privileges of a user "ABC" in a way that it generates grant statement for them.
View 6 Replies View RelatedIs possible to list all users that have any privilege on a specific table?
View 2 Replies View Related