Oracle database backup data import and export Oracle

                                   Database backup

1: Export of the database:
1.1 The directory to be backed up
1.2 Enter the backup directory
1.3 Enter the exp command
User name: scott Password
E: \> cd backup Directory
E: \ backup> exp Export to the directory E
: Backup Export: Release 10.2.0.3 .0-Production on Wednesday June 29 19:33:20 2016
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Username: scott
Password: Password input
Connect to: Oracle Database 10g Enterprise Edition Release 10.2.0.3. 0-Production
With the Partitioning, OLAP and Data Mining options
Input array extraction buffer size: 4096>

 Export file: EXPDAT.DMP>

 

(2) U (user), or (3) T (table): (2) U>
export authority (yes / no): yes>
export table data (yes / no): yes>
compressed area (yes / no) : yes>
ZHS16GBK character set and AL16UTF16 NCHAR character set have been exported
. Pre-schema process objects and operations
are being exported. External function library name of user SCOTT is being exported
. PUBLIC type synonyms
are being exported. Special type synonyms
are being exported. Object type definition
The object of SCOTT is about to be exported .... The
database link
is being exported
. The sequence number is being exported. The cluster definition is being exported
. The table about to be exported to SCOTT
goes through the normal path ... .. The table is being exported
. Export table CUSTOMER exported 5 rows
... Exporting table DEPT exporting 4 rows
... Exporting table EMP exporting 14 rows
... Exporting table PRODUCT exports 8 rows
.. Exporting table PURCASE exports 13 rows
.. Exporting table SALGRADE exports 5 rows
. Exporting synonyms
. Exporting views
. Exporting stored procedures
. Exporting operators
. Exporting . Export referential integrity constraints
. Exporting triggers
. Exporting index types
. Exporting bitmaps, functional indexes and extensible indexes
. Exporting later table activities
. Exporting materialized views
. Exporting snapshot logs
. Exporting jobs Queue
. Refresh groups and subgroups
are being exported
. Dimensions are being exported. Post-schema process objects and operations
are being exported. Statistics are being exported The export was
successfully terminated without warning.

2: Import of data
1: Enter the directory where the imported file is located
2: Imp command

In the actual backup, because of the export process, it must be ensured that other users cannot update the data.

In fact, in the process of import and export, the above method is not used a lot

Cold backup of data 2: This kind of backup is a backup that allows the computer to be shut down
. Cold backup of the database is strictly called archive backup, which refers to the database shutdown service, and all transactions are committed.
Backup content:
control file: control the entire Oracle instance information. v $ controlfile data dictionary
Redo log file: Pain v $ logfile data dictionary
Database file: v $ datafile data dictionary
Configuration file pfile: show parameter pfile

Backup file is controlled by the administrator:
1: sys login
2: Find control file:
3 : Find the redo log file:
4: Find all data files:
5: Find the file location of the database
SQL> show parameter pfile;
 
NAME TYPE VALUE
------------------- ----------------- ----------- ---------------------- --------
spfile string D: \ ORACLE \ DATABASE \ SPFILEORCL.ORA

6: Record the path of these files.

7: Shut down the Oracle service.

shutdown immediate

8: Copy all backup files


9: Start the server

startup

Scan the code and follow the public account for more information.  

 

                                                                                   

 

 

Published 24 original articles · praised 36 · 20,000+ views

Guess you like

Origin blog.csdn.net/tanjunchen/article/details/51791090