Home » RDBMS Server » Security » Assigning roles (oracle 10.2.0.4.0,windows)
Assigning roles [message #436255] Tue, 22 December 2009 07:37 Go to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member
Hi all,

I have a doubt in assigning default role to user while creating database account.

Can somebody tell me, Is there any difference in below 2 commands or
they have same meaning?

GRANT NEWROLE TO DREAM;

ALTER USER DREAM DEFAULT ROLE NEWROLE;



Thanks

Re: Assigning roles [message #436256 is a reply to message #436255] Tue, 22 December 2009 07:40 Go to previous messageGo to next message
Kamran Agayev
Messages: 145
Registered: February 2009
Location: Azerbaijan, Baku
Senior Member

When a user logs into Oracle, all default roles are enabled, but non-default roles must be enabled with the SET ROLE statement.

Re: Assigning roles [message #436263 is a reply to message #436255] Tue, 22 December 2009 08:38 Go to previous messageGo to next message
Michel Cadot
Messages: 63817
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
GRANT => grant a role
ALTER USER => define what are the default roles among those that have been granted

Regards
Michel
Re: Assigning roles [message #436264 is a reply to message #436263] Tue, 22 December 2009 09:09 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member


Thanks
Re: Assigning roles [message #436299 is a reply to message #436264] Tue, 22 December 2009 20:59 Go to previous message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
This will help you

Quote:
Is there any difference in below 2 commands

One is DCL another one is DDL Wink
Sriram Smile
Previous Topic: Password Policy
Next Topic: Privileges on create procedure
Goto Forum:
  


Current Time: Fri Sep 30 21:01:56 CDT 2016

Total time taken to generate the page: 0.30853 seconds