知识大全 Oracle数据库管理员职责(四)
Posted 职责
篇首语:休言女子非英物,夜夜龙泉壁上鸣。本文由小常识网(cha138.com)小编为大家整理,主要介绍了知识大全 Oracle数据库管理员职责(四)相关的知识,希望对你有一定的参考价值。
Oracle数据库管理员职责(四) 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!
analyze_p sql
analyze_p sqlBEGIN SYS DBMS_UTILITY ANALYZE_SCHEMA ( &OWNER PUTE ); END; /
pop_vol sql
pop_vol sqlinsert into utl_vol_facts select table_name NVL ( num_rows ) as num_rows trunc ( last_analyzed ) as meas_dt from all_tables
or just user_tableswhere owner in ( &OWNER )
or a ma separated list of owners/ mit /
C 每周处理程序
nextext sql
nextext sql To find tables that don t match the tablespace default for NEXT extent The implicit rule here is that every table in a given tablespace should use the exact same value for NEXT which should also be the tablespace s default value for NEXT his tells us what the setting for NEXT is for these objects today / /SELECT segment_name segment_type ds next_extent as Actual_Next dt tablespace_name dt next_extent as Default_Next FROM dba_tablespaces dt dba_segments ds WHERE dt tablespace_name = ds tablespace_name AND dt next_extent !=ds next_extent AND ds owner = UPPER ( &OWNER ) ORDER BY tablespace_name segment_type segment_name;
existext sql
existext sql To check existing extents This tells us how many of each object s extents differ in size from the tablespace s default size If this report shows a lot of different sized extents your free space is likely to bee fragmented If so this tablespace is a candidate for reanizing / /SELECT segment_name segment_type count(*) as nr_exts sum ( DECODE ( dx bytes dt next_extent ) ) as nr_illsized_exts dt tablespace_name dt next_extent as dflt_ext_size FROM dba_tablespaces dt dba_extents dx WHERE dt tablespace_name = dx tablespace_name AND dx owner = &OWNER GROUP BY segment_name segment_type dt tablespace_name dt next_extent;
No_pk sql
no_pk sql To find tables without PK constraint / /SELECT table_name FROM all_tables WHERE wner = &OWNER MINUS SELECT table_name FROM all_constraints WHERE wner = &&OWNER AND constraint_type = P ;
disPK sql
disPK sql To find out which primary keys are disabled / /SELECT owner constraint_name table_name status FROM all_constraints WHERE wner = &OWNER AND status = DISABLED AND constraint_type = P ;
nonuPK sql
nonuPK sql To find tables with nonunique PK indexes Requires that PK names follow a naming convention An alternative query follows that does not have this requirement but runs more slowly / /SELECT index_name table_name uniqueness FROM all_indexes WHERE index_name like &PKNAME% AND wner = &OWNER AND uniqueness = NONUNIQUE SELECT nstraint_name i tablespace_name i uniqueness FROM all_constraints c all_indexes i WHERE c owner = UPPER ( &OWNER ) AND i uniqueness = NONUNIQUE AND nstraint_type = P AND i index_name = nstraint_name
mkrebuild_idx sql
mkrebuild_idx sql Rebuild indexes to have correct storage parameters / /SELECT alter index || index_name || rebuild tablespace INDEXES storage || ( initial K next K pctincrease ) ; FROM all_indexes WHERE ( tablespace_name != INDEXES OR next_extent != ( * ) ) AND wner = &OWNER /
datatype sql
datatype sql To check datatype consistency beeen o environments / /SELECT table_name column_name data_type data_length data_precision data_scale nullable FROM all_tab_columns first environment WHERE wner = &OWNER MINUS SELECT table_name column_name data_type data_length data_precision data_scale nullable FROM all_tab_columns@&my_db_link second environment WHERE wner = &OWNER order by table_name column_name
obj_coord sql
obj_coord sql To find out any difference in objects beeen o instances / / cha138/Article/program/Oracle/201311/17515相关参考
Oracle数据库管理员的职责 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 主要介绍了Orac
知识大全 Oracle9i 数据库管理实务讲座(四)-Oracle9i 数据库实体结构
Oracle9i数据库管理实务讲座(四)-Oracle9i数据库实体结构 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们
Oracle9i数据库管理实务讲座(四) 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! Orac
细数开发DBA(数据库管理员)的工作职责 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 开发DB
问怎样才能确保oraclei网络的正常运行? 答一个完整的oraclei的运行网络主要包括以下的四个部分 数据库服务器 管理服务器 Oracle服务器 管理客户机 确保数据库服务器的正
Oracle数据库的空间管理 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 在Oracle数
ORACLE数据库对象与用户管理 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 一ORACLE数
Oracle数据库的管理 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 安全的实现 在多用
知识大全 Oracle 9i 数据库管理实务讲座(一)-如何安装Oracle 9i Enterprise E
Oracle9i数据库管理实务讲座(一)-如何安装Oracle9iEnterpriseE 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发
知识大全 Oracle9i 数据库管理实务讲座(五)-手动建立 Oracle9i 数据库
Oracle9i数据库管理实务讲座(五)-手动建立Oracle9i数据库 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们