WEB开发网
开发学院数据库Oracle Oracle数据库管理员职责(四) 阅读

Oracle数据库管理员职责(四)

 2008-09-20 12:55:16 来源:WEB开发网   
核心提示: 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.

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 become fragmented. If so,

this tablespace is a candidate for reorganizing.

12/15/98 

   SELECTsegment_name,segment_type
  ,count(*)asnr_exts
  ,sum(DECODE(dx.bytes,dt.next_extent,0,1))asnr_illsized_exts
  ,dt.tablespace_name,dt.next_extentasdflt_ext_size
  FROMdba_tablespacesdt,dba_extentsdx
  WHEREdt.tablespace_name=dx.tablespace_name
  ANDdx.owner='&OWNER'
  GROUPBYsegment_name,segment_type,dt.tablespace_name,dt.next_extent;

3. No_pk.sql

no_pk.sql

To find tables without PK constraint

11/2/98  

   SELECTtable_name
  FROMall_tables
  WHEREwner='&OWNER'
  MINUS
  SELECTtable_name
  FROMall_constraints
  WHEREwner='&&OWNER'
  ANDconstraint_type='P';

4. disPK.sql

disPK.sql

To find out which primary keys are disabled

11/30/98 

   SELECTowner,constraint_name,table_name,status
  FROMall_constraints
  WHEREwner='&OWNER'ANDstatus='DISABLED’ANDconstraint_type='P';

Tags:Oracle 数据库 管理员

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接