• <tfoot id='tvjPs'></tfoot>

  • <small id='tvjPs'></small><noframes id='tvjPs'>

  • <legend id='tvjPs'><style id='tvjPs'><dir id='tvjPs'><q id='tvjPs'></q></dir></style></legend>

      • <bdo id='tvjPs'></bdo><ul id='tvjPs'></ul>

      <i id='tvjPs'><tr id='tvjPs'><dt id='tvjPs'><q id='tvjPs'><span id='tvjPs'><b id='tvjPs'><form id='tvjPs'><ins id='tvjPs'></ins><ul id='tvjPs'></ul><sub id='tvjPs'></sub></form><legend id='tvjPs'></legend><bdo id='tvjPs'><pre id='tvjPs'><center id='tvjPs'></center></pre></bdo></b><th id='tvjPs'></th></span></q></dt></tr></i><div id='tvjPs'><tfoot id='tvjPs'></tfoot><dl id='tvjPs'><fieldset id='tvjPs'></fieldset></dl></div>
      1. 为什么我不能在 SYS 拥有的对象上创建触发器?

        Why cannot I create triggers on objects owned by SYS?(为什么我不能在 SYS 拥有的对象上创建触发器?)

          • <tfoot id='9kPUB'></tfoot>

          • <small id='9kPUB'></small><noframes id='9kPUB'>

            <legend id='9kPUB'><style id='9kPUB'><dir id='9kPUB'><q id='9kPUB'></q></dir></style></legend>
            • <bdo id='9kPUB'></bdo><ul id='9kPUB'></ul>

              <i id='9kPUB'><tr id='9kPUB'><dt id='9kPUB'><q id='9kPUB'><span id='9kPUB'><b id='9kPUB'><form id='9kPUB'><ins id='9kPUB'></ins><ul id='9kPUB'></ul><sub id='9kPUB'></sub></form><legend id='9kPUB'></legend><bdo id='9kPUB'><pre id='9kPUB'><center id='9kPUB'></center></pre></bdo></b><th id='9kPUB'></th></span></q></dt></tr></i><div id='9kPUB'><tfoot id='9kPUB'></tfoot><dl id='9kPUB'><fieldset id='9kPUB'></fieldset></dl></div>
                  <tbody id='9kPUB'></tbody>

                  本文介绍了为什么我不能在 SYS 拥有的对象上创建触发器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  尝试创建名为 ghazal_current_bef_upd_row 的触发器时:

                  While trying to create a trigger named ghazal_current_bef_upd_row :

                  create trigger ghazal_current_bef_upd_row
                  before update on ghazal_current
                  for each row 
                  when (new.Rating < old.Rating)
                  begin
                  
                  insert into ghazal_current_audit
                   (GhazalName,Old_Rating,New_Rating)
                   values
                   (:old.GhazalName,:old.Rating,:new.Rating);
                  end;
                  

                  我收到以下错误:

                  Error report:
                  ORA-04089: cannot create triggers on objects owned by SYS
                  04089. 00000 -  "cannot create triggers on objects owned by SYS"
                  *Cause:    An attempt was made to create a trigger on an object owned by SYS.
                  *Action:   Do not create triggers on objects owned by SYS.
                  

                  名为ghazals_currentghazal_current_audit 的表均由SYS 创建.为什么我不能在 SYS 创建的表上创建触发器.

                  Both the tables named ghazals_current and ghazal_current_audit were created by SYS. Why cannot I create a trigger on the table created by SYS .

                  推荐答案

                  您不应该在 SYS 架构中创建任何对象.该用户是 Oracle 数据库管理系统的一部分,更改其架构可能会破坏您的数据库.当然,它可能会使您的 Oracle 支持合同无效(如果您有).来自文档:

                  You should not be creating any objects in the SYS schema. That user is part of the Oracle database management system, and changing its schema is likely to break your database. Certainly it could invalidate your Oracle Support contract (if you have one). From the documentation:

                  "管理帐户 SYS 是在执行以下操作时自动创建的数据库已创建.这个账号可以执行所有数据库行政职能.SYS 模式存储基表和数据字典的视图.这些基表和视图是对 Oracle 数据库的运行至关重要.SYS 中的表模式仅由数据库操作,不得修改任何用户."

                  "The administrative account SYS is automatically created when a database is created. This account can perform all database administrative functions. The SYS schema stores the base tables and views for the data dictionary. These base tables and views are critical for the operation of Oracle Database. Tables in the SYS schema are manipulated only by the database and must never be modified by any user."

                  哦,如果您想知道,这同样适用于 SYSTEM.

                  Oh, in case you're wondering, the same applies to SYSTEM too.

                  触发器特别容易被滥用,并且是扩展问题的主要来源.这就是 Oracle 禁止我们在 SYS 中构建触发器的原因,因为这样做可能会损坏或至少影响数据字典的性能.

                  Triggers are particularly prone to abuse and are a major source of scaling problems. That's why Oracle forbids us to build triggers in SYS, because doing so might corrupt or at least impact the performance of the data dictionary.

                  当然,这不是这里发生的事情.您已经在 SYS 中构建了自己的表.好吧,放下它们.现在.使用 SYS 创建您自己的用户、GHAZAL 或任何适合的名称,并授予它所需的权限:CREATE SESSION、CREATE TABLE、CREATE TRIGGER 等等.然后以该新用户的身份连接以创建您的表和其他架构对象.

                  Of course that's not what's happening here. You have built your own tables in SYS. Well drop them. Now. Use SYS to create your own user, GHAZAL or whatever name suits, and grant it the required privileges: CREATE SESSION, CREATE TABLE, CREATE TRIGGER, and so forth. Then connect as that new user to create your tables and other schema objects.

                  这篇关于为什么我不能在 SYS 拥有的对象上创建触发器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to redirect the output of DBMS_OUTPUT.PUT_LINE to a file?(如何将 DBMS_OUTPUT.PUT_LINE 的输出重定向到文件?)
                  How do I get column datatype in Oracle with PL-SQL with low privileges?(如何使用低权限的 PL-SQL 在 Oracle 中获取列数据类型?)
                  Get a list of all functions and procedures in an Oracle database(获取 Oracle 数据库中所有函数和过程的列表)
                  Returning result even for elements in IN list that don#39;t exist in table(即使对于表中不存在的 IN 列表中的元素也返回结果)
                  Reset Sequence in oracle 11g(oracle 11g 中的重置序列)
                  No more data to read from socket(没有更多的数据要从套接字读取)
                • <i id='ZZlpG'><tr id='ZZlpG'><dt id='ZZlpG'><q id='ZZlpG'><span id='ZZlpG'><b id='ZZlpG'><form id='ZZlpG'><ins id='ZZlpG'></ins><ul id='ZZlpG'></ul><sub id='ZZlpG'></sub></form><legend id='ZZlpG'></legend><bdo id='ZZlpG'><pre id='ZZlpG'><center id='ZZlpG'></center></pre></bdo></b><th id='ZZlpG'></th></span></q></dt></tr></i><div id='ZZlpG'><tfoot id='ZZlpG'></tfoot><dl id='ZZlpG'><fieldset id='ZZlpG'></fieldset></dl></div>
                  <tfoot id='ZZlpG'></tfoot>

                        <legend id='ZZlpG'><style id='ZZlpG'><dir id='ZZlpG'><q id='ZZlpG'></q></dir></style></legend>

                          <bdo id='ZZlpG'></bdo><ul id='ZZlpG'></ul>
                            <tbody id='ZZlpG'></tbody>
                          1. <small id='ZZlpG'></small><noframes id='ZZlpG'>