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:
- Alter UserScott account unlock;
This password may be required after unlocking:
- Alter UserScott identifiedByTiger;
Log On again:
- 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:
- Log on to the Oracle database using the system user and enter the command: showUserThe command execution result is: the user currently logged on is displayed.
- SQL * Plus: Release 10.2.0.1.0-ProductionOnSunday March 4 13:54:32 2012
-
- Copyright (c) 1982,200 5, Oracle.AllRights reserved.
-
-
- Connect:
- OracleDatabase10g Enterprise Edition Release 10.2.0.1.0-Production
- WithThe Partitioning, OLAPAndData Mining options
-
- SQL> showUser;
- USERIs"SYSTEM"
- SQL>
-
- Log on to the Oracle database using the sys user and enter the command: connAsSysdba; after the command is executed, the system prompts: Enter the user name, and then enter the password. After the system checks the correct information, you can connect.
- SQL> connAsSysdba;
- Enter the User name: sys
- Enter the password :****
- Connected.
- SQL> showUser;
- USERIs"SYS"
-
- Use showUserCommand to view the user currently logged on.
- SQL> showUser;
- USERIs"SYS"
-
-
-
- Use sys to enable Scott User: Enter the command:
- SQL>Alter UserScott account unlock;
- The user has changed.
-
- SQL>Alter UserScott identifiedByTiger;
- The user has changed.
-
- SQL> conn scott;
- Enter the password :*****
- Connected.
- SQL> showUser;
- USERIs"SCOTT"
- SQL>
Use the Oracle command to view all existing users in the current database:
- SelectUsernameFromDba_users;
Over !!!