Oracle Database creation user and Database Backup Summary (required), oracle Database Backup
In the process of using Oracle to develop the system, the establishment of a database user is involved, and permissions are assigned to the user. At the beginning of development, these operations were very confusing. Afterwards, I have gained some understanding in this aspect. I would like to sum up some points. I want to consolidate myself, and I also hope to receive your corrections. Then I want to help the confused shoes, realize the small value of life.
Create a user and authorization code:
-- Create the user create user myName -- Create user identified by myPwd -- set password default tablespace USERS -- DEFAULT tablespace USERS temporary tablespace TEMP -- default temporary tablespace TEMP profile DEFAULT; -- Grant/Revoke role privileges grant/Revoke role permissions grant ctxapp to myName; -- the statement does not clarify the meaning, but this statement does not exist. During running, the statement seems to report the error Grant exp_full_database to myName; -- grant the user the exp_full_database permission to export the grant imp_full_database to myName in full database mode; -- Grant the imp_full_database permission to the user to perform full-Database Import -- grant/Revoke system privileges -- Grant/Revoke the system permission to the user to change notification to myName; grant create any directory to myName; -- create any folder grant create any table to myName; -- create any table grant drop any directory to myName; -- delete any folder grant execute any procedure to myName; -- execute any stored procedure grant unlimited tablespace to myName; -- unlimited tablespace quota -- directly transfer all permissions of some roles to the user grant ctxapp to myName; -- I am not clear what I mean, but there is no such sentence. At runtime, the statement seems to report the error grant connect to myName; -- grant the permission of the connect role to the myName user grant dba to myName; -- grant the permissions of the dba role to the myName user grant resource to myName; -- grant the permissions of the resource role to the myName user
As shown in the code above, the Code for creating a user consists of four small pieces,
Step 1Create a user and use the default tablespace and temporary tablespace (the two terminologies have been reviewed on the Internet. I am still confused. I hope someone can help me solve the problem ),
Step 2AndStep 3Grant specific permissions to the user. For details about the permissions, refer to the notes.
Step 4The permissions of the three roles are transferred to the user.
DBA: it has all the privileges and is the highest system permission. only DBA can create a database structure.
RESOURCE: users with Resource permissions can only create entities, but cannot create database structures (this concept is confusing ).
CONNECT: users with the Connect permission can only log on to Oracle, and cannot create entities (entities should be databases, data tables, fields, triggers, stored procedures, etc.). You cannot create database structures.
For normal users: grant connect and resource permissions.
For DBA management users: grant the connect, resource, and dba permissions.
Note: I am also vague about the concept of database structure and entity. I only guess about the concept of database structure and entity. I have not found any detailed concepts on the Internet. I hope experts can solve this problem ....
You can use the following SQL statement to query the permissions of each role:
select grantee,privilege from dba_sys_privs where grantee='RESOURCE' order by privilege;select grantee,privilege from dba_sys_privs where grantee='CONNECT' order by privilege;select grantee,privilege from dba_sys_privs where grantee='DBA' order by privilege;
Query the permissions of the RESOURCE role.
The summary of creating user knowledge points is here, and there are still some shortcomings. I hope you can correct them.
In the cmd command framework, export and import database statements.
Export Statement and instance exp username/password @ Server IP/ORCL file = e: \ 0202daochu. dmp owner = (username) exp myName/myPwd@127.0.0.1/ORCL file = e: \ 0202daochu. dmp owner = (myName) Import Statement and instance imp username/password @ Server IP/ORCL ignore = y full = y file = e: \ 0202daochu. dmp log = e: \ log0202.logimp myName2/myPwd2@127.0.0.1/ORCL ignore = y full = y file = e: \ 0202daochu. dmp log = e: \ log0202.log
The preceding statement exports the database with the username myName and generates the file 0202 daochu on the edisk,
Import the database content to the myName2 user using the Import Statement and generate a log file.
The above Oracle database creation user and Database Backup Summary (which must be read) is all the content shared by the editor. I hope to give you a reference and support for the customer's house.
General operation process: ctrl + r, cut out the running program, Enter cmd, and enter the preceding statements on the console, such as exporting the myName Database