Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to grant a user with CREATE SESSION privilege?

Posted on 2010-11-13
6
Medium Priority
?
1,474 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

722 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