Monday, November 4, 2013

WINDOWS: Add a script to right-click mouse menu

Yup that's right. I'm lazy like that.

I once created a Menu script in windows that sets the PS_HOME and PS_CFG_HOME variables automatically and calls the psadmin executable. This is useful if you have a multiple PS_HOME installation in one windows server (usually the setup for non-production environments.)

Instead of saving the file to my desktop, I added it to the right-click menu of my mouse so I wouldn't have to double click on the file.heh.

Here's how I did it:

Note: You can change the value of those in red font.

1. Open a new notepad and save with a .reg extension.
2. Paste the following lines and edit as appropriate (make sure the script location has double slash):

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\MENU]
@="MENU script"
"Position"="Top"


[HKEY_CLASSES_ROOT\Directory\Background\shell\MENU\command]
@="E:\\MENU\\menu.bat"


3. Save the .reg file then double click on it to add your script.

 

Saturday, November 2, 2013

UNIX: Crontab

*    *    *    *    *  command to be executed
-    -    -    -    -
¦    ¦    ¦    ¦    ¦
¦    ¦    ¦    ¦    ¦
¦    ¦    ¦    ¦    +----- day of week (0 - 7) (0 or 7 are Sunday, or use names)
¦    ¦    ¦    +---------- month (1 - 12)
¦    ¦    +--------------- day of month (1 - 31)
¦    +-------------------- hour (0 - 23)
+------------------------- min (0 - 59)

Friday, November 1, 2013

Oracle Database: How to Know DB Startup time

Another quick information.

In checking when your database was last started, you can run the following command:

select to_char(startup_time, 'DD-MON-YYY HH24:MI:SS') "Startup time" from v$instance;

This is specially helpful when you do not have visibility on the DB side but has sysadm account (which is the ccase for most support guys out there.)