Classification of databases
1. Small database access, foxbase load is small, 1000 people, such as message book, within the cost of thousands of dollars
2. Medium database SQL Server, MySQL, Informix Daily visit volume 10000--15000, cost in million
3. Large database Oracle, DB2, Sybase load can handle massive data security is high, itself expensive
What kind of database do you choose to do the project based on:
1. Size of the project
A. How large is the load and how large is the user
B. Cost
C. Security
-------------------------------------------------------------
Oracle Administrator level
OCA [Oracle Junior Certification]
OCP [Oracle Professional certification]
OCM [Oracle Master Certification]
-------------------------------------------------------------
Oracle BASIC commands
One, the connection command
Conn[ect] < user name >/< password >
Disconnect
Disc[onnect]
Change Password
Passw[ord] < user name >
Exit
Exit
Second, the file Operation command
(1) Start and @
Description: Run SQL script
Case: sql>@ d:\a.sql or SQL > Start D:\a.sql
(2) Edit the script for the specified SQL
SQL > Edit D:\a.sql
(3) Spool the Sql*plus screen content into the specified text
SQL > Spool d:\b.sql and enter SQL > spool off
Third, user management commands
Create user
Create user <username> identified <password>
Change Password
Password <username>
Delete User
Drop User <username> Cascade if you want to delete users, you have created a table with a parameter cascade
The user you just created does not have any permissions and needs to be assigned the appropriate permissions
Permissions: System permissions: Refers to user-related permissions on the database
Object permissions: The user's permission to manipulate data objects for other users (Select,insert,update,delete,all,... )
Roles: (including numerous permissions) include (pre-defined roles, custom roles)
Connect to Database ...
DBA Administrator Privileges ...
Resource build a table, build a view ...
......
----------------------------------------------------------------------------
Create User Weihu
Create user Weihu identified by Weihu
Authorization to Huiwu
Grant connect to Weihu Weihu can log in to the database
Grant resource to Weihu Weihu can build tables
Question: Weihu see Scott's EMP table?
Scott:sql > Grant Select on EMP to Weihu
Scott wants to reclaim Weihu's query permissions on the EMP table
SQL > Revoke select on EMP from Weihu
| If you want to pass permissions on object permissions, add with GRANT option
| Scott:sql>grant Select on EMP-Weihu with GRANT option
Permissions----| Weihu:sql>grant Select on Scott.emp to Xiaohong
|
| If this is a system privilege:
System permissions Pass: Add with admin option
When system gives Xiaoming permissions:
System:sql > Grant connect to xiaoming with admin option
Problem? What if Scott took back the Weihu to the EMP table and Xiaoming???
will also be withdrawn.
Iv. using profile to manage user commands
(1) Account lockout
Specify Scott this user can only try to log in at most 3 times, lockout time 2 days
1. Creating profile SQL > Create profile lock_account limit failed_login_attemps 3 Password_lock_time 2
2. Assign profile SQL > alter user <username> profile Lock_account
(2) Unlock the account
SQL > ALTER user <username> account unlock;
(3) Termination password
In order for the user to periodically change the password can be done with the termination command, also need DBA identity to operate
Users are required to change their login password every 10 days with a 2-day grace interval.
1. Creating profile SQL > Create profile myprofile limit password_life_time Password_grace_time 2
2. Assign profile SQL > alter user <username> profile Myprofile
(4) Password history
You cannot use the previous password when you want the user to change the password again
1. Creating profile SQL > Create profile passwd_history limit password_life_time password_grace_time 2 password_reuse_time 1 0
Password_reuse_time//Specify password reusable time, which can be reused after 10 days
2. Assign profile SQL > alter user <username> profile Passwd_history
Delete profile
SQL > Drop Profile <profilename> [Asecade]
This article is from the "11055416" blog, please be sure to keep this source http://11065416.blog.51cto.com/11055416/1749261
First day of Oracle Learning