table of Contents
1.Oracle backup data migration (cmd mode)
-
Export data from Oracle to a local computer
C: \ the Users \ Bobo> exp Scott / Tiger @ = ORCL Tables EMP, Dept rows = Y = File D: \ the emp_dept. Dmp log = D: \ emp_dept.log
-rows row, y Representative Yes
- format data to dmp
-
Import data from local computer to Oracle
emp_dept.dmp source data file into a user scott
C: \ the Users \ Bobo> IMP Scott / Tiger TOUSER Scott @ ORCL FROMUSER = = = D Scott File: \ the emp_dept. DMP rows = log Y = D: \ imp_emp_dept.log
-fromuser which is derived from the user
-touser is introduced into the under which users
will be able to see the imported data in a table of tables Oracle client folder
-
.Sql import data from the local computer to Oracle
Use the keyword @ + file Address
2.Oracle user authorization
Preparation:
Open cmd window, enter sqlplus scott / tiger @ orcl connect to the Oracle database
or
in PLSQL Developer client, open sql composition window, enter the following command can be authorized.
-
Authorization / revoke authorized user DBA role
Authorization: grant dba to scott;
revoked: revoke dba from scott; -
Authorization table space
to create the table space: grant create tablespace to scott;
modify the table space: grant alter tablespace to scott;
delete the table space: grant drop tablespace to scott;Once this is done, you can view the licensing information on the client, the client can also directly edit add permissions.
-
Authorized users
create a user: grant create user to scott;
modify user: grant alter user to scott;
delete a user: grant drop user to scott;
3. Create a table space and user
There is generally the first database, and then creates N table space, and then create a user, the user can specify the table space, this table space to store N tables.
-
创建表空间
create tablespace test
datafile ‘D:\oracle\product\10.2.0\oradata\orcl\test.dbf’
size 10m [autoextend on] [next 1M] [maxsize 2G];-Datafile route database transactions to be present
-.dbf (database file) database file
-size initial table space, K or M units of
whether -autoextend automatically extended, is on or OFF
-next file after full expansion size
-maxsize maximum file size, value or values Unlimited (not represented size) -
Delete table space
drop tablespace table space name;Delete empty table space, including the creation of a database file
drop tablespace test including contents and datafiles; -
创建用户
create user test01 identified by test01
default tablespace test
temporary tablespace temp;-Identified by: creating a user name password password
- the default table space with the Test
- temporary space with temp -
Test01 authorized users to connect to the database
After creating a user in the Users folder could see test01 user, but the user wants to log test01 showed no permission to connect to the database.
Test01 authorized user is required in the database connection system user.
By session log in again, the user will be able to successfully log on test01.
test01 user specifies a test table space, create a table stored in the test table space.