在采用IMPDP/IMP工具遷移數(shù)據(jù)時(shí),經(jīng)常會(huì)提示無效對(duì)象的警告,需要采用如下方式處理。
采用H5響應(yīng)式網(wǎng)站+css3國際標(biāo)準(zhǔn)網(wǎng)站建設(shè),讓網(wǎng)站自動(dòng)適應(yīng)用戶使用終端設(shè)備,PC、平板、手機(jī)等,一個(gè)網(wǎng)址適應(yīng),一套內(nèi)容統(tǒng)一戰(zhàn)略,節(jié)約企業(yè)資源。創(chuàng)新互聯(lián)還提供網(wǎng)站后期營銷如:軟文平臺(tái)、賣鏈接、廣告投放等。一般建站公司不為企業(yè)填充資料,更談不上內(nèi)容策劃,結(jié)果導(dǎo)致網(wǎng)站界面優(yōu)秀,內(nèi)容卻十分空泛或整體不協(xié)調(diào),內(nèi)容策劃、內(nèi)容填充請(qǐng)交給我們。
su – oracle
sqlplus / as sysdba
SQL> select owner,object_name,replace(object_type,' ','') object_type,to_char(created,'yyyy-mm-dd') as created,to_char(last_ddl_time,'yyyy-mm-dd') as last_ddl_time,status from dba_objects where status='INVALID' and owner='HKJJW';
OWNER OBJECT_NAME OBJECT_TYPE CREATED LAST_DDL_T STATUS
---------- ------------------------------ --------------- ---------- ---------- -------
HKJJW FUNC_RETURN_PY FUNCTION 2013-08-02 2013-08-02 INVALID
HKJJW MONITORING_FLOW_PARALLEL_VIEW VIEW 2013-08-02 2013-08-02 INVALID
HKJJW TEST VIEW 2013-08-02 2013-08-02 INVALID
指定查詢某用戶無效對(duì)象。
SQL> select * from dba_objects where status<>'VALID' and owner='HKJJW';
ALTER FUNCTION HKJJW.FUNC_RETURN_PY COMPILE;
ALTER VIEW HKJJW.MONITORING_FLOW_PARALLEL_VIEW COMPILE;
ALTER VIEW HKJJW.TEST COMPILE;
如果是index的話,需要重建.
alter index index_name rebuild;
如果是package body
alter package DBMS_CUBE compile body;
SQL> select owner,object_type,status,count(*) from dba_objects where status='INVALID' group by owner,object_type,status order by owner,object_type;
OWNER OBJECT_TYPE STATUS COUNT(*)
------------------------------ ------------------- ------- ----------
HNADEV_GROUP FUNCTION INVALID 1
HNADEV_GROUP PACKAGE BODY INVALID 35
HNADEV_GROUP VIEW INVALID 7
SQL> select 'ALTER ' || OBJECT_TYPE || ' ' || OWNER || '.' || OBJECT_NAME || ' COMPILE;' from dba_objects where status = 'INVALID' and object_type in ('PACKAGE','PACKAGE BODY','FUNCTION','PROCEDURE','TRIGGER','VIEW') ;
'ALTER'||OBJECT_TYPE||''||OWNER||'.'||OBJECT_NAME||'COMPILE;'
----------------------------------------------------------------------
ALTER VIEW HNADEV_GROUP.V_E_T_FEEMONTH_CAL COMPILE;
ALTER VIEW HNADEV_GROUP.V_E_T_FEEMONTH COMPILE;
ALTER VIEW HNADEV_GROUP.V_E_Z_BILL_STAY_GROUP COMPILE;
略...
通過復(fù)制以上SQL語句,直接手動(dòng)執(zhí)行編譯執(zhí)行.
# su - oracle
$ sqlplus / as sysdba
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql