重新配置下数据字典 执行catalog.sql and catproc.sql来配置后台数据字典sql>@?/rdbms/admin/catalog.sql sql>@?/rdbms/admin/catproc.sql【执行数据字典的编写应该检测是否有失效的对象,如有失效应该执行以下】SQL> connect / as sysdba SQL> @?/rdbms/admin/catmetx.sql SQL> @?/rdbms/admin/utlrp.sql
我执行了select count(*) from dba_objects where status='INVALID'; 查到有458个无效对象 执行完SQL> @?/rdbms/admin/catmetx.sql 后执行 SQL> @?/rdbms/admin/utlrp.sql 显示 TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_BGN 2014-07-03 17:00:59DOC> 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># 在这就一直不动了,ctrl+c后 ERROR at line 1: ORA-01013: user requested cancel of current operation ORA-06512: at "SYS.UTL_RECOMP", line 783 ORA-06512: at line 4 求大侠指点。
我执行了select count(*) from dba_objects where status='INVALID'; 查到有458个无效对象 执行完SQL> @?/rdbms/admin/catmetx.sql 后执行 SQL> @?/rdbms/admin/utlrp.sql 显示 TIMESTAMP -------------------------------------------------------------------------------- COMP_TIMESTAMP UTLRP_BGN 2014-07-03 17:00:59DOC> 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># 在这就一直不动了,ctrl+c后 ERROR at line 1: ORA-01013: user requested cancel of current operation ORA-06512: at "SYS.UTL_RECOMP", line 783 ORA-06512: at line 4 求大侠指点。
SQL> exec dbms_utility.compile_schema(user,false); BEGIN dbms_utility.compile_schema(user,false); END;* ERROR at line 1: ORA-20001: Cannot recompile SYS objects ORA-06512: at "SYS.DBMS_UTILITY", line 387 ORA-06512: at line 1 我是把实例按用户expdp导出,在新数据库中创建好一个实例,进行impdp导入,正式迁移前还做了测试,创建好了实例,进行impdp导入,也进行过对比,也能进行expdp导出,可在真正迁移时导入进去后就导出不了了。恳请大侠指点。
执行catalog.sql and catproc.sql来配置后台数据字典sql>@?/rdbms/admin/catalog.sql
sql>@?/rdbms/admin/catproc.sql【执行数据字典的编写应该检测是否有失效的对象,如有失效应该执行以下】SQL> connect / as sysdba
SQL> @?/rdbms/admin/catmetx.sql
SQL> @?/rdbms/admin/utlrp.sql
我执行了select count(*) from dba_objects where status='INVALID';
查到有458个无效对象
执行完SQL> @?/rdbms/admin/catmetx.sql
后执行
SQL> @?/rdbms/admin/utlrp.sql
显示
TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN 2014-07-03 17:00:59DOC> 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>#
在这就一直不动了,ctrl+c后
ERROR at line 1:
ORA-01013: user requested cancel of current operation
ORA-06512: at "SYS.UTL_RECOMP", line 783
ORA-06512: at line 4
求大侠指点。
我执行了select count(*) from dba_objects where status='INVALID';
查到有458个无效对象
执行完SQL> @?/rdbms/admin/catmetx.sql
后执行
SQL> @?/rdbms/admin/utlrp.sql
显示
TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN 2014-07-03 17:00:59DOC> 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>#
在这就一直不动了,ctrl+c后
ERROR at line 1:
ORA-01013: user requested cancel of current operation
ORA-06512: at "SYS.UTL_RECOMP", line 783
ORA-06512: at line 4
求大侠指点。
BEGIN dbms_utility.compile_schema(user,false); END;*
ERROR at line 1:
ORA-20001: Cannot recompile SYS objects
ORA-06512: at "SYS.DBMS_UTILITY", line 387
ORA-06512: at line 1
我是把实例按用户expdp导出,在新数据库中创建好一个实例,进行impdp导入,正式迁移前还做了测试,创建好了实例,进行impdp导入,也进行过对比,也能进行expdp导出,可在真正迁移时导入进去后就导出不了了。恳请大侠指点。