简体   繁体   English

必须声明UTL_RECOMP.RECOMP_SERIAL

[英]UTL_RECOMP.RECOMP_SERIAL must be declared

First off I'd like to specify that I am trying to do this upgrade remotely. 首先,我想指定我要远程进行此升级。 I am receiving this error: 我收到此错误:

2015-04-24:11:59:42 [Error] myDB - Failed to Recompile 'DBTYPE' Database Objects: ExcSQL Failed: Oracle Error Encountered: ORA-06550: line 1, column 7: PLS-00201: identifier 'UTL_RECOMP.RECOMP_SERIAL' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored (6550) SQL Text: begin utl_recomp.recomp_serial('DBTYPE'); 2015-04-24:11:59:42 [错误] myDB-无法重新编译'DBTYPE'数据库对象:ExcSQL失败:遇到Oracle错误:ORA-06550:第1行,第7列:PLS-00201:标识符'UTL_RECOMP。必须声明RECOMP_SERIAL'ORA-06550:第1行,第7列:PL / SQL:语句被忽略(6550)SQL文本:开始utl_recomp.recomp_serial('DBTYPE'); end; 结束;

2015-04-24:11:59:42 [Error] WorksObjects Execution Failed: DBTYPE - Process JAR Files Failed: Failed to Recompile 'DBTYPE' Database Objects:ExcSQL Failed: Oracle Error Encountered: ORA-06550: line 1, column 7: PLS-00201: identifier 'UTL_RECOMP.RECOMP_SERIAL' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored (6550) SQL Text: begin utl_recomp.recomp_serial('DBTYPE'); 2015-04-24:11:59:42 [错误] WorksObjects执行失败:DBTYPE-处理JAR文件失败:无法重新编译“ DBTYPE”数据库对象:ExcSQL失败:遇到Oracle错误:ORA-06550:第1行,第7列:PLS-00201:标识符'UTL_RECOMP.RECOMP_SERIAL'必须声明为ORA-06550:第1行,第7列:PL / SQL:语句被忽略(6550)SQL文本:开始utl_recomp.recomp_serial('DBTYPE'); end; 结束;

2015-04-24:11:59:42 [Error] UPGD FAILED! 2015-04-24:11:59:42 [错误] UPGD失败! : myDB - Upgrade Error - Worker Thread Process Error - DBTYPE - Process JAR Files Failed: Failed to Recompile 'DBTYPE' Database Objects:ExcSQL Failed: Oracle Error Encountered: ORA-06550: line 1, column 7: PLS-00201: identifier 'UTL_RECOMP.RECOMP_SERIAL' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored (6550) SQL Text: begin utl_recomp.recomp_serial('DBTYPE'); :myDB-升级错误-工作者线程进程错误-DBTYPE-进程JAR文件失败:未能重新编译'DBTYPE'数据库对象:ExcSQL失败:遇到Oracle错误:ORA-06550:第1行,第7列:PLS-00201:标识符'必须声明UTL_RECOMP.RECOMP_SERIAL'ORA-06550:第1行,第7列:PL / SQL:语句被忽略(6550)SQL文本:开始utl_recomp.recomp_serial('DBTYPE'); end; 结束;

when I try to do a recompile on invalid objects. 当我尝试对无效对象进行重新编译时。 The only thing I can find on the internet is that when recompiling, that I should be logged in as a sysdba, which I am currently doing. 我在互联网上唯一能找到的就是重新编译时,我应该以sysdba的身份登录,这是我目前正在执行的操作。

"Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = " + MyHostName + ")(PORT = 1521))(CONNECT_DATA =" +
"(SERVICE_NAME = " + mySID + ")));DBA Privilege = SYSDBA;" +
"User Id = " + MyID + ";Password = " + MyPW;

My connection is working correctly cause I can run 3/4 of the upgrade process till I hit this point where I try and recompile this specific schema. 我的连接正常工作,因为我可以运行升级过程的3/4,直到我尝试重新编译该特定架构为止。

Conn = GetConn( MyID, MyPW );
if (DevelopSrvr)
{
   ExcSQL(Conn, "alter session set plsql_debug=true");
}
ExcSQL(Conn, "begin utl_recomp.recomp_serial('" + schema + "'); end;");

This program runs fine locally and I have checked the stack trace and all the variables are returning the expected values. 该程序在本地运行良好,我检查了堆栈跟踪,所有变量都返回了预期值。 Is there something I'm missing? 有什么我想念的吗? Thanks in advance 提前致谢

Here are operational notes related to UTL_RECOMP package: 以下是与UTL_RECOMP软件包相关的操作说明:

This package must be run using SQL*PLUS. 该程序包必须使用SQL * PLUS运行。

This package uses the job queue for parallel recompilation. 该程序包使用作业队列进行并行重新编译。

You must be connected AS SYSDBA to run this script. 您必须已连接AS SYSDBA才能运行此脚本。

This package expects the following packages to have been created with VALID status: 该软件包期望以下软件包已被创建为VALID状态:

STANDARD (standard.sql) 标准(standard.sql)

DBMS_STANDARD (dbmsstdx.sql) DBMS_STANDARD(dbmsstdx.sql)

DBMS_JOB (dbmsjob.sql) DBMS_JOB(dbmsjob.sql)

DBMS_RANDOM (dbmsrand.sql) DBMS_RANDOM(dbmsrand.sql)

According to your output: 根据您的输出:

"UTL_RECOMP.RECOMP_SERIAL' must be declared ORA-06550: line 1, column 7: " “必须将UTL_RECOMP.RECOMP_SERIAL声明为ORA-06550:第1行,第7列:”

This message states that you are logged in but without sysdba privilege. 此消息表明您已登录,但没有sysdba特权。

In your target database validate that: 在目标数据库中验证:

1.) Remote login password file is set EXCLUSIVE 1.)远程登录密码文件设置为EXCLUSIVE

SQL> show parameter password

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile            string      EXCLUSIVE

2.) The username you are using to login is listed in v$pwfile_users catalog view (assume that you are connecting using "Z_TEST" database account as sysdba): 2.)您用于登录的用户名在v $ pwfile_users目录视图中列出(假设您使用“ Z_TEST”数据库帐户作为sysdba进行连接):

SQL> select username,sysdba from v$pwfile_users ;

USERNAME                       SYSDBA
------------------------------ -----
SYS                            TRUE
Z_TEST                         TRUE

The following example assumes "z_test/welcome1" account credentials and "db99" as target service name: 以下示例假定“ z_test / welcome1”帐户凭据和“ db99”作为目标服务名称:

sqlplus z_test/welcome1@db99 as sysdba sqlplus z_test / welcome1 @ db99作为sysdba

SQL> set serveroutput on
SQL> begin
 2     utl_recomp.recomp_serial('Z_TEST');
 3  end;
 4  /

PL/SQL procedure successfully completed.

TIP: when connected as sysdba your username becomes "SYS". 提示:以sysdba身份连接时,您的用户名将变为“ SYS”。 Verify that in your code. 验证您的代码中。 As example: 例如:

SQL> show user
USER is "SYS"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM