重新创建Oracle DUAL表 [英] Recreate the Oracle DUAL table

查看:125
本文介绍了重新创建Oracle DUAL表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以在Oracle中创建/重新创建双表?它不小心掉了.

Is there any way to create / recreate dual table in Oracle? It was accidentally dropped.

推荐答案

您可能应该联系Oracle支持.

You should probably contact Oracle Support.

您有备份吗?如果是这样,请从备份中还原表.否则(如果您不愿意与Oracle联系,则...)

Do you have a backup? If so, restore the table from your backup. Otherwise (and if contacting Oracle is not an option for you)...

Oracle对DUAL进行了特殊的优化,但是我不知道表本身是否有任何特殊之处.我只是将其视为普通表,然后看看会发生什么.试试这个:

Oracle has special optimizations for DUAL, but I don't know if there's anything special about the table itself. I would just treat it like a normal table and see what happens. Try this:

以SYSDBA身份连接,然后执行以下命令:

Connect as SYSDBA and then execute these commands:

CREATE TABLE SYS.DUAL
(
  DUMMY  VARCHAR2(1 BYTE)
);

INSERT INTO SYS.DUAL VALUES ( 'X' );

COMMIT;

GRANT SELECT ON SYS.DUAL TO public WITH GRANT OPTION;

CREATE PUBLIC SYNONYM DUAL FOR SYS.DUAL;

永远不要再更改SYS模式中的任何内容!

And never EVER change ANYTHING in the SYS schema again!

刚刚发现今天有一个重复: https://stackoverflow.com/questions/2816478/recovering-dual-table-in-oracle -在此处添加了建议.

Just noticed a duplicate from TODAY: https://stackoverflow.com/questions/2816478/recovering-dual-table-in-oracle - added suggestions here.

这篇关于重新创建Oracle DUAL表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆