TAILIEUCHUNG - Oracle Built−in Packages- P12

Oracle Built−in Packages- P12: 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. | Oracle Built-in Packages SEARCH Chapter 2 Executing Dynamic SQL and PL SQL NEXT Getting Started with DBMS_SQL Before you start using DBMS_SQL you need to make sure that it is installed and that the appropriate users have access to this package. In addition you should be aware of how privileges are applied to programs that execute dynamic SQL. Creating the DBMS_SQL Package The DBMS_SQL package is created when the Oracle database is installed. The script found in the built-in packages source code directory as described in Chapter 1 Introduction contains the source code for this package s specification. This script is called by which is normally run immediately after database creation. The script creates the public synonym DBMS_SQL for the package and grants EXECUTE privilege on the package to public. All Oracle users can reference and make use of this package. Given the power flexibility and potential impact of dynamic SQL you may actually want to revoke public access to DBMS_SQL and instead grant EXECUTE privilege to only those users who need to perform dynamic SQL. To hide DBMS_SQL issue this command from the SYS account REVOKE EXECUTE ON DBMS_SQL FROM PUBLIC To grant EXECUTE privilege to a specific user issue this command from SYS GRANT EXECUTE ON DBMS_SQL TO whatever_user Security and Privilege Issues Generally when you run stored code and all DBMS_ built-in packages are certainly stored in the database that code executes under the authority and using the privileges associated with the owner of the code. If this rule were applied to DBMS_SQL then anyone who had EXECUTE privilege on DBMS_SQL would be able to act as SYS. This is clearly not a viable approach. When you execute a DBMS_SQL program from within an anonymous block that program is executed using the privileges of the current schema. If you embed DBMS_SQL programs within a stored program those dynamic SQL programs will execute using the privileges of the owner of the

TÀI LIỆU MỚI ĐĂNG
19    227    0    17-04-2024
20    247    2    17-04-2024
46    184    0    17-04-2024
8    169    0    17-04-2024
10    114    0    17-04-2024
5    123    0    17-04-2024
5    123    2    17-04-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.