How to start Scott user in Oracle

Source: Internet
Author: User

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:

  1. Alter UserScott account unlock;
This password may be required after unlocking:
  1. Alter UserScott identifiedByTiger;
Log On again:
  1. 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:

  1. 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.
  2. SQL * Plus: Release 10.2.0.1.0-ProductionOnSunday March 4 13:54:32 2012
  3. Copyright (c) 1982,200 5, Oracle.AllRights reserved.
  4. Connect:
  5. OracleDatabase10g Enterprise Edition Release 10.2.0.1.0-Production
  6. WithThe Partitioning, OLAPAndData Mining options
  7. SQL> showUser;
  8. USERIs"SYSTEM"
  9. SQL>
  10. 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.
  11. SQL> connAsSysdba;
  12. Enter the User name: sys
  13. Enter the password :****
  14. Connected.
  15. SQL> showUser;
  16. USERIs"SYS"
  17. Use showUserCommand to view the user currently logged on.
  18. SQL> showUser;
  19. USERIs"SYS"
  20. Use sys to enable Scott User: Enter the command:
  21. SQL>Alter UserScott account unlock;
  22. The user has changed.
  23. SQL>Alter UserScott identifiedByTiger;
  24. The user has changed.
  25. SQL> conn scott;
  26. Enter the password :*****
  27. Connected.
  28. SQL> showUser;
  29. USERIs"SCOTT"
  30. SQL>

Use the Oracle command to view all existing users in the current database:

  1. SelectUsernameFromDba_users;

Over !!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.