oRACLE 10g 資料庫備份摘要

2021-09-30 05:30:16 字數 1600 閱讀 3436

1. 啟用archivelog

sql> shutdown immediate;

sql> startup mount;

sql> alter system set log_archive_dest_1='location=d:/arc' scope=both;

sql> alter database archivelog;

sql> alter database open;

2. 備份控制檔案

2.1 在trace檔案中生成controlfile的建立指令碼

sql> alter database backup controlfile to trace;

2.2 生成controlfile的二進位制副本

sql> alter database backup controlfile to 'c:/backups/controfile_back.ora';

3. 啟用flash recovery area

sql> startup

sql> alter system set db_recovery_file_dest_size=2g scope=both;

sql> alter system set db_recovery_file_dest='d:/flash' scope=both;

sql> alter system set log_archive_dest_10=use_recovery_file_dest scope=both;

4. 使用rman備份

#登入並顯示所有配置資訊

c:/> rman target /

rman> show all;                   

#設定預設備份裝置為磁碟(另有磁帶 to sbt)

rman> configure default device type to disk;

#設定磁碟備份位置(備份型別是備份集,則必須指定備份集檔名)

rman> configure channel device type disk format 'd:/back/orcl_%....bak';

#設定並行度為2,磁碟備份型別為備份集(另有to copy/compressed backupset)

rman> configure device type disk parallelism 1 backup type to backupset;  

#執行0級、1級增量備份

rman> backup incremental level 0 as backupset database;

rman> backup incremental level 1 as backupset database;

5. rman檔案format變數定義

%c   多重備份時的副本號

%d   資料庫名稱

%d   當前日期值(一月內)

%m   當前月份值

%p   備份集的塊號

%s   備份集序號

%t   備份時間戳  %s與%t組成可唯一識別

%t   年月日

%u   8個字元表示的備份時時間和備份集號

%u   等於 %u_%p_%c

%y   年份

Oracle 10g資料庫管理

oracle 10g資料庫管理 課程介紹 本課程面向企業 oracle 10g 資料庫管理的學員。通過 oracle 10g 資料庫管理課程的系統培訓,使學員能夠在較短的時間內掌握 oralcle10g 資料庫管理和維護的各種技術,從而掌握最新版 oracle 的新特性和 oracle 資料通用技術...

oracle 10g 資料庫遷移

它是最常用最簡單的方法,一般是基於應用的owner級做匯出匯入。操作方法為 在新庫建立好owner和表空間,停老庫的應用,在老庫執行 exp user pwd owner file exp dmp log exp log buffer 6000000,匯入dmp檔案到新庫,在新庫執行如下命令 imp...

Oracle 10g資料庫概述

一 oracle 10g簡介 1 oracle 10g資料庫是首個為網咯計算而設計的資料庫 甲骨文公司的一款關聯式資料庫管理系統 2 分為以下幾個版本 a oracle 10g資料庫標準版 1 b oracle 10g資料庫標準版 c oracle 10g資料庫企業版 d oracle 10g資料庫...