[Show all top banners]

the_hareeb
Replies to this thread:

More by the_hareeb
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 DBA question
[VIEWED 2874 TIMES]
SAVE! for ease of future access.
Posted on 10-11-09 8:29 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I am logged in as SYSTEM.. and do the following query:

grant select rev_address to Accountant;

i get the following error:

Error starting at line 1 in command:
grant select rev_address to Accountant
Error report:
SQL Error: ORA-00990: missing or invalid privilege
00990. 00000 -  "missing or invalid privilege"
*Cause:    
*Action:

Because I am logged in as SYSTEM, shouldn't I have grant privledge? If I dont, how do i grant SYSTEM a grant privledge. Thanks.



 
Posted on 10-11-09 8:36 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

it is 

grant select on  rev_address to Accountant;

 
Posted on 10-11-09 9:24 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

ya thanks.. it worked.. 
another problem is that:

GRANT ALL on author to Accountant;

GRANT Accountant to AMARTIN;

everything suceeds with no error but when i log in as amartin, i dont see any tables under him.

select *
from author; returns nothing.. 

thanks for help

 
Posted on 10-11-09 9:29 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

SELECT*
FROM ROLE_SYS_PRIVS
WHERE role = 'Accountant';

from SYSTEM also gives:

Unknown Command

Error starting at line 3 in command:
WHERE role = 'Accountant';
Error report:
Unknown Command

 
Posted on 10-11-09 9:41 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

GRANT all  on author to Accountant;

GRANT Accountant to AMARTIN;


SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTEE = 'AMARTIN';

GRANTEE                        GRANTED_ROLE                   ADMIN_OPTION DEFAULT_ROLE 
------------------------------ ------------------------------ ------------ ------------ 
AMARTIN                        CEO                            NO           YES          
AMARTIN                        ACCOUNTANT                     NO           YES          
AMARTIN                        CONNECT                        NO           YES          





but when i do  SELECT * FROM ROLE_TAB_PRIVS WHERE ROLE = 'Accountant';
it returns nothing .. could this be the reason? it is not showing what tables Accountant role has privledges to.

 
Posted on 10-11-09 9:51 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

use ,

Create role all_test;-Create a Role called all_test
GRANT ALL on author to all_test; -Grant all Privileges to this Role i.e all_test

GRANT all_test to AMARTIN;-Assign all_test role to amartin

if this doesn't work try 
grant all on author to all_test with grant option;

or

grant all on author to all_test with admin option;



 
Posted on 10-11-09 11:06 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

GRANT all  on author to Accountant with grant option;


Error starting at line 1 in command:
GRANT all  on author to Accountant with grant option
Error report:
SQL Error: ORA-01926: cannot GRANT to a role WITH GRANT OPTION
01926. 00000 -  "cannot GRANT to a role WITH GRANT OPTION"
*Cause:    Role cannot have a privilege with the grant option.
*Action:   Perform the grant without the grant option.


----------------------
This is what i did..
GRANT all  on author to Accountant;
GRANT Accountant to AMARTIN;


 SELECT * FROM ROLE_TAB_PRIVS WHERE ROLE = 'Accountant';


returns:

ROLE                           OWNER                          TABLE_NAME                     COLUMN_NAME                    PRIVILEGE                                GRANTABLE 
------------------------------ ------------------------------ ------------------------------ ------------------------------ ---------------------------------------- --------- 

0 rows selected




 
Posted on 10-12-09 9:46 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Bro ,


where clauses varchar are case sensetive .


 


SELECT * FROM ROLE_TAB_PRIVS WHERE ROLE = 'ACCOUNTANT';


 


<<select *from author>>


You are logged in as AMARTIN so it is looking under AMARTIN schema for an object names author which doe not exists . You could solve the following by 2 ways .


 


1. select * from schema_name.table_name ;


 


in your case I believe author is a table but you need to know the schema name.


 


or


2. Create public or private synonym author for schema_name.author;


 


and try your statement select * from author;


 


Hope this works


 


Good Luck


 
Posted on 10-12-09 3:55 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

pyaradeshbasiharu and baire.. thanks for your help.... I really appriciate it



 
Posted on 10-12-09 3:59 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 
 
Posted on 10-12-09 4:28 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

btw is there a good DBA resource site I should be familiar off. Good documents.

I am giving an OCA exam soon, need some good tutorial, any forums that I can ask questions..



 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 30 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
nrn citizenship
ढ्याउ गर्दा दसैँको खसी गनाउच
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
कल्लाई मुर्ख भन्या ?
Morning dharahara
मन भित्र को पत्रै पत्र!
Guess how many vaccines a one year old baby is given
जाडो, बा र म……
Elderly parents travelling to US (any suggestions besides Special Assistance)?
Susta Susta Degree Maile REMIXED version
lost $3500 on penny stocks !!!
They are openly permitting undocumented immigrants to participate in federal elections in Arizona now.
1974 AD Pinjadako Suga Remixed
Changing job after i-140 approval
TPS Reregistration and EAD Approval Timeline.......
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters