In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
When migrating data using IMPDP/IMP tools, warnings about invalid objects are often prompted and need to be handled in the following ways.
1. Query the invalid object for the specified user
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
Specifies to query an invalid object for a user.
SQL > select * from dba_objects where status'VALID' and owner='HKJJW'
two。 Manually perform compilation or
ALTER FUNCTION HKJJW.FUNC_RETURN_PY COMPILE
ALTER VIEW HKJJW.MONITORING_FLOW_PARALLEL_VIEW COMPILE
ALTER VIEW HKJJW.TEST COMPILE
If it is index, it needs to be rebuilt.
Alter index index_name rebuild
If it's package body,
Alter package DBMS_CUBE compile body
3. Automatically generate and compile invalid objects SQL1) count the number of invalid objects for the current user:
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
2) generate and compile invalid object SQL
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
A little.
Manually execute the compilation execution directly by copying the above SQL statements.
4. You can also compile manually under oracle users in the following ways
# su-oracle
$sqlplus / as sysdba
SQL > @ $ORACLE_HOME/rdbms/admin/utlrp.sql
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.