Wednesday, March 3, 2010

How do I Extract tar file?

We can use the below command to extract .tar file:

tar -xvf filename

We can use the below command to unzip the .gz file:

/usr/local/bin/gunzip -d filename

Monday, March 1, 2010

Script to Submit Oracle Job on Every Sunday

Description:
I used the below script to Schedule the job the Every Sunday 3 AM.

Script:
#### Script Starts Here ####

VARIABLE jobno NUMBER;
BEGIN
DBMS_JOB.SUBMIT(:jobno, 'SCHEMANAME.PACKAGENAME.PROCEDURENAME;', TRUNC(NEXT_DAY(SYSDATE,'SUNDAY'))+3/24,'TRUNC(NEXT_DAY(SYSDATE,''SUNDAY''))+3/24 ');
COMMIT;
END;
/
#### Script Ends Here ####