Submitted by dmann on Sat, 10/04/2008 - 21:59
In past Oracle versions you may have used USERENV() to access some of this information. The information is now available in the 'USERENV' namespace of the sys_context function.
Here is a useful example. When monitoring the current in-flight SQL it is nice to exclude the current query from the results:
Submitted by dmann on Thu, 10/02/2008 - 14:05
I'm still an Application Express beginner -- I'm used to web development that is closer to the HTML. While I am getting used to Apex's Regions and Templates sometimes you just need to build some HTML on your own. I have found some Apex helper functions that can help you whip up an anonymous PL/SQL block that can generate this.
In Apex, add a "PL/SQL" region. You will get a blank textbox where you can enter some PL/SQL code. If you have the Demo application installed you can try this out:
Submitted by dmann on Tue, 09/23/2008 - 11:56
I've been doing some speed testing of rebuilding indexes. I have been adding the PARALLEL
clause to my alter index ... rebuild;
statements but it has been suggested to me to also run multiple indexes rebuilds in parallel. So if I am wanting to run 4 rebuilds in parallel I could try to make 4 .SQL scripts with the appropriate commands. But what if one finishes early? Then I will be left with only 3 running. Here is a solution:
1) Create a table to hold the list of indexes you want to rebuild:
create table rebuild_indexes (
Read more about Manage rebuilding of indexes...
Submitted by dmann on Tue, 08/26/2008 - 13:34
Submitted by dmann on Sun, 07/27/2008 - 21:20
Its time to test some IO.
I have used OraBM/OraStress in the past to throw a load at an Oracle server.
This time I wanted to see what else was out there. I had seen mention of HammerOra on forums and listserves so I figured I'de give it a shot. Here's what it took to get it running on a Windows server.
1) Download and Install HammerOra
Their home page is here: http://hammerora.sourceforge.net/ Read more about HammerOra Quick Start...
Submitted by dmann on Thu, 06/26/2008 - 14:08
Yup. I'm tired of hearing this from users.
Since I changed jobs from a software development house to a more focused DBA role I hear this a lot. As much as I'de like to just log into their app server and comb through logs to find the problem like the old days... I have to debug what I can from the server side and get the app server folks looking from their end.
Here is a quickie script that should work on most Unices.
Submitted by dmann on Thu, 06/19/2008 - 16:53
I had a user that called me about jobs not running on a 9i database. I logged in and found a complete mess. Broken jobs, some DBMS_JOB calls would hang, jobs existed for users that no longer existed (I didn't even know that was possible!).
Because things were such a mess I just wanted to remove all the jobs and start from scratch. But I needed to drop jobs for a user that no longer existed. Using DBMS_JOB even SYS does not have complete control of jobs. How can I remove a job for a user that no longer exists?
Submitted by dmann on Mon, 06/09/2008 - 14:40
So I've got a backup script that runs a BACKUP DATABASE followed by a BACKUP ARCHIVELOG command. The BACKUP ARCHIVELOG FROM TIME command runs to collect all the archived logs created since the beginning of the Level 0.
Submitted by dmann on Tue, 05/27/2008 - 13:22
No, not old customers, old Oracle client software!
I was recently asked to write a ON LOGON trigger for an 18.104.22.168 database (don't ask, it is a very old system). Wrote the trigger, tested it, works no problem. It is never that simple. Read more about Beware of old clients...
Submitted by dmann on Wed, 05/14/2008 - 14:54
Just heard about this software today from a satisfied user. SftpDrive is a software package for Windows that allows you to map a SSH server as a Windows network drive. This enables you to use a Windows PC for development but to modify files directly on a Linux/Unix server.
It costs to register the software but they have a 6 week free trial. Considering the amount of time I could save during development I think I will be adding this tool to my dev workstation: http://www.sftpdrive.com
-- Dave Read more about SftpDrive - map drives to your windows workstation via SSH...