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
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
- •Different objects Have different object permissions
- •The owner of the object has all permissions
- •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
The above is the detailed content of ORACLE user rights management. For more information, please follow other related articles on the PHP Chinese website!

Best practices to prevent SQL injection include: 1) using parameterized queries, 2) input validation, 3) minimum permission principle, and 4) using ORM framework. Through these methods, the database can be effectively protected from SQL injection and other security threats.

MySQL is popular because of its excellent performance and ease of use and maintenance. 1. Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2. Insert and query data: operate data through INSERTINTO and SELECT statements. 3. Optimize query: Use indexes and EXPLAIN statements to improve performance.

The difference and connection between SQL and MySQL are as follows: 1.SQL is a standard language used to manage relational databases, and MySQL is a database management system based on SQL. 2.SQL provides basic CRUD operations, and MySQL adds stored procedures, triggers and other functions on this basis. 3. SQL syntax standardization, MySQL has been improved in some places, such as LIMIT used to limit the number of returned rows. 4. In the usage example, the query syntax of SQL and MySQL is slightly different, and the JOIN and GROUPBY of MySQL are more intuitive. 5. Common errors include syntax errors and performance issues. MySQL's EXPLAIN command can be used for debugging and optimizing queries.

SQLiseasytolearnforbeginnersduetoitsstraightforwardsyntaxandbasicoperations,butmasteringitinvolvescomplexconcepts.1)StartwithsimplequerieslikeSELECT,INSERT,UPDATE,DELETE.2)PracticeregularlyusingplatformslikeLeetCodeorSQLFiddle.3)Understanddatabasedes

The diversity and power of SQL make it a powerful tool for data processing. 1. The basic usage of SQL includes data query, insertion, update and deletion. 2. Advanced usage covers multi-table joins, subqueries, and window functions. 3. Common errors include syntax, logic and performance issues, which can be debugged by gradually simplifying queries and using EXPLAIN commands. 4. Performance optimization tips include using indexes, avoiding SELECT* and optimizing JOIN operations.

The core role of SQL in data analysis is to extract valuable information from the database through query statements. 1) Basic usage: Use GROUPBY and SUM functions to calculate the total order amount for each customer. 2) Advanced usage: Use CTE and subqueries to find the product with the highest sales per month. 3) Common errors: syntax errors, logic errors and performance problems. 4) Performance optimization: Use indexes, avoid SELECT* and optimize JOIN operations. Through these tips and practices, SQL can help us extract insights from our data and ensure queries are efficient and easy to maintain.

The role of SQL in database management includes data definition, operation, control, backup and recovery, performance optimization, and data integrity and consistency. 1) DDL is used to define and manage database structures; 2) DML is used to operate data; 3) DCL is used to manage access rights; 4) SQL can be used for database backup and recovery; 5) SQL plays a key role in performance optimization; 6) SQL ensures data integrity and consistency.

SQLisessentialforinteractingwithrelationaldatabases,allowinguserstocreate,query,andmanagedata.1)UseSELECTtoextractdata,2)INSERT,UPDATE,DELETEtomanagedata,3)Employjoinsandsubqueriesforadvancedoperations,and4)AvoidcommonpitfallslikeomittingWHEREclauses


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
