Gert-Jan Paulissen
(0 comments, 9 posts)
This user hasn't shared any profile information
Posts by Gert-Jan Paulissen
Profiling PL/SQL met het package dbms_profiler (dutch)
Oracle biedt sinds Oracle 8i via het package DBMS_PROFILER ondersteuning voor profiling. In dit artikel, dat ook in Optimise zal verschijnen, zal dit package onder de loep genomen worden en zal het pldbg package geoptimaliseerd worden waarbij het gebruik van dynamisch PL/SQL wordt verbeterd en conditionele compilatie wordt gebruikt om de veranderingen te testen.
Zie voor documentatie en code: PLDBG version 2.0.0
Debugging PL/SQL met DBMS_DEBUG (dutch)
Oracle biedt
sinds Oracle 8i via het package DBMS_DEBUG ondersteuning voor debugging. In dit artikel, dat ook in Optimise zal verschijnen, zal dit package onder de loep genomen worden en zullen de volgende
toepassingen gepresenteerd worden: een interactieve debugger in SQL*Plus en het
automatisch tonen van waardes van in en out parameters bij begin en einde van
stored (package) functions/procedures (methodes).
Zie voor documentatie en code: PLDBG version 1.0.0
Optimising Oracle (Performance by Design) – Day 1
From 21
February till 23 February the OakTable seminar Optimising Oracle (Performance
by Design) by Jonathan Lewis was held. The seminar had been organised by Lex de
Haan, who recently died, and his wife, Juliette Nuijten, from Naturaljoin (http://www.naturaljoin.nl). Despite his
death the seminar continued, just as Lex wanted. Naturaljoin will continue to
organise seminars. There were 82 attendants, an all-time high record for Naturaljoin.
The guest
speaker was Jonathan Lewis, an independent consultant who has written a few
Oracle books, including Cost-based Oracle fundamentals (part one in a volume of
three). Jonathan is a very good speaker with lots of humour and details. This
was a big plus since not all the stuff was always that interesting for all the
people. His motto is: don’t believe it because it is written in the book; just
learn how to discover, because Oracle keeps changing (even with patch
releases).
Improve your Web Forms deployment using the Java JDAPI library
Did you (or one of your customers) ever encounter ORA-00942 (table or view does not exist) while working in a (Web) form? No, then you can skip this post.
DB utilities – splitting generated DDL scripts
Have you ever tried to split the DDL scripts generated by Designer? Pretty tough, isn’t it? Well, I have a nice solution for you: the Perl script sql_split.pl splits the input DDL script(s) as if you had chosen to generate just one object in Designer. For example: if you generate all objects in your application system to cdsddl scripts, Designer generates cdsddl.tab, cdsddl.pks, cdsddl.ind, etc. Now the command:
perl sql_split.pl cdsddl.*
generates the following files:
- TABLE1.tab, TABLE2.tab, …
- PACKAGE1.pks, PACKAGE2.pks, …
- TABLE1.ind, TABLE2.ind, …
Conclusion: the sql_split.pl utility enhances installation, version control and release management of DDL scripts. Due to the fine grained nature of the splitted scripts it is also possible to partially install an application.
DB utilities – Oracle JPublisher enables you to easily access PL/SQL from Java
The tool JPublisher is a little bit unknown. But it is a very handy tool for accessing PL/SQL stored procedures, packages, functions as well as object, collection or reference types from Java. There is no need for writing error prone Java code when you need to access those objects: JPublisher just creates the Java code you need. Lately I used JPublisher to create a Java class for accessing the DDL of database objects. The package DBMS_METADATA contains a GET_DDL function which returns a CLOB containing the DDL you have asked for.
Integrating Ant and Checkstyle
The Open Source Java code checker Checkstyle can be easily used by Ant to check your Java code.
This is an excerpt from an Ant build.xml file using the Sun Java coding checks:
<property name="checkstyle.home" location="..."/>
<taskdef resource="checkstyletask.properties" classpath="${checkstyle.home}/checkstyle-all-3.5.jar"/>
<target name="checkstyle">
<checkstyle config="${checkstyle.home}/sun_checks.xml" failOnViolation="false" classpathref="classpath">
<fileset dir="${src.dir}" includes="**/*.java"/>
</checkstyle>
</target>
See also the manual of Checkstyle. Please note that JDeveloper has Audit Rules for Java code, but I do not know how to check those Rules with Ant.
DB utilities – updating sequences the elegant way
Ever needed to update a sequence so the next value is greater than the maximum value of a table? Well, the quick and dirty ways are
-
select SEQ.nextval from dual;
(ever did this a million times?)
-
drop sequence SEQ; create sequence SEQ start with MAX+1;
(never had problems with grants and invalided stored procedures?)
If you’re interested in a more elegant and robust way… (more…)
XML DB basic demo experience
Introduction
Last week I have been investigating the XML DB basic demo at OTN (http://www.oracle.com/technology/tech/xml/xmldb/9.2.0.2.0/index.html, Downloadable Demo). Unfortunately there is also a similar but older demo at http://www.oracle.com/technology/sample_code/tech/xml/xmldb/index.html (Oracle9i R2 XML DB Demonstration).
The demo shows a lot of XML DB stuff. It is quite comprehensive with a few installation quirks. Those quirks may have been caused by using a brand new Windows XP laptop and an Oracle 10g database. (more…)
Recent Comments