无法创建或删除任何 oracle 对象

发布于 2024-08-23 11:25:36 字数 366 浏览 5 评论 0原文

我正在尝试更新 Oracle 数据库,使其架构与第二个数据库完全匹配。在这样做的过程中,我已经浇灌了一些东西。我无法创建或删除任何对象。

create or replace procedure eag.test
as
begin
    null;
end;

错误:

ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist

对于我尝试执行的任何创建或删除操作,我都会遇到相同的错误。有什么想法吗?

编辑:运行 Oracle 10.2.0.4

I'm trying to update an oracle database so that it's schema matches a second database exactly. In doing so I've hosed something. I can't create or drop any object.

create or replace procedure eag.test
as
begin
    null;
end;

Error:

ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist

I get the same error for any create or drop I try to do. Any ideas?

EDIT: running Oracle 10.2.0.4

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

谷夏 2024-08-30 11:25:36

您的数据字典已损坏。

如果您可以构建一个新数据库并重新开始同步过程。这次不使用sysdba。只有sysdba有权限破坏数据字典。

如果您需要数据但可以重新开始,您仍然可以使用 exp 或 expdp 导出数据。

如果您无法使用新数据库重新开始。
在 Oracle 支持下打开 SAR。即使其他人可能能够引导您完成此操作,他们也是唯一能够将您的数据库恢复到 Oracle 支持状态的人。

You have a corrupt data dictionary.

If you can build a new database and start you sync process over. This time not using sysdba. Only sysdba has privileges to be destructive to the data dictionary.

If you need the data but can start over you may still be able to export the data using exp or expdp.

If you can't start over with a new database.
Open a SAR with Oracle support. Even if someone else might be able to walk you through this they are the only ones who can bring your database back to an Oracle Supported state.

万劫不复 2024-08-30 11:25:36

值得检查数据库上是否有任何 DDL 触发器。 MDSYS 可能有一些内置的,但您可能有自己的(例如用于审核 DDL)

select owner, trigger_type, triggering_event, trigger_name, base_object_type, when_clause, description 
from dba_triggers d
where table_name is null
and status = 'ENABLED'
order by d.triggering_event, d.owner

Worth checking if you have any DDL triggers on the database. There's probably a few built in ones from MDSYS, but you may have your own (eg for auditing DDL)

select owner, trigger_type, triggering_event, trigger_name, base_object_type, when_clause, description 
from dba_triggers d
where table_name is null
and status = 'ENABLED'
order by d.triggering_event, d.owner
北城挽邺 2024-08-30 11:25:36

这可能是一个损坏的数据库,但不要操之过急。当超出会话和进程限制时,可能会发生递归错误。

您超出进程限制的可能性很小。您的实例中当前有多少个进程?您是否接近参数“processes”施加的限制?如果是这样,递归 SQL 可能会失败并出现错误。

从 sqlplus 会话(或 IDE)检查参数进程

show parameter processes

然后从 v$process 检查进程数:

select count(*) from v$process

是否接近阈值?如果是,请增加进程参数:例如,如果您的进程限制为 150,则增加到 175。

alter system set processes=175 scope=spfile

您必须重新启动服务器才能使更改生效,因为您无法动态修改进程参数。

否则,跟踪会话并查看问题实际出在哪里:

从当前会话发出以下命令:

alter session set sql_trace=TRUE

然后再次运行创建或替换,当它爆炸时,查看在中创建的跟踪文件USER_DUMP_DEST 目录。查找其中的 ORA 错误,它们可能会导致不同的问题,但可能会节省大量时间。

Potentially this is a corrupt database but don't be too hasty. Recursive errors can occur when session and process limits are exceeded.

There is a slim chance you have exceeded the processes limit. How many processes do you currently have in your instance ? Are you close to the limit imposed by the parameter "processes" ? If so, recursive SQL could be failing and presenting the error.

Check parameter processes from sqlplus session (or IDE) with :

show parameter processes

Then check number of processes from v$process :

select count(*) from v$process

Are you close to the threshold ? If you are, increase the processes parameter : eg if your processes limit was 150 increase to 175

alter system set processes=175 scope=spfile

You will have to restart the server for the change to take effect as you cannot dynamically modify the processes parameter.

Otherwise, trace the session and see where the problem actually is :

From your current session issue the following :

alter session set sql_trace=TRUE

Then run your create or replace again, when it bombs out look at your trace file that is created in the USER_DUMP_DEST directory. Look for ORA errors in there, they may lead to a different problem but it may save a load of time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文