如metalink 文件提到,先將三個參數修正,否則在建db過程中,sys進行SYS.UTL_RECOMP_( )會看到error。
ORA-12801 error was signalled in parallel query server ORA-00018 maximum number of sessions exceeded ORA-06512 at sys_utl_recomp line 760 ORA-06512 as sys_utl_recomp line 773 ORA-06512 as sys_utl_recomp line 1 |
Before creating database, set parallel parameters to zero.
PARALLEL_MAX_SERVERS=0(註1)
PARALLEL_MIN_SERVERS =0
SESSIONS=500
或先apply patch p8343487_111070_Generic.zip
8343487: UTLRP.SQL EXECUTING IN PARALLEL REGARDLESS OF SETTING
(註2)
註1
PARALLEL_MAX_SERVERS
Derived from the values of CPU_COUNT,PARALLEL_THREADS_PER_CPU, and PGA_AGGREGATE_TARGET, on sun T5120 : 285
If you set this parameter too low, then some queries may not have a parallel execution
process available to them during query processing. If you set it too high, then memory
resource shortages may occur during peak periods, which can degrade performance.
(file:///D:/Oracle_docs/11g_B28359_01/server.111/b28320.pdf)
註2
若已經來不及設定參數,則作後續處理
SQL> set pagesize 300 SQL> COLUMN object_name FORMAT A30 SQL> SELECT owner, 2 object_type, 3 object_name, 4 status 5 FROM dba_objects 6 WHERE status = 'INVALID' 7 ORDER BY owner, object_type, object_name;
OWNER ------------------------------------------------------------ OBJECT_TYPE OBJECT_NAME -------------------------------------- ------------------------------ STATUS -------------- OLAPSYS PACKAGE BODY CWM2_OLAP_AW_AWUTIL INVALID
OLAPSYS PACKAGE BODY CWM2_OLAP_PC_TRANSFORM INVALID
OLAPSYS PACKAGE BODY DBMS_ODM INVALID
OLAPSYS PACKAGE BODY OLAPDIMVIEW INVALID
OLAPSYS PACKAGE BODY OLAPFACTVIEW INVALID
PUBLIC SYNONYM ALL_WM_VERSIONED_TABLES INVALID
PUBLIC SYNONYM DBA_WM_VERSIONED_TABLES INVALID
PUBLIC SYNONYM USER_WM_VERSIONED_TABLES INVALID
PUBLIC SYNONYM WM_COMPRESS_BATCH_SIZES INVALID
SYS PACKAGE BODY DBMS_NETWORK_ACL_ADMIN INVALID
SYSMAN PACKAGE BODY MGMT_PAGE_CUSTMZN INVALID
SYSMAN PACKAGE BODY MGMT_TEMPLATE INVALID
WMSYS PACKAGE BODY LT INVALID
WMSYS PACKAGE BODY LTADM INVALID
WMSYS PACKAGE BODY LTDDL INVALID
WMSYS PACKAGE BODY LTDTRG INVALID
WMSYS PACKAGE BODY LTRIC INVALID
WMSYS PACKAGE BODY LT_EXPORT_PKG INVALID
WMSYS PACKAGE BODY OWM_ASSERT_PKG INVALID
WMSYS PACKAGE BODY OWM_DDL_PKG INVALID
WMSYS PACKAGE BODY UD_TRIGS INVALID
WMSYS PACKAGE BODY WM_DDL_UTIL INVALID
WMSYS PROCEDURE NO_VM_DROP_PROC INVALID
23 rows selected.
SQL> @?/rdbms/admin/utlrp.sql
TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_BGN 2008-10-08 15:11:30
DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalid DOC> objects in the database. Recompilation time is proportional to the DOC> number of invalid objects in the database, so this command may take DOC> a long time to execute on a database with a large number of invalid DOC> objects. DOC> DOC> Use the following queries to track recompilation progress: DOC> DOC> 1. Query returning the number of invalid objects remaining. This DOC> number should decrease with time. DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6); DOC> DOC> 2. Query returning the number of objects compiled so far. This number DOC> should increase with time. DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED; DOC> DOC> This script automatically chooses serial or parallel recompilation DOC> based on the number of CPUs available (parameter cpu_count) multiplied DOC> by the number of threads per CPU (parameter parallel_threads_per_cpu). DOC> On RAC, this number is added across all RAC nodes. DOC> DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel DOC> recompilation. Jobs are created without instance affinity so that they DOC> can migrate across RAC nodes. Use the following queries to verify DOC> whether UTL_RECOMP jobs are being created and run correctly: DOC> DOC> 1. Query showing jobs created by UTL_RECOMP DOC> SELECT job_name FROM dba_scheduler_jobs DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%'; DOC> DOC> 2. Query showing UTL_RECOMP jobs that are running DOC> SELECT job_name FROM dba_scheduler_running_jobs DOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%'; DOC>#
PL/SQL procedure successfully completed.
TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_END 2008-10-08 15:13:25
PL/SQL procedure successfully completed.
DOC> The following query reports the number of objects that have compiled DOC> with errors (objects that compile with errors have status set to 3 in DOC> obj$). If the number is higher than expected, please examine the error DOC> messages reported with each object (using SHOW ERRORS) to see if they DOC> point to system misconfiguration or resource constraints that must be DOC> fixed before attempting to recompile these objects. DOC>#
OBJECTS WITH ERRORS ------------------- 0
DOC> The following query reports the number of errors caught during DOC> recompilation. If this number is non-zero, please query the error DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors DOC> are due to misconfiguration or resource constraints that must be DOC> fixed before objects can compile successfully. DOC>#
ERRORS DURING RECOMPILATION --------------------------- 0
PL/SQL procedure successfully completed.
Invoking Ultra Search Install/Upgrade validation procedure VALIDATE_WK Ultra Search VALIDATE_WK done with no error
PL/SQL procedure successfully completed.
SQL> COLUMN object_name FORMAT A30 SQL> SELECT owner, 2 object_type, 3 object_name, 4 status 5 FROM dba_objects 6 WHERE status = 'INVALID' 7 ORDER BY owner, object_type, object_name;
no rows selected
SQL> spool off |
沒有留言:
張貼留言