Did You Know? -- May 2000

By Hervé Deschamps, Oracle Corporation.




The book from the creator of Java: The Java Programming Language, Third Edition (The Java Series), by Ken Arnold and James Gosling.

If you need to interact with the operating system of the database server from your Java procedures (e.g. create, update, delete files) you will need to be granted the following roles: javasyspriv and javauserpriv.

When you use the loadjava command to load your Java classes into the database, the Java source code is not transferred into the database. Only the .class, .jar, .zip, .java, etc. files are moved into the database -- just binary stuff. To get the source in there you need to use the create java DDL command.


Did you know what Portal-to-Go actually does (10,000 foot level view).

anySource1 (like HTML)
(for Pager, Cell Phone, Palm Stuff, regular PC)
anySource2 (like flat file)
anySource3 (like DB table)
anySourcen (even email!!!)


When you use dynamic SQL and you expect good performance, make sure that you use bind variables instead of just concatenating the variable parts of the SQL statement, otherwise you will end up with different statements in the SGA, i.e. not re-use.

If you ever need to build your own hash-value index, make sure to check out the dbms_utility.get_hash_value function.

If you need PL/SQL help, don't forget the PL/SQL pipeline - great free forum at http://www.revealnet.com/plsql-pipeline/index.htm.

Good one for DBAs: you can now define database triggers to respond to such events as schema level CREATE, DROP, ALTER.

It is now possible to issue commits and rollbacks from a database trigger as long as you are within an autonomous transaction (8i). This is useful for things like counting the number of times a user attempted to update a given record.

Using autonomous transaction (8i) it is also now possible to call stored functions from a select statement without having to guarantee the 2 purity levels RNDS and WNDS.

Deterministic functions: what are they? They a programs that will always return the same value given the same parameter values. What's the big deal? Well, the database can avoid executing the same function with the same parameters if it remembers the value returned by the last execution with those same arguments.

CAST: what is it? It is a single command that converts one expression or variable into a different datatype. Cast replaces to_char, to_number, to_date, etc. The syntax is cast (expression as type). Example: dbms_output.put_line(cast('1/1/99' as date));


Did you know that Designer 6i has two "unique" identifiers:

IRID can be shared by several versions of the same object but it is unique within the context of a workspace.

There is a way to get the web generator to call your stored functions for a default value against a bound item. Put this in the default value property: '||myPackage.myFunction||' and the generated code will be FORM_VAL.MY_FIELD := ''||myPackage.myFunction||''. The idea was published by Sten Vesterli in Oracle Professional, May 2000. 

Hervé Deschamps is a Technical Manager with Oracle Corporation. Over the years he has developed a number of applications using Oracle Development Tools and others.  He has an extensive experience of all phases of the development life cycle. He is also known in the technical community for his article publications centered around best custom development practices and for his user group presentations. You can reach him by e-mail at hdescham@us.oracle.com. He also maintains a web site full of articles, scripts, tips and techniques at http://www.iherve.com.