tailieunhanh - Oracle Built−in Packages- P105
Oracle Built−in Packages- P105: Ah, for the good old days of Version of PL /SQL! Life was so simple then. No stored procedures or functions and certainly no packages. You had your set of built−in functions, like SUBSTR and TO_DATE. You had the IF statement and various kinds of loops. With these tools at hand, you built your batch−processing scripts for execution in SQL*Plus, and you coded your triggers in SQL*Forms , and you went home at night content with a good day's work done. | Appendix A What s on the Companion Disk Notice that each argument to this program is case-sensitive. ALTER_TABLE_REFERENCEABLE will not automatically convert to uppercase the table name you pass to it. You must make sure that the table and schema names you provide match exactly the case of the objects found inside the database. You will be able to execute this procedure successfully only if you have the appropriate privileges. Here are some rules to keep in mind The user who executes this procedure must own the new table and the affected schema must be the same as the user or PUBLIC alternatively the user must have ALTER ANY TABLE SELECT ANY TABLE and DROP ANY TABLE privileges. If the affected schema is PUBLIC and the user does not have ALTER ANY TABLE SELECT ANY TABLE and DROP ANY TABLE privileges then the user must own the old mapping table the table upon which the new table is based for PUBLIC as well. One tricky aspect to the way this built-in is defined the default affected_schema is PUBLIC. Combine this fact with the previous rules and you discover that the simplest form of calling the built-in providing only the table name EXECUTE EMPOBJTAB will quite often fail with this error ORA-20000 insufficient privileges invalid schema name or table does not exist You will say to yourself But I own the table And then you will realize Oh if I don t specify the affected schema then PUBLIC is used and I do not have ALTER ANY TABLE or any of the other privileges needed. So all I can really do is this EXECUTE EMPOBJTAB USER USER and make sure that the command is applied only to my schema. Example Generally you will use the ALTER_TABLE_REFERENCEABLE procedure when you want to replace an existing object table with a new table of the same structure. In this scenario you will want to make sure that all EOIDS point to this new table. Here are the steps you would take to use .
đang nạp các trang xem trước