Home » RDBMS Server » Server Administration » dba role
dba role [message #523034] Thu, 15 September 2011 05:31 Go to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
i have being given a dba role

when i desc *****table i couldn't do it. It says table or view not exist. BUT when i

desc schema.******thatTable, i can now? Why is that so.

2nd case:

When I

select privilege from dba_tab_privs
where table_name='SCHEMA.xxxxxSOME_TABLE and grantee='apple';

I have no rows!

I am very sure i have SUCESSFULLY granted a SELECT to apple.

Not too sure is it related to theh first problem i am having.
Re: dba role [message #523035 is a reply to message #523034] Thu, 15 September 2011 05:37 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
First question: you don't own the table, so you have to specify its owner.

Second question: table_name is what it says - a TABLE name. You don't include owner along with the table name. Describe DBA_TAB_PRIVS, you'll find the OWNER column in it.
Re: dba role [message #523036 is a reply to message #523034] Thu, 15 September 2011 06:01 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
i have being given a dba role

You should consider that you ask your senior to revoke this role from you but for a single test database as you have not the minimum knowledge to have it.

You should also immediatly read Database Concepts, and as soon as possible Database Reference and Administrator's Guide.

Regards
Michel

[Updated on: Thu, 15 September 2011 06:01]

Report message to a moderator

Re: dba role [message #523042 is a reply to message #523034] Thu, 15 September 2011 06:38 Go to previous messageGo to next message
John Watson
Messages: 8931
Registered: January 2010
Location: Global Village
Senior Member
Second question:

After LF's change, remember that names are case sensitive. Schema 'apple' is not the same schema as 'APPLE'. Because some tools may do implicit case conversion in some (but not all) circumstances, this can be very confusing.

Re: dba role [message #523089 is a reply to message #523035] Thu, 15 September 2011 09:27 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
littleFoot

(1)
I thought dba is like a 'King, where you can just straight away describe any table without knowing the schema.

(2)
Erm, i access dba_tab_privs is to find out grantee was given what privilege on this particular table. I don't quite understanding what you mean by refering to the column of the OWNER from dba_tab_prvs since i already know the schema of the table, which also mean the one who create the table.

(3)

Micheal, well is a test database. No worry. U dun have to always be hash on people. Cheer up ok. Have patience. And yes i am reading what doc u have mention. Thus along the way i will ask so call stupid question as i test my own understanding and ask question over here. If you don't have any input, you can avoid answering my question. I don't feel any encouragement from you. Anyway thanks.
Re: dba role [message #523090 is a reply to message #523089] Thu, 15 September 2011 09:30 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
LitteFoot do you mean:

select privileges from dba_tab_privs where table_name='TBL_SomeFakeTable and owner='ownerTBL_SomeFakeTable;
Re: dba role [message #523091 is a reply to message #523089] Thu, 15 September 2011 09:31 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
hanner,

It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/

U is not a member of this forum.
Re: dba role [message #523092 is a reply to message #523091] Thu, 15 September 2011 09:32 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
LitteFoot do you mean:

ignore the wrong post....it below should be the correct sytax... ?

select privileges from dba_tab_privs where table_name='TBL_SomeFakeTable and owner='ownerTBL_SomeFakeTable and grantee='apple';
Re: dba role [message #523093 is a reply to message #523092] Thu, 15 September 2011 09:34 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
table_name, owner and grantee all need to be in upper case as John pointed out.
Re: dba role [message #523094 is a reply to message #523091] Thu, 15 September 2011 09:34 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
black swan,

[U is not a member of this forum.]

erm, i don't get you? Am i posting my question in the wrong category?
Re: dba role [message #523095 is a reply to message #523093] Thu, 15 September 2011 09:35 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
cookieMonster,

yes yes..i am aware of that, just that over here i am typing it out...to bring across what i am trying to say. Thanks for your quick rsponse. love u.
Re: dba role [message #523097 is a reply to message #523094] Thu, 15 September 2011 09:40 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
hanner wrote on Thu, 15 September 2011 15:34
black swan,

[U is not a member of this forum.]

erm, i don't get you? Am i posting my question in the wrong category?


You're using IM speak. Which the fourm guide says you shouldn't. Use proper words.
Re: dba role [message #523098 is a reply to message #523097] Thu, 15 September 2011 09:49 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
cookieMonster,

noted with thanks.
Re: dba role [message #523100 is a reply to message #523098] Thu, 15 September 2011 09:54 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
But i am surprise that oracle never throw an error when i actually include the owner in the tableName when using dba_tab_privs. Like schema.sometable. It just show no rows.
Re: dba role [message #523102 is a reply to message #523100] Thu, 15 September 2011 09:58 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>But i am surprise that oracle never throw an error when i actually include the owner in the tableName when using dba_tab_privs.
> Like schema.sometable. It just show no rows.
Why surprised?
No rows satisfied the SQL?
It is like doing SQL below
SELECT ID FROM TABLE_A WHERE 1 = 2;
Re: dba role [message #523103 is a reply to message #523102] Thu, 15 September 2011 10:15 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
You told oracle to look for a value that doesn't exist. What error would you expect to get?
Re: dba role [message #523107 is a reply to message #523100] Thu, 15 September 2011 10:55 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You should really ask your senior dba to revoke the DBA role from your account.
You should really read the books I pointed you to and in addition you can also read Database Reference

Regards
Michel
Re: dba role [message #523110 is a reply to message #523107] Thu, 15 September 2011 11:14 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
michal,

revoke what? is a test database...what talking you....and what senior dba....where does a senior dba comes from? erm..guess u are quick to jump into your own assumption..is..ok. I shall leave it as it is. Thanks anyway.....good luck to you.



Black swan + cookieMonster, thanks..got it!
Re: dba role [message #523111 is a reply to message #523110] Thu, 15 September 2011 11:18 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Well, if it is your own database, you should actually read the books I pointed you too before you break your database.

Regards
Michel
Re: dba role [message #523113 is a reply to message #523111] Thu, 15 September 2011 11:32 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
michel....lol......then i can install more as a practice....nice advice.. .
Re: dba role [message #523121 is a reply to message #523092] Thu, 15 September 2011 13:17 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
hanner wrote on Thu, 15 September 2011 10:32

select privileges from dba_tab_privs where table_name='TBL_SomeFakeTable and owner='ownerTBL_SomeFakeTable and grantee='apple';


This is still syntactically incorrect due to unbalanced quotes and/or missing spaces. Or is it contextually incorrect?
Re: dba role [message #523176 is a reply to message #523121] Thu, 15 September 2011 20:38 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
joy_divison,

select privileges from dba_tab_privs where table_name='TBL_SomeFakeTable' and owner='ownerTBL_SomeFakeTable' and grantee='apple';

[Updated on: Thu, 15 September 2011 20:39]

Report message to a moderator

Re: dba role [message #523177 is a reply to message #523176] Thu, 15 September 2011 20:40 Go to previous messageGo to next message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
Joy_divison,

yes i will take extra care next time when i type out my syntax.....meeting the forum RULE... . The tables are "fake" so normally it has to be case sensitive.
Re: dba role [message #523178 is a reply to message #523177] Thu, 15 September 2011 20:42 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>The tables are "fake" so normally it has to be case sensitive.
To what does "it" above refer?
Oracle is NOT case sensitive for object names; by default.

[Updated on: Thu, 15 September 2011 20:43]

Report message to a moderator

Re: dba role [message #523212 is a reply to message #523178] Fri, 16 September 2011 04:18 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
@hanner - if you ask us to check syntax, post the proper query, because we will check everything. We always do with syntax questions because plenty of people will try to run code like the above and then wonder why it doesn't work.
Re: dba role [message #523225 is a reply to message #523212] Fri, 16 September 2011 05:19 Go to previous message
hanner
Messages: 90
Registered: August 2011
Location: at HOME
Member
cookieMonster,

note taken.
Previous Topic: table_owner vs schema
Next Topic: Oracle Startup
Goto Forum:
  


Current Time: Fri Apr 26 10:45:07 CDT 2024