数据库校验脚本.docx_第1页
数据库校验脚本.docx_第2页
数据库校验脚本.docx_第3页
数据库校验脚本.docx_第4页
数据库校验脚本.docx_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

数据库校验脚本-1.DATABASE LINKselect x.object_name, x.subobject_name, x.object_type, x.status, x.temporary, x.generated, x.secondary from user_objects x where x.object_type=DATABASE LINK order by object_type, object_name, x.subobject_name;-2.TABLESPACEselect tablespace_name,status,contents,logging from dba_tablespacesorder by tablespace_name;-3.PROCEDUREselect x.object_name, x.subobject_name, x.object_type, x.status, x.temporary, x.generated, x.secondary from user_objects x where x.object_type=PROCEDURE order by object_type, object_name, x.subobject_name;-4.Package&PackageBodyselect x.object_name, x.subobject_name, x.object_type, x.status, x.temporary, x.generated, x.secondary from user_objects x where x.object_type in (PACKAGE, PACKAGE BODY) order by object_type, object_name, x.subobject_name;-5. TRIGGERselect x.object_name, x.subobject_name, x.object_type, x.status, x.temporary, x.generated, x.secondary from user_objects x where x.object_type =TRIGGER order by object_type, object_name, x.subobject_name;SELECT OWNER,trigger_name,status FROM dba_triggers WHERE OWNER=BLS;-6.JOBSELECT JOB,LOG_USER,PRIV_USER,SCHEMA_USER,NEXT_DATE,NEXT_SEC,BROKEN FROM DBA_JOBS;-7.TABLEselect x.object_name, x.subobject_name, x.object_type, x.status, x.temporary, x.generated, x.secondary from user_objects x where x.object_type=TABLE order by object_type, object_name, x.subobject_name;select owner,tablespace_name,table_name,num_rows,partitioned from dba_tables where owner=BLSorder by tablespace_name,table_name;select table_name,partition_name,partition_position,tablespace_name,num_rows from dba_tab_partitions where table_owner=BLSorder by table_name,partition_name;select constraint_name,table_name,status from user_constraints where constraint_type=Porder by table_name;-8.INDEXselect x.object_name, x.subobject_name, x.object_type, x.status, x.temporary, x.generated, x.secondary from user_objects x where x.object_type=INDEX order by object_type, object_name, x.subobject_name;select table_name,index_name,index_type ,tablespace_name,status,num_rows,partitioned from dba_indexes where owner=BLS;-9. INDEX PARTITIONselect x.object_name, x.subobject_name, x.object_type, x.status, x.temporary, x.generated, x.secondary from user_objects x where x.object_type=INDEX PARTITION order by object_type, object_name, x.subobject_name;select index_name,partition_name,status,tablespace_name,num_rows from dba_ind_partitions x where x.index_owner=BLS;-10.VIEWselect x.object_name, x.subobject_name, x.object_type, x.status, x.temporary, x.generated, x.secondary from user_objects x where x.object_type=VIEW order by object_type, object_name, x.subobject_name;-11.SEQUENCEselect x.object_name, x.subobject_name, x.object_type, x.status, x.temporary, x.generated, x.secondary from user_objects x where x.object_type=SEQUENCE order by object_type, object_name, x.subobject_name;select * from all_sequences x where x.sequence_owner=BLS;-数据库连接有效(连接CBS正式环境IAGENT_NEW)2013-9-26 追加需要在物流数据库服务器进行TNS的配置,如:IAGENT_NEW = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 0)(PORT = 1521) (ADDRESS = (PROTOCOL = TCP)(HOST = 1)(PORT = 1521) (LOAD_BALANCE = yes) (FAILOVER = ON) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = IAGENT) (FAILOVER_MODE = (TYPE = session) (METHOD = basic) (RETRIES = 180) (DELAY = 7) ) )重新编译DB连接 “IAGENTRAC”重新编译视图 view_tb_entity_iagent重新编译过程:sp_getEntity-普通索引sql重建抽取脚本select Alter index | index_name | rebuild; from dba_indexes where owner=BLS and partitioned=NO and table_nameTLSMODEL;- TLSMODEL是临时表-分区索引sql重建抽取脚本select Alter index | t.index_name | rebuild partition | i.partition_name |;, i.status, t.table_name from user_part_indexes t, user_ind_partitions i where t.index_name = i.index_name and t.table_name in (select table_name from dba_tables where owner=BLS and p

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论