Home » SQL & PL/SQL » Client Tools » SQLPLUS Commands (Oracle9i Enterprise Edition Release 9.2.0.1.0)
SQLPLUS Commands [message #618448] Fri, 11 July 2014 16:33 Go to next message
Scroopter
Messages: 2
Registered: July 2014
Junior Member
Hello,

I'm a total newbie to Oracle so apolagies in advance for dumb questions.

I just added a new user from the command line like this:

net user zube password /add

net localgroup Administrators zube /add

net localgroup ORA_DBA zube /add

However, when I go to login, I get the following:


C:\WINNT\system32>sqlplus
sqlplus

SQL*Plus: Release 9.2.0.1.0 - Production on Fri Jul 11 15:10:13 2014

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Enter user-name: zube
Enter password: password
ERROR:
ORA-01017: invalid username/password; logon denied



Also, when I log in under the 'system' user and run the following command, I do not see the newly created user 'zube' listed:
SQL> select * from all_users;

So, I'm wondering if when I created the user zube, that that user is now in a different database? If so, how do I list the various databases on my server?

Re: SQLPLUS Commands [message #618449 is a reply to message #618448] Fri, 11 July 2014 17:11 Go to previous messageGo to next message
BlackSwan
Messages: 23059
Registered: January 2009
Senior Member
welcome to this forum

Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/ and please read http://www.orafaq.com/forum/t/174502/102589/

There is a BIG difference between the Operating System & the Oracle database.

PLEASE resist the urge to just blindly start entering commands

You need to learn to Read The Fine Manuals for the Oracle database

Take the time to actually read & understand the Concepts Manual (URL below)

http://docs.oracle.com/cd/E16655_01/server.121/e17633/toc.htm

http://www.oracle.com/pls/db121/search?remark=quick_search&word=create+user
Re: SQLPLUS Commands [message #618450 is a reply to message #618449] Fri, 11 July 2014 17:26 Go to previous messageGo to next message
Scroopter
Messages: 2
Registered: July 2014
Junior Member
Strange that after I added the user it does not show up after the following command is run:

SQL> select * from all_users;
Re: SQLPLUS Commands [message #618451 is a reply to message #618450] Fri, 11 July 2014 17:28 Go to previous messageGo to next message
BlackSwan
Messages: 23059
Registered: January 2009
Senior Member
Scroopter wrote on Fri, 11 July 2014 15:26
Strange that after I added the user it does not show up after the following command is run:

SQL> select * from all_users;



you issued OS commands which have ZERO impact on the content of the Oracle database.

READ the Concepts Manual!
Re: SQLPLUS Commands [message #618453 is a reply to message #618448] Sat, 12 July 2014 00:43 Go to previous messageGo to next message
yaokevin1987@gmail.com
Messages: 7
Registered: August 2013
Location: changchun
Junior Member
Hi

net user zube password /add just windows OS command

you can use sqlplus / as sysdba to login the database Laughing Confused
Re: SQLPLUS Commands [message #618458 is a reply to message #618448] Sat, 12 July 2014 01:29 Go to previous messageGo to next message
Michel Cadot
Messages: 59804
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Quote:
Also, when I log in under the 'system' user and run the following command, I do not see the newly created user 'zube' listed:
SQL> select * from all_users;


So now with SYSTEM, create your Oracle database account using CREATE USER and grant it the privileges a,d/or roles it needs using GRANT.

Database SQL Reference

Re: SQLPLUS Commands [message #618459 is a reply to message #618453] Sat, 12 July 2014 01:30 Go to previous messageGo to next message
Michel Cadot
Messages: 59804
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
yaokevin1987@gmail.com wrote on Sat, 12 July 2014 07:43
Hi

net user zube password /add just windows OS command

you can use sqlplus / as sysdba to login the database Laughing Confused


No!
OP has SYSTEM password, he does not need and must not use SYSDBA to do what he wants to do.


Re: SQLPLUS Commands [message #618460 is a reply to message #618453] Sat, 12 July 2014 01:33 Go to previous message
Lalit Kumar B
Messages: 2520
Registered: May 2013
Location: World Wide on the Web
Senior Member
yaokevin1987@gmail.com wrote on Sat, 12 July 2014 11:13
you can use sqlplus / as sysdba to login the database Laughing Confused


OP wants to create an user, he is already logged in to DB as system and thus able to run select * from all_users Razz

Quote:
when I log in under the 'system' user and run the following command, I do not see the newly created user 'zube' listed:
SQL> select * from all_users;


Edit : I see Michel replied as well around same time and he added further as to not use SYSDBA, so this link would be useful to read SYSDBA is special

[Updated on: Sat, 12 July 2014 01:37]

Report message to a moderator

Previous Topic: What is the best way to convert SQL DB to Oracle DB?
Next Topic: dbms_output in Toad or SQL Plus
Goto Forum:
  


Current Time: Thu Nov 27 05:18:37 CST 2014

Total time taken to generate the page: 0.11076 seconds