Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to start a Scott user in Oracle 11gR2 (recommended)

2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The method of starting a Scott user in Oracle. Scott is locked when installed in the Oracle11gR2, (g stands for "network") database.

When installing Oracle, you can directly choose to unlock the user, and if you forget to unlock it, you can use the sqlplus tool to unlock it later.

The default scott user is locked, so you can log in and use the database after unlocking it.

Unlock the scott:alter user scott account unlock using the following statement

After unlocking, you may be asked for the password: alter user scott identified by tiger

Log in again: sqlplus scott/tiger

And then you can log in.

Note: use the command line to enable the account first unlock and then set the password or you will not be able to log in and finally submit.

Completion gives a demonstration operation:

1. Turn on SQL Plus. The execution result of this command is:

2. Log in to system (password, which is the password set during installation, such as 1234). The interface is as follows

3. Log in to Oracle database using sys user

Enter command: conn as sysdba

After the execution of the command prompt: enter a user name, and then prompt for a password, after the system checks correctly, you can connect.

Use the show user; command to view the currently logged-in users.

SQL > show user;USER is "SYS"

4. Use sys to enable Scott users:

Enter the command:

The SQL > alter user scott account unlock; user has changed.

The SQL > alter user scott identified by tiger; user has changed.

SQL > conn scott; enter password: * connected.

SQL > show user

USER is "SCOTT"

Use the Oracle command to view all users that already exist in the current database

The data dictionary dba_users checks the status of the current scott account. The command is as follows:

SQL > select username, account_stastus from dbs_users where username = 'SCOTT'

Summary

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report