When you need random values in the Oracle-world you can get them by using the package DBMS_RANDOM. If not already there, you can install the package with the script “dbmsrand.sql” in “ORACLE_HOME/RDBMS/ADMIN”.

The package offers the two functions VALUE and STRING to generate random values for numbers, strings or mixed cases.

When called without any parameter DBMS_RANDOM.VALUE delivers values between 0 and 1:

To just get odd numbers you have to set “mod(num,2)=1”. But don’t trust that this example will get you ALWAYS a number or a constant number of rows! The modulo is just checked against the result-set of the inner query. If that result-set doesn’t contain a even (or odd) number, it will return nothing.

Usually you shouldn’t do your daily work under an admin-account for security reasons. But from time to time you will have the need to run a certain application or command with administrative privileges.
To keep you from the hassle of switching between your normal- and admin-account you can use the “RUNAS”-command on the command line:

After “/user:” you have to enter the name of your admin-account. Press ENTER and you will be prompted for the password of that account. After that the called program will be started and executed with admin-privileges until you terminate it.

It may be helpful to have a Windows command-shell that is already started with admin-rights, so that every command executed under that shell is “admin” too. You can create a link for the following command to get that shell:

runas /user:johndoe_admin "cmd /T:E0"

The parameter “/T:E0” sets the background-color of that shell to yellow so that you can easily distinguish it from your normal shells and are aware of the excessive rights bound to that shell.

It could be the fact that you are not able to start the explorer.exe with admin-rights. This as annoying when you must set some directory or file permissions or have to use the control panel. The solution for this is to create a link to the Internet Explorer (iexplore.exe):

This command opens the IE with admin-rights, points it to drive “C:” and makes it behave just like the normal file-explorer. As here is no way to make this “admin-explorer” look differently, you should be careful and close it as soon as you no longer need it.

When opening two or more files in MS-Excel, each file is shown as a separate entry in the taskbar. But when you click on each of these entries they are all opened in one single instance of Excel – in one single window.

If you have the need to compare two files you may want to bring them up in two windows – especially when you have two displays connected to your PC. To start a second instance of Excel you can press CTRL while starting Excel via startmenu. If you hold down CTRL too long, you will be prompted if you want to start Excel in protected mode – there should be no need to do so and you can just click “NO”.

The Sunday before we had a switch from daylight saving time (DST) back to normal time (minus 1 hour between 2 a.m. and 3 a.m.). Unfortunately my backup run exactly in that very hour and so I had a backupset whose completion time was before its starting time. My Oracle 9.2 RMAN couldn’t cope with that “paradox” and refused to execute commands like “LIST BACKUP” or “CROSSCHECK BACKUP”.

Metalink, or MOS (My Oracle Support), told me that this is fixed in 10.1.0.2. In 9.2 I should query “rc_backup_piece” for all backups “where start_time > completion_time”: