Home » SQL & PL/SQL » SQL & PL/SQL » Create New User
Create New User [message #348307] Tue, 16 September 2008 06:57 Go to next message
gauravgg
Messages: 4
Registered: September 2008
Location: Bangalore,India
Junior Member
How can we create a new USER with password in the database..
Re: Create New User [message #348313 is a reply to message #348307] Tue, 16 September 2008 07:02 Go to previous messageGo to next message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
CREATE USER
And read the whole book.

Regards
Michel
Re: Create New User [message #348325 is a reply to message #348313] Tue, 16 September 2008 07:36 Go to previous messageGo to next message
Vivek.k.thakur
Messages: 30
Registered: December 2007
Location: DELHI, INDIA
Member


1.)
ALTER USER username IDENTIFIED BY password
DEFAULT TABLESPACE tablespace_name
TEMPORARY TABLESPACE tablespace_name
QUOTA 10M ON tablespace_name;


2.) GRANT CONNECT,RESOURCE TO username;

Re: Create New User [message #348328 is a reply to message #348325] Tue, 16 September 2008 07:43 Go to previous messageGo to next message
gauravgg
Messages: 4
Registered: September 2008
Location: Bangalore,India
Junior Member
hi,
alter is ok.but can i create a separate user from the existing one.
Re: Create New User [message #348331 is a reply to message #348328] Tue, 16 September 2008 07:47 Go to previous messageGo to next message
Olivia
Messages: 519
Registered: June 2008
Senior Member


Yes, to know more please go through the link provided by Michel.

Regards,
Oli

[Updated on: Tue, 16 September 2008 07:49]

Report message to a moderator

Re: Create New User [message #348333 is a reply to message #348325] Tue, 16 September 2008 07:56 Go to previous messageGo to next message
joy_division
Messages: 4641
Registered: February 2005
Location: East Coast USA
Senior Member
Vivek.k.thakur wrote on Tue, 16 September 2008 08:36

1.)
ALTER USER username IDENTIFIED BY password
DEFAULT TABLESPACE tablespace_name
TEMPORARY TABLESPACE tablespace_name
QUOTA 10M ON tablespace_name;


2.) GRANT CONNECT,RESOURCE TO username;




ALTER will not create a new user; It will change a current user.

I would advise against granting those two privileges.
Re: Create New User [message #348335 is a reply to message #348333] Tue, 16 September 2008 08:00 Go to previous messageGo to next message
Vivek.k.thakur
Messages: 30
Registered: December 2007
Location: DELHI, INDIA
Member

Sorry experts,
I wrote ALTER instead CREATE

1.)
CREATE USER username IDENTIFIED BY password
DEFAULT TABLESPACE tablespace_name
TEMPORARY TABLESPACE tablespace_name
QUOTA 10M ON tablespace_name;


2.) GRANT CONNECT,RESOURCE TO username;
Re: Create New User [message #348361 is a reply to message #348335] Tue, 16 September 2008 09:23 Go to previous message
Michel Cadot
Messages: 64121
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This:
1/ Add nothing to the link I posted
2/ Does not change the advice to NOT use these roles.

Regards
Michel
Previous Topic: joining conditions
Next Topic: how do i write a trigger that gives increment only to clerks on insert
Goto Forum:
  


Current Time: Wed Dec 07 02:52:06 CST 2016

Total time taken to generate the page: 0.09144 seconds