Synopses & Reviews
PL/SQL, Oracle's powerful procedural language, has been the cornerstone of Oracle application development for nearly 15 years. Although primarily a tool for developers, PL/SQL has also become an essential tool for database administration, as DBAs take increasing responsibility for site performance and as the lines between developers and DBAs blur.
Until now, there has not been a book focused squarely on the language topics of special concern to DBAs Oracle PL/SQL for DBAs fills the gap. Covering the latest Oracle version, Oracle Database 10g Release 2 and packed with code and usage examples, it contains:
- A quick tour of the PL/SQL language, providing enough basic information about language fundamentals to get DBAs up and running
- Extensive coverage of security topics for DBAs: Encryption (including both traditional methods and Oracle's new Transparent Data Encryption, TDE); Row-Level Security(RLS), Fine-Grained Auditing (FGA); and random value generation
- Methods for DBAs to improve query and database performance with cursors and table functions
- Coverage of Oracle scheduling, which allows jobs such as database monitoring andstatistics gathering to be scheduled for regular execution
Using Oracle's built-in packages (DBMS_CRYPTO, DBMS_RLS, DBMS_FGA, DBMS_RANDOM,DBMS_SCHEDULING) as a base, the book describes ways of building on top of these packages to suit particular organizational needs. Authors are Arup Nanda, Oracle Magazine 2003 DBA of the Year, and Steven Feuerstein, the world's foremost PL/SQL expert and coauthor of the classic reference, Oracle PL/SQL Programming.
DBAs who have not yet discovered how helpful PL/SQL can be will find this book a superb introduction to the language and its special database administration features. Even if you have used PL/SQL for years, you'll find the detailed coverage in this book to be an invaluable resource.
Synopsis
Focused squarely on the language topics of special concern to DBAs, this text contains a quick tour of the PL/SQL language, extensive coverage of security topics, and methods for DBAs to improve query and database performance with cursors and table functions.
About the Author
Arup Nanda has been an Oracle DBA since 1993, which has exposed him to all facets of database administration&emdash;from modeling to disaster recovery. He currently leads the global DBA team at Starwood Hotels, the parent of chains such as Sheraton and Westin, in White Plains, NY. He serves as a contributing editor of "SELECT Journal", the publication of Independent Oracle Users Group (IOUG); speaks at many Oracle Technology&emdash;related events such as Oracle World and local user groups such as New York Oracle User Group; and has written many articles for both print publications such as "Oracle Magazine" and online publications such as "Oracle Technology Network". Arup has coauthored two books: "Oracle Privacy Security Auditing" (Rampant, 2003) and "Oracle PL/SQL for DBAs" (O'Reilly, 2005). Recognizing his professional accomplishments and contributions to user community, Oracle chose him as the "DBA of the Year" in 2003. He lives in Danbury, Connecticut, with his wife Anindita and son Anish. He can be reached at
[email protected] Feuerstein is considered one of the world's leading experts on the Oracle PL/SQL language. He is the author or coauthor of Oracle PL/SQL Programming, Oracle PL/SQL Best Practices, Oracle PL/SQL Programming: Guide to Oracle8i Features, Oracle PL/SQL Developer's Workbook, Oracle Built-in Packages, Advanced Oracle PL/SQL Programming with Packages, and several pocket reference books (all from O'Reilly and Associates). Steven is a Senior Technology Advisor with Quest Software, has been developing software since 1980, and worked for Oracle Corporation from 1987 to 1992.
Table of Contents
Preface; PL/SQL for DBAs; About This Book; Conventions Used in This Book; About PL/SQL Versions; Resources for Developing PL/SQL Expertise; About the Code; Using Code Examples; Comments and Questions; Safari® Enabled; Acknowledgments; Chapter 1: Introduction to PL/SQL; 1.1 What Is PL/SQL?; 1.2 Basic PL/SQL Syntax Elements; 1.3 Program Data; 1.4 Control Statements; 1.5 Loops in PL/SQL; 1.6 Exception Handling; 1.7 Records; 1.8 Collections; 1.9 Procedures, Functions, and Packages; 1.10 Querying Data; 1.11 Changing Data; 1.12 Managing Transactions in PL/SQL; 1.13 Database Triggers; 1.14 Dynamic SQL and Dynamic PL/SQL; 1.15 Conclusion: From Fundamentals to Applying PL/SQL; Chapter 2: Cursors; 2.1 Reusing Cursors; 2.2 Using Explicit Cursors Versus Implicit Cursors; 2.3 Soft-Closing Cursors; 2.4 Using Cursors for More Than Queries; 2.5 Conclusion; Chapter 3: Table Functions; 3.1 Why Table Functions?; 3.2 Cursors, Pipelining, and Nesting; 3.3 Parallelizing Table Functions; 3.4 Using Table Functions; 3.5 Table Function Examples; 3.6 Tips for Working with Table Functions; 3.7 Conclusion; Chapter 4: Data Encryption and Hashing; 4.1 Introduction to Encryption; 4.2 Encryption in Oracle9i Database; 4.3 Encryption in Oracle Database 10g; 4.4 Key Management in Oracle Database 10g; 4.5 Transparent Data EncryptiondatabasesTransparent Data Encryption in Oracle Database 10g Release 2; 4.6 Cryptographic Hashing; 4.7 Building a Practical Encryption System; 4.8 Conclusion; Chapter 5: Row-Level Security; 5.1 Introduction to RLS; 5.2 Using RLS; 5.3 RLS in Oracle Database 10g; 5.4 Troubleshooting RLS; 5.5 RLS Interactions with Other Oracle Features; 5.6 Application Contexts; 5.7 Conclusion; Chapter 6: Fine-Grained Auditing; 6.1 Introduction to FGA; 6.2 Customizing FGA; 6.3 Administering FGA; 6.4 FGA in Oracle Database 10g; 6.5 FGA and Other Oracle Auditing Techniques; 6.6 The Challenge of Non-Database Users; 6.7 Troubleshooting FGA; 6.8 Conclusion; Chapter 7: Generating Random Values; 7.1 Generating Random Numbers; 7.2 Generating Characters; 7.3 Checking for Randomness; 7.4 Following Statistical Patterns; 7.5 Conclusion; Chapter 8: Scheduling; 8.1 Why Schedule Jobs from Within Oracle?; 8.2 Managing Jobs; 8.3 Managing the Calendar and Schedule; 8.4 Managing Named Programs; 8.5 Managing Priorities; 8.6 Managing Windows; 8.7 Managing Logging; 8.8 Managing Attributes; 8.9 Conclusion; Appendix A: Quick Reference; A.1 DBMS_OBFUSCATION_TOOLKIT; A.2 DBMS_CRYPTO; A.3 DBMS_RLS; A.4 DBMS_FGA; A.5 DBMS_RANDOM; A.6 DBMS_SCHEDULER; Colophon;