Home » RDBMS Server » Server Administration » User login fails
User login fails [message #524815] Tue, 27 September 2011 01:38 Go to next message
zabltn
Messages: 45
Registered: September 2011
Member
I just create a user and tried to log in but it gives the following error, why?
pealse help.



SQL*Plus: Release 10.1.0.4.2 - Production on Tue Sep 27 10:57:55 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL> create user user1 identified by user1;

User created.

SQL> conn user1
Enter password: *****
ERROR:
ORA-12560: TNS:protocol adapter error


Warning: You are no longer connected to ORACLE.
Re: User login fails [message #524817 is a reply to message #524815] Tue, 27 September 2011 01:49 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ORACLE_SID and/or ORACLE_HOME is not set.

Regards
Michel
Re: User login fails [message #524828 is a reply to message #524817] Tue, 27 September 2011 02:34 Go to previous messageGo to next message
zabltn
Messages: 45
Registered: September 2011
Member
I am new to Oracle, Please if you could explain what are they, why to set them and how to set them, it will be my pleasure thanks.
Re: User login fails [message #524829 is a reply to message #524828] Tue, 27 September 2011 02:36 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What is your OS?
Do you run on the database server or on a remote client?

Regards
Michel
Re: User login fails [message #524840 is a reply to message #524828] Tue, 27 September 2011 03:13 Go to previous messageGo to next message
zabltn
Messages: 45
Registered: September 2011
Member
currently it is Windows 7 i have designed it, and then after i finish it i will move it to Winows 2008 server.
Re: User login fails [message #524842 is a reply to message #524840] Tue, 27 September 2011 03:14 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Do you run on the database server or on a remote client?


Regards
Michel
Re: User login fails [message #524844 is a reply to message #524842] Tue, 27 September 2011 03:23 Go to previous messageGo to next message
zabltn
Messages: 45
Registered: September 2011
Member
Database Server
Re: User login fails [message #524850 is a reply to message #524844] Tue, 27 September 2011 04:08 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
In DOS box, execute:
set ORACLE_SID=<your database sid>
set ORACLE_HOME=<your database home>
sqlplus user1/...


But there are several inconsistencies in your post:
1/
SQL*Plus: Release 10.1.0.4.2

Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 


Have you 2 Oracle homes on your server?

2/
SQL> create user user1 identified by user1;
...

So your already connected to be able to create a user but as you can't connect locally with the new user this means you first connected through SQL*Net that is using an alias.
So you should be able to connect to the new user (after grant CREATE SESSION to it) with the same alias, that is in the same way you first connected.

Regards
Michel

[Updated on: Tue, 27 September 2011 04:09]

Report message to a moderator

Re: User login fails [message #524884 is a reply to message #524850] Tue, 27 September 2011 05:15 Go to previous messageGo to next message
zabltn
Messages: 45
Registered: September 2011
Member
C:\>seT ORACLE_SID=XE

C:\>set ORACLE_HOME=E:\oraclexe\app\oracle\product\10.2.0\server

C:\>sqlplus user1/user1

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Sep 27 14:33:20 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

ERROR:
ORA-01045: user USER1 lacks CREATE SESSION privilege; logon denied



1/
i have installed the oracle 10g express edition database server and i have also installed oracle 10g developer suite.


2/
SQL> grant create session to user1;

Grant succeeded.

SQL> conn user1
Enter password: *****
ERROR:
ORA-12560: TNS:protocol adapter error
Re: User login fails [message #524891 is a reply to message #524884] Tue, 27 September 2011 05:31 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
SQL> grant create session to user1;

And how did you connect before this? You hide some information which are important.
Anyway, you have the way to do it.

Regards
Michel
Re: User login fails [message #524894 is a reply to message #524891] Tue, 27 September 2011 05:36 Go to previous messageGo to next message
zabltn
Messages: 45
Registered: September 2011
Member
No i didnt hide anything, that user was the default SYSTEM user, and through that user i have created the user user1 so now the problem is that i am not able to connect with the user1.
Re: User login fails [message #524896 is a reply to message #524894] Tue, 27 September 2011 05:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
No i didnt hide anything, that user was the default SYSTEM user,

So copy and paste the connection.

Quote:
that i am not able to connect with the user1.

You are able, just reexecute the same thing you did before you granted CREATE SESSION.

Regards
Michel
Re: User login fails [message #524901 is a reply to message #524896] Tue, 27 September 2011 05:48 Go to previous messageGo to next message
zabltn
Messages: 45
Registered: September 2011
Member
Okay let me clear it.

i went to star menu on my windows7 >> Applicatoin Development>>sqlplus>> now it is promting me for a user and password, and i gave it <system> in the username box, <shaikh> for its password, and <myNSN> for the host string. Then it connect me to the Database through the <system> user now i have created another user and i cant login to that user.

Re: User login fails [message #524906 is a reply to message #524901] Tue, 27 September 2011 05:57 Go to previous messageGo to next message
Roachcoach
Messages: 1576
Registered: May 2010
Location: UK
Senior Member
As Michel said, users need 'create session'.

Sys[tem] is different, Sys[tem] is special.
Re: User login fails [message #524908 is a reply to message #524906] Tue, 27 September 2011 06:03 Go to previous messageGo to next message
zabltn
Messages: 45
Registered: September 2011
Member
Okay thanks i got it, now would you please tell me why i am not able to log in to the user i have created by the name of <user1>
Re: User login fails [message #524911 is a reply to message #524908] Tue, 27 September 2011 06:20 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
i went to star menu on my windows7 >> Applicatoin Development>>sqlplus>> now it is promting me for a user and password, and i gave it <system> in the username box, <shaikh> for its password, and <myNSN> for the host string.


Quote:
conn user1@<myNSN>


The red part is missing in your connection.

Regards
Michel
Re: User login fails [message #526140 is a reply to message #524911] Sun, 09 October 2011 00:04 Go to previous messageGo to next message
edris
Messages: 7
Registered: July 2011
Junior Member

First sorry i was on a leave.

Second thanks now i can log in to the user1 user, now i want to grant the sysdba privilages to the user1 user through the SYSTEM user but i cant do this, it says insufficient privilage. I know we can grant privilage to a user by the SYS user but the point is that i dont know what was its password.

your help will be my pleasure.
kind regards.
Re: User login fails [message #526141 is a reply to message #526140] Sun, 09 October 2011 01:01 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Only SYSDBA can grant SYSDBA privilege.
Do you have access to the database server? Can you log on it?

Regards
Michel

[Updated on: Sun, 09 October 2011 01:02]

Report message to a moderator

Re: User login fails [message #526142 is a reply to message #526141] Sun, 09 October 2011 01:15 Go to previous messageGo to next message
edris
Messages: 7
Registered: July 2011
Junior Member

Yes, i can connect with the server through the SYSTEM user, and i am not able to connect through the SYS user because i dont know its password. And i think SYSTEM does not has the right to grant a user sysdba privilege.

[Updated on: Sun, 09 October 2011 01:19]

Report message to a moderator

Re: User login fails [message #526143 is a reply to message #526142] Sun, 09 October 2011 01:41 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What I mean is: are you able to log at OS level?
More, are you able to log in with an account in ORA_DBA group?

Regards
Michel
Re: User login fails [message #526144 is a reply to message #526143] Sun, 09 October 2011 01:57 Go to previous messageGo to next message
edris
Messages: 7
Registered: July 2011
Junior Member

I dont know either how to log in OS level or how to find which group i am part of. Please guide me.
Re: User login fails [message #526145 is a reply to message #526144] Sun, 09 October 2011 02:05 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You connect on the server the same way you connect to your PC using an account and a password.

Regards
Michel

[Updated on: Sun, 09 October 2011 02:05]

Report message to a moderator

Re: User login fails [message #526146 is a reply to message #526145] Sun, 09 October 2011 02:20 Go to previous messageGo to next message
edris
Messages: 7
Registered: July 2011
Junior Member

The server and the client both are my PC, i log in to my windows account through a different username and password then i go to the sql*plus so as the login box appears i give the username SYSTEM and the password MYDB, that is it.
Re: User login fails [message #526147 is a reply to message #526146] Sun, 09 October 2011 02:46 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Are you in the Windwos ORA_GROUP?
Are you administrator of your PC?

Regards
Michel
Re: User login fails [message #526149 is a reply to message #526147] Sun, 09 October 2011 04:37 Go to previous messageGo to next message
edris
Messages: 7
Registered: July 2011
Junior Member

YES,
Re: User login fails [message #526165 is a reply to message #526149] Sun, 09 October 2011 13:32 Go to previous messageGo to next message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So no problem, just "connect / as sysdba".

Regards
Michel
Re: User login fails [message #526279 is a reply to message #526165] Mon, 10 October 2011 07:31 Go to previous message
Michel Cadot
Messages: 68648
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The rest of the topic was splitted in "Cannot create a trigger" one.

Regards
Michel
Previous Topic: oratab
Next Topic: segment - programmer (merged 2)
Goto Forum:
  


Current Time: Thu May 02 09:06:56 CDT 2024