Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm working on an Oracle 11g database, and simply need to create a user and log in with it. I successfully create the user, but after running the second line below, I still can't log in. Is there something I'm missing?

create user "oskar" identified by "oskar_pass";
grant create session to "oskar";

select * from DBA_USERS; --oskar is there, but can't log in

(I tired "grant connect" as well, to no avail.)

share|improve this question
2  
What is the error ? 11g has case-sensitive passwords so make sure you are not using an upper-case password –  Gary Jan 21 '11 at 20:40

2 Answers 2

up vote 2 down vote accepted

This worked for me (10.2.0.3)

SQL> connect dbauser/dbauser
Connected.
SQL> CREATE USER johndoe IDENTIFIED BY johndoe
  2   DEFAULT TABLESPACE "USERS"
  3   TEMPORARY TABLESPACE "TEMP";

User created.

SQL> GRANT CREATE SESSION TO johndoe;

Grant succeeded.

SQL> connect johndoe/johndoe
Connected.
share|improve this answer

If you used double quotes to create the user and give the password, then case becomes significant. I don't have an 11g DB here, but 10g allows me to create a user in lower case, and then I'm stuck using double quotes to log in with:

sqlplus /nolog
SQL> connect "test"@db
Enter password: 
Connected.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.