TABLE OF CONTENTS 1) Pop Quiz (answer at the end) 2) Did You Know... 3) Coming up in Oracle Professional 4) PL/SQL Tip 5) New Product Information 6) Answer to the Pop Quiz --------------------------------------------------------- 1) POP QUIZ (answer at the end) --------------------------------------------------------- How do you copy text from within SQL*Plus? --------------------------------------------------------- 2) DID YOU KNOW... --------------------------------------------------------- ...that the Rule Based Optimizer (RBO) is de-supported with Oracle Database 10g? It's still available in the database, but Oracle is moving away from it quickly and there won't be any bug fixes associated with it. This means that the collection of database statistics is increasingly important, and Oracle offers new statistics-gathering features in Oracle10g. Stay tuned to this eNewsletter and Oracle Professional for more details on this topic as well as other Oracle 10g features. --------------------------------------------------------- 3) COMING UP IN ORACLE PROFESSIONAL --------------------------------------------------------- In the July issue of Oracle Professional, Oracle expert Steven Feuerstein introduces us to the new features of nested tables in Oracle10g. Also, Dan Hotka discusses the new Tablespace options introduced in Oracle10g, and Darryl Hurley explains how to use DDL triggers to save changes to PL/SQL source code. There's also an interview with the IOUG President and Vice President and some highlights from the conference. To find out more about Oracle Professional and sign up for a free trial subscription, visit http://www.pinpub.com/html/main.isx?sub=75. --------------------------------------------------------- 4) PL/SQL TIP --------------------------------------------------------- This month, we look at how to wrap your PL/SQL source code (just like how the experts, Oracle, do it). First off, why would anyone consider wrapping their code? Well, it prevents misuse of your application by other Developers, and hides your algorithms from business competitors or customers who may otherwise try to modify the code. So here are the steps: At the OS prompt (I used DOS for my Windows-based database), type: wrap iname=<> oname=<> EXAMPLE: C:\oracle>wrap iname=c:\course\test.sql oname=c:\course\wrap_test PL/SQL Wrapper: Release 9.2.0.1.0- Production on Thu May 06 13:37:11 2004 Copyright (c) Oracle Corporation 1993, 2001. All Rights Reserved. Processing c:\course\test.sql to c:\course\wrap_test.plb Then compile the file (wrap_test.plb) in the database: SQL> @wrap_test.plb SQL> CREATE OR REPLACE PACKAGE body course_maint wrapped 2 0 3 abcd 4 abcd 5 abcd 6 abcd 7 abcd ... Call a function within the code to see if it works properly: SQL> begin 2 IF course_maint.check_overlap(1008,1009) 3 THEN util.putl('1008 and 1009 overlap'); 4 END IF; 5 end; 6 / 1008 and 1009 overlap PL/SQL procedure successfully completed. Great -- it works! Now let's see whether we can see the source from user_source: SQL> select line, text from user_source where name='COURSE_MAINT'; LINE TEXT ---------- ------------------------------------------------------ 1 PACKAGE body course_maint wrapped 0 abcd abcd abcd abcd abcd ... No, the code is completely hidden from any users. Just what we wanted! Note that not all SQL syntax is supported by the wrap utility by default. If you run into this, specify the option edebug=wrap_new_sql. -------------------------------------------------------- 5) NEW PRODUCT INFORMATION -------------------------------------------------------- From database auditing software provider Lumigent Technologies comes Entegra for Oracle. This software creates audit reports on changes to an Oracle database to help enterprises meet the compliance requirements of Sarbanes-Oxley, SEC 17a4, HIPAA, FDA 21 CFR Part 11, EUDPA, the USA Patriot Act, and more. Entegra for Oracle provides a comprehensive alternative to traditional data auditing means: application modification, database triggers, mid- tier portals, and packet sniffing, all of which are expensive, difficult to create and maintain, impact database performance, or do not identify all database vulnerabilities. Entegra for Oracle is available immediately from Lumigent Technologies with support for Oracle8i and Oracle9i platforms on UNIX and Microsoft Windows operating systems. This release supports Solaris; future versions in 2004 will support HP-UX and Linux. For more information about this product, visit Lumigent's Web site at http://www.lumigent.com. --------------------------------------------------------- 6) ANSWER TO THE POP QUIZ --------------------------------------------------------- Well, the obvious answer if you're using the Windows version of SQL*Plus is to use the Ctrl and C/V keys. Simply highlight the text you want to copy with your mouse (holding down the left mouse key while you highlight the text), and then hit the Ctrl key and the C key at the same time. Many people will hold the Ctrl key down first, then hit the C key while holding it down. This puts the highlighted text into the Windows clipboard. Now you can "paste" the text wherever you want. For our purposes, we'll paste the text at the SQL Prompt, by holding the Ctrl key again, but this time hitting the V key. This copies the contents of the clipboard. This is useful if you want to copy text (like a call to execute a script on your server) many times; for example, when I have to promote code onto multiple production servers, I execute the same script multiple times (for each database connection). A quicker approach to copying text is to highlight the text you want to copy with your left mouse button, and then (without moving your mouse or releasing the left mouse button) click the right mouse button. This does a quick copy of the text down into the SQL Prompt. Now, it's a little tricky at first to get used to, but once you do, you'll love this technique, as it will save you lots of time retyping your text.