January 2013
1 post
6 tags
Button Hotkeys in SQL Developer on OS X
In Windows, most applications provide menu and button accelerator keys that allow you to control the application without having to use a mouse. Java Swing apps like SQL Developer allow you to do the same, ostensibly in a cross-platform compatible manner.
One place I use this frequently is the Enter Binds dialog window that pops up when running a query using bind variables.
In Java 6 on OS...
December 2012
2 posts
8 tags
Using Jaspersoft’s free iReport Designer tool and the open source PL-JRXML2PDF project, you can generate PDF reports from Oracle Apex for free, without having to install the JasperReports and JasperReports Server components. Watch my video tutorial to find out how.
November 2012
3 posts
3 tags
Query an XML File Like An External Table
Oracle’s external table feature allows you to treat structured files on the database server as tables for query and DML purposes. To use an example from the linked documentation, a tab-delimited file like this:
56november, 15, 1980 baker mary alice 09/01/2004
87december, 20, 1970 roper lisa marie 01/01/1999
…could be queried like...
Restricting Access to BI Publisher Reports
In my last post I described how to configure BI Publisher to authenticate against an LDAP server, typically a corporate Active Directory server. Aside from authentication, you can also use LDAP group membership to determine who has access to a given report. Here’s how you do it.
Create a group in your LDAP/AD directory and assign your target users to that group.
Revisit your LDAP...
4 tags
Configure Oracle BI Publisher to Authenticate With...
Log in to BI Publisher as an administrator.
Click on the Admin tab.
Click on Security Configuration.
For Security Model, choose LDAP and enter the following parameters:
Setting
Example Value
URL
ldap://ad.mycompany.com:389 Your company’s LDAP server and port.
Administrator Username
CN=ADMIN,OU=Users,OU=Shared Services,DC=mycompany,DC=com The fully qualified DN of the account you...
October 2012
1 post
Use Firebug's console.debug Command to Analyze...
Occasionally when debugging my Javascript code I need to be able to analyze the properties of an unknown object; for instance, an unexpected DOM object passed to an event handler. How do you analyze the properties of an object when you don’t know what the object is? I was looking for a way to list all the properties of a generic Javascript or DOM object when I stumbled across this blog post...
August 2012
1 post
2 tags
BI Publisher: "Job scheduling failed because the...
You can get this error if you are trying to schedule a report and your BI Publisher installation uses LDAP authentication.
To avoid it, make sure that the “Administrator” account you use to connect to your LDAP server is in the XMLP_ADMIN group. The LDAP settings are located on the Admin tab, under Security Settings / Security Configuration.
July 2012
4 posts
Fix for Page Load Issues in Safari 5.1.7 →
Lately I had been experiencing strange problems when clicking on links in Safari 5.1.7. Usually the progress indicator would appear for only a second with no obvious results, or else never appear at all. Pages would sometimes load, but after an unusual delay and with no indication that the browser was actually doing anything. I switched to Chrome as my default browser for a few days, but that was...
3 tags
Easy Fix for High CPU Usage in SQL Developer on OS...
I’ve been fighting for a couple of years now with an annoying performance bug in SQL Developer for OS X. After using the application for a while CPU usage would spike to around 100%, even when idle. This is a known issue associated with the “Look and Feel” preference.
[[MORE]]
Basically, don’t use the “Mac OS X” setting. Instead, use the...
9 tags
Run Oracle Forms 11g Applications on OS X Lion
Need to run your company’s Oracle Forms application from your Mac, and can’t? Annoyed with having to crank up a virtual machine for just that one task? Even with the latest published Java version for OS X (1.6.0_33, as of today), you may find that some of the newer Forms applications just won’t run. Well, fret no longer. A solution may already be here, at least for Safari and...
2 tags
Use a Perl CGI Script to Show Real Web Server Host...
Here is a short and simple Perl CGI script that you can use to expose the hostname of your web server, as opposed to just the server/domain portion of the URL string:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print `hostname`;
1;
[[MORE]]
Name the file something like hostname.cgi and place it in your web server’s /cgi-bin/ directory, or if your web server is configured...
June 2012
3 posts
3 tags
OS X Software for Oracle Developers
One of the great things about working for Enkitec is that it’s a very Mac-friendly shop. When I arrived there in 2007 there were a handful of us running Macs and the attitude at the top seemed to be respectful, but skeptical. They allowed me to use my own laptop, which at the time was a 15-inch Intel Core2 Duo Macbook Pro, with the understanding that I could request a standard-issue Dell...
2 tags
DML Error Logging
Introduced with Oracle 10gR2, DML Error Logging allows you to make standard SQL INSERT, UPDATE, and MERGE statements behave more like the SQL*Loader utility, logging errors to a table rather than failing and rolling back the first time an error condition is encountered.
[[MORE]]
The syntax is the same for all DML statements. Just add the following clause to the end of your DML:
LOG ERRORS
...
The Database Is More Than Just Storage →
To folks writing database-driven reports for the web: Craig Shallahamer shows why you should let the (Oracle) database handle as much of your selection and transformation logic as possible.
May 2012
4 posts
SQLFiddle.com: An Online Multi-Vendor SQL... →
Build your own mini-schema and run queries against it. Publish your experiments for your friends to tweak. Or try out the examples from your favorite SQL book without having to build a database first. Works for Oracle, PostgreSQL, MySQL, and SQL Server flavors. Pretty cool!
5 tags
Oracle's App Server Offerings: A High-Level...
Ran across this post from the Dutch software and services company Yenlo that compares and contrasts Oracle’s major application server offerings. It would serve as a good starting point for deciding whether you truly need to pay the enormous licensing costs associated with a professional-grade application server platform, or if you were just wondering how to reconcile the continued existence...
ODBC Connection Fails for MS Access App on Citrix
I ran into an interesting problem recently when attempting to publish an MS Access application with Citrix XenApp. The application pulled data from an Oracle database, so an ODBC connection was created on the Citrix server. What we found was that when a non-privileged user tried to run the application, the connection failed. When the Citrix server admin ran it, however, it worked. Furthermore, as...
8 tags
Discovering Command-line Java Profiling Tools
At my current client I am responsible for administering a third-party Java appplication that unfortunately generates a lot of performance complaints. It’s a multi-tiered system with the middle-tier running on Oracle Appication Server 10.1.3. I am already familiar with GUI profiling tools like jconsole and jvisualvm, both of which are included with Oracle’s JDK, and I have played around...
April 2012
4 posts
6 tags
Table Functions: 9i Feature Worth Revisiting (Part...
In part I of this series I showed a simple example of how table functions can be used to treat PL/SQL collection types as tables in a SQL query. We used a nested table collection type to which we manually added a few entries. In this example, I intend to show a more practical use of table functions using all three PL/SQL collection types: associative arrays, nested tables, and VARRAYs.
...
6 tags
Table Functions: 9i Feature Worth Revisiting (Part...
Yes, they’ve been around for a while, but if you haven’t made use of table functions lately you might want to reacquaint yourself with this old gem. Table functions allow you to query the contents of PL/SQL collection types using SQL’s TABLE operator. Here is a simple example.
[[MORE]]
CREATE OR REPLACE PACKAGE example AS
TYPE nested_table_typ IS TABLE OF...
8 tags
Get Oracle Instant Client Working on Mac OS X Lion
CJ Travis has an excellent and thorough article on installing Oracle Instant Client on Mac OS X 10.7. The gist: you have to install the 32-bit version. As a bonus, he tells you how to download and install the handy rlwrap command line utility, which gives you the ability to navigate the statement history in SQL*Plus in a very bash-like fashion, using the up and down keys.
5 tags
Make bash scripts crontab-compatible
When writing shell scripts in bash, consider whether your script can be automated in a batch scheduler like cron. If you reference any external resources in your script relative to the directory in which it resides, those references may break when running your script through cron.
By default, crontab runs scripts in the user’s home directory, as specified in /etc/passwd. For user...
March 2012
1 post
10 tags
Invalidating Toplink Session Cache To Avoid Stale...
Toplink is a Java framework that maps objects to database tables. It is the reference implementation for the Java Persistence Architecture, or JPA. Developers use Toplink to manage data persistence (storage), queries, and transactions in an Oracle database. By default, Toplink makes use of a special cache called a Session Cache, maintained on the server, which is meant to speed up performance....