The method for starting Scott user in Oracle. In Oracle10g, (g stands for 'network') the Scott user in the database is locked during installation. When installing Oracle, you can directly unlock the user. If you forget to unlock the user, you can use the sqlplus tool to unlock the user by using commands later.
The scott user is locked by default. Unlock the user to log on to the database.
Use the following statement to unlock scott:
[SQL] alter user scott account unlock;
This password may be required after unlocking:
[SQL] alter user scott identified by tiger;
Log On again:
[SQL] sqlplus scott/tiger
Then you can log on.
Note: To enable the account with the command line, you must set a password after unlocking the account. Otherwise, you still cannot log on and submit the account.
Complete the demo operation:
[SQL] use the system user to log on to the Oracle database, and enter the command: show user. The command execution result is: the user currently logged on is displayed.
SQL * Plus: Release 10.2.0.1.0-Production on Sunday March 4 13:54:32 2012
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connect to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production With the Partitioning, OLAP and Data Mining options
SQL> show user; USER: "SYSTEM" SQL>
Log on to the Oracle database using the sys user and enter the command conn as sysdba. After the command is executed, the system prompts: Enter the user name, and then enter the password. After the system checks the password correctly, the system can connect to the database.
SQL> conn as sysdba; enter the User name: sys and enter the password: *** connected.
SQL> show user; USER is "SYS"
Use the show user command to view the currently logged-on user.
SQL> show user; USER is "SYS"
Use sys to enable Scott user: Enter the command: SQL> alter user scott account unlock; the user has changed.
SQL> alter user scott identified by tiger; the user has changed.
SQL> conn scott; enter the password ***** connected.
SQL> show user; USER: "SCOTT" SQL>
Use the Oracle command to view all existing users in the current database:
[SQL] select username from dba_users;
Author's nickname