search
HomeDatabaseSQLORACLE user rights management

ORACLE user rights management

Apr 09, 2019 pm 12:06 PM
oracleauthority management

Today, let’s take a look at ORACLE’s user rights management. Creating new users can only be done by Oracle's DBA administrator.

语句:Create user TestUser identified by testPass;

       其中TestUser是用户名,testPass则是密码了

Change the password (the DBA manager or the user can use the Alter statement)

语句:Alter user TestUser identified by newtestPass;

          只需要把Create 换成Alter,那个用户名,后面跟新的密码

If the user is created and cannot log in, the plsql application will report an error, and here is an important point The next step is to assign permissions

ORACLE user rights management

The above picture means: the test user does not need to grant connection permissions (Create Session keyword) and grant permissions (Grant)

语句:Grant Create Session to test;

Beginners only need to have the following permissions:

Permissions Meaning
Create table Give permission to create a table
Create view Give permission to create a view
Create procedure Give permission to create a procedure
Create sequence Give permission to create a sequence

There is also an object permission: (that is, the permissions you have can be assigned to the specified users to use which permissions


  1. •Different objects Have different object permissions
  2. •The owner of the object has all permissions
  3. •The owner of the object can assign permissions to outside

Allocation table oll Query, update, add, etc...Permissions

~~~~~
      语句1:Grant Select、Update on oll to test;

      语句2:Grant Select、Update on oll to test with grant option;

      语句3:Grant Select、Update on oll to public;
      
~~~~~

Statement 1: Only the Select and Update permissions of the oll table are given to the test user.

The keywords are~ ~(with grant option)

The difference between statement 2 and statement 1 is that the keyword with grant option is added, which means that the test user also has the permission to assign the Select and Update of the oll table to others User

Keywords are (public)

Statement 3 Keyword (public) means public. As long as the user uses the Select and Update permissions of the oll table public
That is, all users can use the data of the oll table.

If you can grant permissions to an object, you can revoke the object permissions, keyword (revoke)

If the revoke statement is used, even the permissions assigned by using the with grant option clause will be revoked
This means that the permissions equivalent to the oll table are assigned to test, and the test user has assigned permissions to other users, and The revoke statement
revokes the permissions of the test user, which is equivalent to revoking the permissions assigned to test to other people.

语句:Revoke Select、Update on oll from  test;

User lock and unlock and password invalidation

  命令行:ALTER test USER ACCOUNT LOCK/UNLOCK;
  
          Lock是锁上的意思UnLock是没有锁的

Delete user (drop)

语句:drop user test ;

Related course recommendations:

SQL video tutorial
MySQL video tutorial

oracle basic video tutorial

The above is the detailed content of ORACLE user rights management. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:CSDN. If there is any infringement, please contact admin@php.cn delete
SQL: A Beginner-Friendly Approach to Data Management?SQL: A Beginner-Friendly Approach to Data Management?Apr 19, 2025 am 12:12 AM

SQL is suitable for beginners because it is simple in syntax, powerful in function, and widely used in database systems. 1.SQL is used to manage relational databases and organize data through tables. 2. Basic operations include creating, inserting, querying, updating and deleting data. 3. Advanced usage such as JOIN, subquery and window functions enhance data analysis capabilities. 4. Common errors include syntax, logic and performance issues, which can be solved through inspection and optimization. 5. Performance optimization suggestions include using indexes, avoiding SELECT*, using EXPLAIN to analyze queries, normalizing databases, and improving code readability.

SQL in Action: Real-World Examples and Use CasesSQL in Action: Real-World Examples and Use CasesApr 18, 2025 am 12:13 AM

In practical applications, SQL is mainly used for data query and analysis, data integration and reporting, data cleaning and preprocessing, advanced usage and optimization, as well as handling complex queries and avoiding common errors. 1) Data query and analysis can be used to find the most sales product; 2) Data integration and reporting generate customer purchase reports through JOIN operations; 3) Data cleaning and preprocessing can delete abnormal age records; 4) Advanced usage and optimization include using window functions and creating indexes; 5) CTE and JOIN can be used to handle complex queries to avoid common errors such as SQL injection.

SQL and MySQL: Understanding the Core DifferencesSQL and MySQL: Understanding the Core DifferencesApr 17, 2025 am 12:03 AM

SQL is a standard language for managing relational databases, while MySQL is a specific database management system. SQL provides a unified syntax and is suitable for a variety of databases; MySQL is lightweight and open source, with stable performance but has bottlenecks in big data processing.

SQL: The Learning Curve for BeginnersSQL: The Learning Curve for BeginnersApr 16, 2025 am 12:11 AM

The SQL learning curve is steep, but it can be mastered through practice and understanding the core concepts. 1. Basic operations include SELECT, INSERT, UPDATE, DELETE. 2. Query execution is divided into three steps: analysis, optimization and execution. 3. Basic usage is such as querying employee information, and advanced usage is such as using JOIN connection table. 4. Common errors include not using alias and SQL injection, and parameterized query is required to prevent it. 5. Performance optimization is achieved by selecting necessary columns and maintaining code readability.

SQL: The Commands, MySQL: The EngineSQL: The Commands, MySQL: The EngineApr 15, 2025 am 12:04 AM

SQL commands are divided into five categories in MySQL: DQL, DDL, DML, DCL and TCL, and are used to define, operate and control database data. MySQL processes SQL commands through lexical analysis, syntax analysis, optimization and execution, and uses index and query optimizers to improve performance. Examples of usage include SELECT for data queries and JOIN for multi-table operations. Common errors include syntax, logic, and performance issues, and optimization strategies include using indexes, optimizing queries, and choosing the right storage engine.

SQL for Data Analysis: Advanced Techniques for Business IntelligenceSQL for Data Analysis: Advanced Techniques for Business IntelligenceApr 14, 2025 am 12:02 AM

Advanced query skills in SQL include subqueries, window functions, CTEs and complex JOINs, which can handle complex data analysis requirements. 1) Subquery is used to find the employees with the highest salary in each department. 2) Window functions and CTE are used to analyze employee salary growth trends. 3) Performance optimization strategies include index optimization, query rewriting and using partition tables.

MySQL: A Specific Implementation of SQLMySQL: A Specific Implementation of SQLApr 13, 2025 am 12:02 AM

MySQL is an open source relational database management system that provides standard SQL functions and extensions. 1) MySQL supports standard SQL operations such as CREATE, INSERT, UPDATE, DELETE, and extends the LIMIT clause. 2) It uses storage engines such as InnoDB and MyISAM, which are suitable for different scenarios. 3) Users can efficiently use MySQL through advanced functions such as creating tables, inserting data, and using stored procedures.

SQL: Making Data Management Accessible to AllSQL: Making Data Management Accessible to AllApr 12, 2025 am 12:14 AM

SQLmakesdatamanagementaccessibletoallbyprovidingasimpleyetpowerfultoolsetforqueryingandmanagingdatabases.1)Itworkswithrelationaldatabases,allowinguserstospecifywhattheywanttodowiththedata.2)SQL'sstrengthliesinfiltering,sorting,andjoiningdataacrosstab

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.