Oracle数据库管理员职责(四)
2008-09-20 12:55:16 来源:WEB开发网5. 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.
11/2/98
SELECTindex_name,table_name,uniqueness
FROMall_indexes
WHEREindex_namelike'&PKNAME%'
ANDwner='&OWNER'ANDuniqueness='NONUNIQUE'
SELECTc.constraint_name,i.tablespace_name,i.uniqueness
FROMall_constraintsc,all_indexesi
WHEREc.owner=UPPER('&OWNER')ANDi.uniqueness='NONUNIQUE'
ANDc.constraint_type='P'ANDi.index_name=c.constraint_name
6. mkrebuild_idx.sql
mkrebuild_idx.sql
Rebuild indexes to have correct storage parameters
11/2/98
SELECT'alterindex'||index_name||'rebuild'
,'tablespaceINDEXESstorage'
||'(initial256Knext256Kpctincrease0);'
FROMall_indexes
WHERE(tablespace_name!='INDEXES'
ORnext_extent!=(256*1024)
)
ANDwner='&OWNER'
/
7. datatype.sql
datatype.sql
To check datatype consistency between two environments
11/30/98
SELECTtable_name,column_name,data_type,data_length,data_precision,data_scale,nullable
FROMall_tab_columns--firstenvironment
WHEREwner='&OWNER'
MINUS
SELECTtable_name,column_name,data_type,data_length,data_precision,data_scale,nullable
FROMall_tab_columns@&my_db_link--secondenvironment
WHEREwner='&OWNER2'
orderbytable_name,column_name
8. obj_coord.sql
obj_coord.sql
To find out any difference in objects between two instances
12/08/98
SELECTobject_name,object_type
FROMuser_objects
MINUS
SELECTobject_name,object_type
FROMuser_objects@&my_db_link
- ››oracle 中 UPDATE nowait 的使用方法
- ››Oracle ORA-12560解决方法
- ››Oracle 10g RAC 常用维护命令
- ››Oracle如何在ASM中定位文件的分布
- ››Oracle的DBMS_RANDOM.STRING 的用法
- ››oracle 外部表导入时间日期类型数据,多字段导入
- ››Oracle中查找重复记录
- ››oracle修改用户登录密码
- ››Oracle创建删除用户、角色、表空间、导入导出等命...
- ››Oracle中登陆时报ORA-28000: the account is lock...
- ››Oracle数据库在配置文件中更改最大连接数
- ››Oracle中在pl/sql developer修改表的两种方式
更多精彩
赞助商链接