1. Oracle download
1.1 Oracle download
The download address is as follows
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html
If you do not have an Oracle account, you can register one
1.2 Unzip after downloading and click setup
Follow the prompts to go down step by step. Note that the waiting time may be longer, just wait patiently
2. Some commands of Oracle
2.1 Use of sqlplus
sqlplus sys/sys as sysdba
sqlplus scott/[email protected]/orcl common user login
sqlplus scott/tiger@oracle_0913 service name
sqlplus scott/tiger
For example, you can log in from the above ways
2.2 Create a new user
1.create user username identified by password;
for example: create user c##admin identified by 123456;
2. Unlock the user alter user username account unlock;
for example: alter user c##admin account unlock;
3. Grant new user creation permission: grant create session to username;
for example: grant create session to c##admin;
4. Grant new user database administrator privileges: grant dba to username;
for example: grant dba to c##admin;
5. Grant other privileges to users:
GRANT CREATE USER,DROP USER,ALTER USER ,
CREATE ANY VIEW , DROP ANY VIEW,
EXP_FULL_DATABASE,IMP_FULL_DATABASE,
DBA,CONNECT,RESOURCE,CREATE SESSION TO 用户名;
2.3 View current system users
show user;
select user from dual;
2.4 Query all users
Query the user name, user number, and creation date of all users (ALL_USERS) in the database
SELECT * FROM ALL_USERS;
the default is 36 users
2.5 User switching
conn username/password
2.6 Table related operations
select *from tab;
Query all tables under the current user
create table table_name(
id numner(12),
text verchar2(255 CHAR) not null
);
create table statement
3. Connect to the installation of the Oracle database client
Common clients include Navicat, PLSQL, PLSQL is introduced below;
3.1 Installation of PLSQL
https://www.allroundautomations.com/registered-plsqldev/
can be downloaded from the official website (generally you need to crack it to find the cracked version)
3.2 PLSQL application
Entering the loading page for the first time is as follows, and the main interface for entering the password is as follows On
the left side, you can see the Oracle user
You can view various objects in the Object below; for example, you can see all tables under the changed user from tables