Oracle Automatic Storage Management (ASM)
Oracle Automatic Storage Management (ASM) Oracle ASM Mirroring and Disk Group Redundancy Disk Group Type Supported Mirroring Levels Default Mirroring Level EXTERNAL redundancy Unprotected (none) Unprotected NORMAL redundancy Two-way, three-way, unprotected (none) Two-way HIGH redundancy Three-way Three-way FLEX redundancy (12c) Two-way, three-way, unprotected (none) Two-way (newly-created) EXTENDED redundancy (12c) Two-way, three-way, unprotected (none) Two-way Setting Di...
Automatic Optimizer Statistics Collection
Automatic Optimizer Statistics Collection Oracle Database - Enterprise Edition - version 11.2.0.4.0 在 Oracle 10g 之前并没有自动收集统计信息的机制,从 Oracle 10g 开始引入了自动收集统计信息的功能,这个功能在 Oracle 10g 中被称为自动统计信息收集(Automatic Statistics Gathering) 在 Oracle 11g 中被称为自动优化器统计信息收集(Automatic Optimizer Statistics Collection)。自动统计信息收集作业能够每天收集普通对象和数据字典的统计信息,但不会收集 X$ 系列表的内部对象统计信息。 Oracle 的初始化参数 STATISTICS_LEVEL 控制收集统计信息的级别,有三个参数值: 1、 BASIC:收集基本的统计信息 2、 TYPICAL:收集大部分统计信息(数据库的默认设置) 3、 ALL:收集全部统计信息 当使用 Oracle 自动...
Changing the Oracle Database User Password Expiration
Changing the Oracle Database User Password Expiration Oracle Database - 11.2.0.4.0 Show the user's profile. SELECT username, profile FROM dba_users WHERE username='EXFSYS'; Show the profile's password policy. SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name LIKE 'PASSWORD%'; Change the password life time from the default 180 days to unlimited. ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED; Reset user password. ALTER USER exfsys IDENTIFIED BY abc12...
Index of Oracle Database
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 操作]{.red} 索引的三大特点 索引树的高度一般比较低。 索引由索引列存储的值及 ROWID 组成。 索引本身是有序的。 分区表索引 分为全局索引和分区索引。 分区索引,要有使用分区字段条件的场景,否则建议使用全局索引。 count (*) 优化 --NULL和NOT NULL不等价,排除NULL值,执行计划由TABLE ACCESS FULL变为INDEX FAST FULL SCANselect count(*) from t where id is not null;--或将列设置NOT NULL,执行计划为INDEX FA...
Table of Oracle Database
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 column01 varchar2(20);
Schedule Jobs of Oracle Database
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 -- CreateBEGIN DBMS_SCHEDULER.CREATE_JOB ( job_name => 'JOB_INSERT_TBL01', job_type => 'PLSQL_BLOCK', job_action => 'BEGIN p_random_tbl01; END;', st...
User Privilege of Oracle Database
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 grantee='JOVE';-- 查询角色 / 角色权限select * from dba_roles;select * from role_sys_privs where role='DBA';select * from role_tab_privs where role='DBA';-- 数据库提供的系统权限 / 对象权限select name from sys.system_privilege_map;select * from ...
db_install_11g.rsp
db_install_11g.rsp ###################################################################### Copyright(c) Oracle Corporation 1998,2013. All rights reserved.#### #### Specify values for the variables listed below to customize #### your installation. #### #### Each variable is associated with a comment. The comment ###...
Deinstall Oracle RAC Database
Deinstall Oracle Database 11g and latest SI Delete oracle instance. dbca -silent -deleteDatabase \ -sourceDB orcl \ -sysDBAUserName sys \ -sysDBAPassword oracle 11g and latest RAC Remove ORACLEHOME∗∗and∗∗ORACLE_HOME** and **ORACLEHOME∗∗and∗∗GRID_HOME. rm -rf /u01/app/grid/*rm -rf /u01/app/11.2.0/grid/*rm -rf /u01/app/oraInventory/*rm -rf /u01/app/oracle/* Remove oracle files. rm -rf /tmp/.oraclerm -rf /var/tmp/.oraclerm -f /etc/init/oracle-ohasd.confrm -f /etc/init.d/ohasdrm -f /...
Installing Oracle Database 10.2.0.5 on CentOS 7.9
Installing Oracle Database 10.2.0.5 on CentOS 7.9 Operating System: CentOS 7.9 Database Software: 10201_database_linux_x86_64.cpio Database Patches: p8202632_10205_Linux-x86-64.zip Operating System Package Requirements Checking Package Requirements. rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' \make gcc glibc glibc-devel compat-db compat-gcc compat-gcc-c++ \compat-libstdc++ compat-libstdc++-devel gnome-libs openmotif21 setarch \libaio libaio-devel Installing Packages. yum -y i...














