Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to grant a user with CREATE SESSION privilege?

Posted on 2010-11-13
6
Medium Priority
?
1,486 Views
Last Modified: 2013-11-11
Hi

I'm trying to create a new user for my oracle database, but after I use the CREATE USER command, I cannot log in using that account.  It returns the error "user lacks CREATE SESSION privilege", so I guess the next step would be to grand CREATE SESSION privilege for the user.  How should I do so?  Thanks.

Tom
0
Comment
Question by:pisceswzh2010
6 Comments
 
LVL 17

Accepted Solution

by:
sweetfa2 earned 400 total points
ID: 34129774
GRANT CREATE SESSION TO <user>;

0
 
LVL 3

Assisted Solution

by:mpaladugu
mpaladugu earned 1200 total points
ID: 34129780
a user in oracle needs to have privileges to do any action, even to log in you need is a create seeeion privilege.  Privileges to a user are granted by a DBA when the user is created.

Privileges can be granted to a user either directly or through a role. For a better understating of managing user roles and prvileges read:-

http://download.oracle.com/docs/cd/B10501_01/server.920/a96521/privs.htm

to ling with the user account you just created: grant the connect role to user by executing the following command logging in as dba:-

GRANT CONNECT TO your_usernae_here;
0
 
LVL 3

Assisted Solution

by:mpaladugu
mpaladugu earned 1200 total points
ID: 34129794
CONNECT is role in oracle which has some privileges assigned to it, if you assign this role to a user, that user will get all the privileges in the role.  

but from oracle 10g r2 forward this role has only create session privilege.

prior to oracle 10g r2 Connect role used to contain all of the below privileges:- Alter Session,
,Create Session, Create Cluster, Create Synonym, Create Database Link, Create Table
Create Sequence,      Create View
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 3

Assisted Solution

by:mpaladugu
mpaladugu earned 1200 total points
ID: 34129802
A predefined role, named "DBA", is automatically created with every Oracle database. This role contains all database system privileges. Therefore, it is very powerful and should be granted only to fully functional database administrators.  If you are working on database installation that is personal to your use OR for your practice, you can assign this role to the user created and continue practicing.

0
 
LVL 12

Assisted Solution

by:Praveen Kumar Chandrashekatr
Praveen Kumar Chandrashekatr earned 400 total points
ID: 34129859
creating an user in oracle is suggest allocating some schema to the user but to do some work i.e login to server, creating table etc.. you have assign appropriate privileges to that user.

after creating a new user the basic or first privilege you should assigne is create session.

i.e
CREATE USER myuser IDENTIFIED BY password
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp
QUOTA UNLIMITED ON users
QUOTA 100M ON my_data;

Grant create session to myuser;

have a look on this doc for more info...

http://www.dba-oracle.com/concepts/grant_user_privileges.htm
0
 

Author Closing Comment

by:pisceswzh2010
ID: 34129902
Thanks everyone.  Your information is very helpful!
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
Via a live example, show how to take different types of Oracle backups using RMAN.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question