Oracle database backup and recovery

Physical backup physical file system operating on the database (e.g., data file control file and log files) backup

  Logical database backup is a backup of logical components (e.g., during storage and table view database object, etc.) of

  Fault type

  Database operation aborted failure include four types:

   Fault type

    1. Statement failure

    2. User process failure

    3. Examples of failure

    4. media failure

  Logical fault occurs during the execution of the sql statement statements can lead to failure. If the user-written SQL is not valid, logical fault occurs.

  User process failure occurs when a user program error and can not access the data. Causes the user process failure is disconnected or abnormal abnormal termination process.

  When the oracle database instance due to a hardware or software problem can not continue to run, instance failure occurs

  When the database can not read or write to a database file correctly, media failure occurs.

  database backup

  Providing two backup data in the database methods: physical backup and logical backup.

  Logical backup: backup trigger mode object table view. .

  Physical backup

    Cold Backup: stop backup copies of physical files

    Hot Backup: Backup databases under normal operating conditions, the database needs to run in archive mode.

  Export and import utilities

  Export and import database objects are four modes:

    1. The full database (export and import all the objects in the entire database)

    Table 2. (export and import of one or more partitions designated table or tables)

    3. User (export and import all the objects in a user mode)

    4. tablespace (export and import all of the one or more objects in the specified table space)

  Export utility has the following parameters commonly used commands:

  

  

  Run in a DOS window

  Export data according to user mode

  exp scott/tiger@orcl file=scott_back.dmp owner=scott;

  Export data in Table way

  exp scott/tiger@orcl tables=(emp,dept) file=scott_back_tab.dmp

  Export data in the table space way

  exp system/manager@orcl tablespace=(users)

  file=tbs_users.dmp

  使用参数文件导出数据

  exp system/manager parfile='c:\parameters.txt'

  

  导入实用程序有如下常用命令参数:

  

  

  将整个文件导入数据库

  imp system/manager@orcl file=item_back.dmp ignore=y full=y

  将scott用户的表导入到martin用户

  imp system/manager@orcl file=scott_back.dmp fromuser=scott touser=martin tables=(emp,dept)

  使用参数文件导入数据

  imp system/manager parfile='c:\parameters.txt' 

 

Guess you like

Origin www.cnblogs.com/268lwc/p/11506392.html