How to create a normal user of oracle database? How to authorize ordinary users to manage the database?



 

Oracle database system is the most popular relational database management system in the world. Here I will introduce how to create ordinary users of oracle database and how to authorize ordinary users to manage the database.

 

 

After installing the oracle database, enter the cmd command interface (win+R), first link the database as an administrator, there are two ways:

1. Enter sqlplus, and then enter the administrator user name (system) and password to link successfully.

2. Enter sqlplus "/as sysdba" to link successfully.

 

 

 

 

  

 

 

 

  

 

 

 

Create a common user: Create a common user through the management user, after linking to the database, enter on the command line:

create user yonghuming identified by mima;

this command means to create a user named yonghuming and password mima, of which the yonghuming and mima parts are You can modify it yourself, click Enter, and the user is created successfully.

 

 

 

 

  

 

 

 

Authorization to ordinary users: The newly created ordinary user does not have the authority to manage the database. You can authorize the ordinary user through the administrator user to have the function of managing the database. Enter at the command line:

grant resource, connect to yonghuming; (slightly modified according to the user you created)

and click Enter, the authorization is successful. The meaning of this command is to grant the user yonghuming the ability to create and modify data tables and link databases.

 

 

 

 

  

 

 

 

Link to ordinary user 1 (you need to log in as an administrator first): enter at the command line:

conn yonghuming/mima; (slightly modified according to the user you created)

This command means to link to the user yonghuming, but this way The password is visible and not very secure.

 

 

 

 

  

 

 

 

Link to ordinary user 2 (you need to log in as an administrator first): enter at the command line:

conn yonghuming; (slightly modified according to the user you created)

Click Enter, you will be prompted to enter a password, just enter the set password The link was successful. In this way, the password is invisible and relatively secure.

 

 

 

 

  

 

 

 

Link to ordinary user three (no need to log in as an administrator): enter sqlplus after entering the cmd command interface, and then enter the ordinary user name and password. You can also type:

slplus yonghuming/mima;

but this is not recommended because of insecurity.

 

 

 

 

  

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326486241&siteId=291194637