Logical backup and recovery of database (table) - export table

Manage initialization parameters
The initialization parameters are used to set the characteristics of the instance or database. Oracle9i provides more than 200 initialization parameters, and each initialization parameter has a default value.

Display initialization parameters 1) How to modify the parameters
of the show parameter command needs to be explained. If you want to modify these initialization parameters, you can go to the file D:\oracle\admin\orcl\pfile\init.ora


 

Logical backup and recovery of databases (tables) - introduction to exporting tables
Logical backup refers to the process of using the tool export to export the structure and data of data objects to files, and logical recovery refers to using the tool import when the database objects are damaged by misoperation The process of importing data objects into a database using a backed-up file. Physical backup can be performed in the open state of the database or after the database is closed, but logical backup and recovery can only be performed in the open

state . . The export is done using the exp command. The commonly used options of this command are: userid: used to specify the user name, password, and connection string to perform the export operation tables: used to specify the table to perform the export operation owner: used to specify the export operation to be performed The scheme full=y: used to specify the database to perform the export operation inctype: used to specify the incremental type to perform the export operation rows: used to specify whether to export the data in the table when the export operation is performed file: used to specify the export file name export Tables (to be entered in command prompt) 1) Export your own table exp userid=scott/tiger@orcl tables=(emp) file=e:\e1.dmp for example















E:\app\asus\product\11.2.0\dbhome_1\BIN>exp userid=scott/tiger@orcl tables=(emp) file=e:\e1.dmpIf

you want to export multiple tables
exp userid=scott/tiger @orcl tables=(emp,dept...) file=e:e2.dmp

E:\app\asus\product\11.2.0\dbhome_1\BIN>exp userid=scott/tiger@orcl tables=(emp,
dept ) file=e:\e1.txt

Export: Release 11.2.0.1.0 - Production on Sun Jan 24 23:05:26 2016

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.


Links To: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With
the Partitioning, OLAP, Data Mining and Real Application Testing options
Exported ZHS16GBK character set and AL16UTF16 NCHAR character set

About to export the specified table via regular path.. .
. . exporting table EMP exported 14 rows
.. exporting table DEPT exported 4 rows
successfully terminated export without warning.


2) Export tables of other schemes
If users want to export tables of other schemes, they need the authority of dba or the authority of exp_full_database

For example, system can export scott's table
exp userid=system/Mayu2638@oral tables=(scott.emp) file=e:\e2.dmp

Special attention:

when importing and exporting, go to the bin directory of the oracle directory.

 

Export table
3) Structure of export table
exp userid=scott/tiger@orcl tables=(emp) file=e:\e4.dmp rows=n

Example:
E:\app\asus\product\11.2.0\dbhome_1\BIN >exp userid=scott/tiger@orcl tables=(emp,
dept) file=e:\e3.dmp rows=n

Export: Release 11.2.0.1.0 - Production on Sun Jan 24 23:23:07 2016

Copyright ( c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.


Connection to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With
the Partitioning, OLAP, Data Mining and Real Application Testing options
exported ZHS16GBK character set and AL16UTF16 NCHAR character
set Note : Table data (rows) will not

be exported The specified table will be exported via regular path...
. . Exporting table EMP
. . Exporting table DEPT
The export was terminated successfully without warning.



4) Use the direct export method (specially dealing with tables with large amounts of data)
exp userid=scott/tiger@orcl tables=(emp) file=e:\e5.dmp direct=y

Example:
E:\app\asus\product\ 11.2.0\dbhome_1\BIN>exp userid=scott/tiger@orcl tables=(emp,
dept) file=e:\e4.dmp direct=y

Export: Release 11.2.0.1.0 - Production on Sun Jan 24 23 :26:04 2016

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.


Connection to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With
the Partitioning, OLAP, Data Mining and Real Application Testing
optionsExported ZHS16GBK charset and AL16UTF16 NCHAR charset

About to export the specified table via direct path...
. . Exporting table EMP exported 14 rows
.. exporting table DEPT exported 4 rows
successfully terminated export without warning.



This method is faster than the default conventional method. When the amount of data is large, you can consider using this method.
At this time, the character set of the database needs to be exactly the same as the character set of the client, otherwise an error will be reported...

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327028563&siteId=291194637