oracle6
概要文件管理用戶資源
create profile profile_name limit
select * from dba_profiles where profile='' order by limit;
口令管理
select * from dba_profiles where profile='' and resource_type='password'
口令驗證函數直接執行概要文件
D:\app\Administrator\product\11.1.0\db_1\RDBMS\ADMIN\utlpwdmg.sql
----------------------------------
RMAN備份和恢復數據庫
Recovery Manager
自動尋找數據庫需要恢復的數據文件
優點:支持增量備份;自動管理備份文件夾;自動化備份與恢復;不產生重做信息;恢復目錄;支持映像拷貝;新塊的比較特性;數據文件壓縮處理;備份文件有效性檢查
系統結構:
RMAN可執行程序,RMAN客戶端、服務器進程、信息庫、恢復目錄
快閃恢復區:flash recovery area
OMF自動創建備份文件文件名
show parameter db_recovery
使用RMAN到數據庫連接
rman
connect name/pwd
使用RMAN實現脫機備份
shutdown immediate
startup mount
backup database;
備份控制文件
backup current controlfile format '';
backup current controlfile;
相關概念和配置參數
備份集、通道、映像拷貝
backup as copy database
聯機備份
三個前提:設置快閃恢復區、LOG_ARCHIVE_START 參數設置為TRUE,數據庫處于歸檔模式
backup database/tablespace name/datafile name/current controlfile
實現增量備份
級別0和級別1
backup incremental level 0 database;
backup incremental level 1 database;
腳本
恢復目錄
操作系統文件
RMAN脫機恢復數據庫
startuo nomount;
restore controlfile from autobackup
alter database mount;
restore database;
alter database open;
歸檔模式下:
startup mount
restore database
recover database;
alter database open
RMAN聯機熱備份rman target system/oracle@orcl
sql 'alter tablespace sysauc offline';
restore tabalespace sysaux;
recover tablespace sysaux;
sql 'alter tablespace sysaux online'
--------------------------------------------
SQL優化
獲得執行計劃
utlxplan.sql
desc plan_table
explain plan for select count(*) from scott.emp;
autotrace
set autotrace on
-----------------------------------------
IO優化
減少磁盤讀取次數,平衡數據文件的磁盤分布
v$system_event,v$session_event,v$session_wait
-------------------------
數據泵導入IMPDP
EXP IMP備份和恢復數據庫
邏輯備份、物理備份
脫機備份=冷備份
聯機備份=熱備份
一直備份與不一直備份的區別就是SCN是否一樣
exp help=y
轉載于:https://blog.51cto.com/schenjiannan/1249326
總結
- 上一篇: Flask使用Flask-SQLAlch
- 下一篇: matplotlib 使用简明教程(三)