Book Image

Oracle Advanced PL/SQL Developer Professional Guide

By : Saurabh K. Gupta
Book Image

Oracle Advanced PL/SQL Developer Professional Guide

By: Saurabh K. Gupta

Overview of this book

PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation's procedural extension language for SQL and the Oracle relational database. Server-side PL/SQL is stored and compiled in the Oracle Database and runs within the Oracle executable. With this guide Oracle developers can work towards accomplishing Oracle 11g Advanced PL/SQL Professional certification, which is the second milestone for developers working at the Associate level. The Oracle Advanced PL/SQL Developer Professional Guide helps you master advanced PL/SQL concepts. Besides the clear and precise explanation on advanced topics, it also contains example code and demonstrations, which gives a sense of application and usage to readers.The book gives a deep insight that will help transform readers from mid-level programmers to professional database developers. It aims to cover the advanced features of PL/SQL for designing and optimizing PL/SQL code.This book starts with an overview of PL/SQL as the programming database language and outlines the benefits and characteristics of the language. The book then covers the advanced features that include PL/SQL code writing using collections, tuning recommendations using result caching, implementing VPD to enforce row level security, and much more. Apart from programming, the book also dives deep into the usage of the development tool SQL Developer, employing best practices in database environments and safeguarding the vulnerable areas in PL/SQL code to avoid code injection.
Table of Contents (22 chapters)
Oracle Advanced PL/SQL Developer Professional Guide
Credits
Foreword
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 5, Implementing VPD with Fine Grained Access Control


Question No.

Answer

Explanation

1

c

The policy function returns the predicate as <Column>=<Value>.

2

b

The security policy can be associated to one and only one schema object.

3

b and c

The DBMS_RLS package is a SYS owned built in package whose public synonym is shared amongst the users. It is a useful package to work with policies and policy groups.

4

b

There is no such privilege as CREATE_CONTEXT. It should be the CREATE ANY CONTEXT privilege. All context metadata is in either ALL_CONTEXTS or DBA_CONTEXTS.

5

a

Context creation followed by the creation of its trusted package. A policy function is created for the predicate and the security is attached for the protection.

6

b

Policy groups are created by the collection of policies under them.

7

b and d

Default policy type is Dynamic. Shared static policy is the one where a static policy can be shared by multiple database objects. In such cases, the column appearing in the predicate must exist in all the tables.

8

c and d

Either a DBA or a user with the DBA role can create and drop an application context. A DBA can modify certain USERENV attributes, but not all.

9

a

The predicate information returned by the policy function is retained in SGA until the query is reparsed. During the parse stage, the current context information is matched with the latest. If the value has been changed, Oracle synchs the context values; otherwise the old value is retained.

10

a

The applicable policy tries to access the F_JOB_POLICY policy function which doesn't exist in the ORADEV schema.