# Index of Oracle Database 访问索引列的数据一般需要 3 次 IO,Root-Branch-Leaf。 访问索引列外的数据需要 4 次 IO,Root-Branch-Leaf - 回表 (TABLE ACCESS BY INDEX ROWID)。 索引对 DML 操作的影响,INSERT > DELETE > UPDATE 创建索引会引发排序及全表索,排序会非常消耗 CPU 性能,全表锁会阻止 DML 操作 索引的三大特点 索引树的高度一般比较低。 索引由索引列存储的值及 ROWID...

# Schedule Jobs of Oracle Database # Jobs for Oracle 10g Create a job. DBMS_JOB: -- runbegin dbms_job.run(9); /* job id */end;/-- disablebegin dbms_job.broken(9,true);end;/-- enablebegin dbms_job.broken(9,false);end;/-- removebegin dbms_job.remove(9);end;/# Schedule Jobs for Oracle 11g --...

# User Privilege of Oracle Database -- 查询系统权限,角色select grantee,privilege as privs_or_roles,admin_option from dba_sys_privs where grantee='JOVE'union allselect grantee,granted_role,admin_option from dba_role_privs where grantee='JOVE';-- 查询对象权限select * from dba_tab_privs where...

# Table of Oracle Database DBA_TABLES >= ALL_TABLES >= USER_TABLES DBA_TABLES:DBA 拥有的或者可以访问的所有关系表 ALL_TABLES:某一用户所拥有的或者可以访问的所有关系表 USER_TABLES:某一用户所拥有的所有关系表 查看表属于哪个用户 select owner from dba_tables where table_name=upper('table_name');# Alter Table alter table table01 modify...

# RMAN Backup on Linux Create a backup directory. mkdir -p /rmanbackup/rmanlogmkdir -p /rmanbackup/dbbakmkdir -p /rmanbackup/scriptsmkdir -p /rmanbackup/weekmkdir -p /rmanbackup/daychown -R oracle:oinstall /rmanbackupchmod -R 755 /rmanbackup Create a full backup script:...

# RMAN Restore on Linux # Restore Spfile ~]$ rman target / nocatalogRMAN> startup nomountRMAN> restore spfile from '/backup/spfile_01uuf10m_1_1.bak';RMAN> shutdown abort# Restore Controlfile (Option) Modify the controlfile path: SQL> startup nomountSQL> alter system set...

# RMAN Backup on Windows Full backup REM 需要修改的变量值开始set ORACLE_SID=xpxyyset BACKUP_PATH=E:\RMANset SYS_PASSWD=oracleREM 修改变量结束REM 在服务器上保留 3 个备份的脚本if exist %BACKUP_PATH%\*.BAK003 del /F /Q %BACKUP_PATH%\*.BAK003if exist %BACKUP_PATH%\*.BAK002 rename %BACKUP_PATH%\*.BAK002...

# RMAN Database Duplication Creating a Password File for the Auxiliary Instance, When you create a standby database by using RMAN duplication, password files are always copied. Add Net Services for primary and standby databases in the tnsnames.ora file. Adding Static Service to Listener in the...

# Using RMAN to Delete Oracle Database Archive Logs Login as oracle, create the script del_arch.sh as below: ~]$ cat > /home/oracle/scripts/del_arch.sh << "END"#!/bin/env bashif [[ -z $1 ]]; then exit 1fi. ~/.bash_profileORACLE_SID=$1$ORACLE_HOME/bin/rman...