Unix for DBA

May 24th, 2017, posted in Solaris
Share

Below are some of the basic unix commands which will be useful for Oracle DBA.

How to kill all similar processes with single command (in this case opmn)

ps -ef | grep opmn |grep -v grep | awk ‘{print $2}’ |xargs -i kill -9 {}

Locating Files under a particular directory

find . -print |grep -i test.sql

Using AWK in UNIX

To remove a specific column of output from a UNIX command – for example to determine the UNIX process Ids for all Oracle processes on server (second column)

ps -ef |grep -i oracle |awk ‘{ print $2 }’

Changing the standard prompt for Oracle Users

Edit the .profile for the oracle user

PS1=”`hostname`*$ORACLE_SID:$PWD>”

Display top 10 CPU consumers using the ps command

/usr/ucb/ps auxgw | head -11

Show number of active Oracle dedicated connection users for a particular ORACLE_SID

ps -ef | grep $ORACLE_SID|grep -v grep|grep -v ora_|wc -l

Display the number of CPU’s in Solaris

psrinfo -v | grep “Status of processor”|wc -l

Display the number of CPU’s in AIX

lsdev -C | grep Process|wc -l

Display RAM Memory size on Solaris

prtconf |grep -i mem

Display RAM memory size on AIX

First determine name of memory device

lsdev -C |grep mem

then assuming the name of the memory device is ‘mem0’

lsattr -El mem0

Swap space allocation and usage

Solaris : swap -s or swap -l

Aix : lsps -a

Total number of semaphores held by all instances on server

ipcs -as | awk ‘{sum += $9} END {print sum}’

View allocated RAM memory segments

ipcs -pmb

Manually deallocate shared memeory segments

ipcrm -m ‘<ID>’

Show mount points for a disk in AIX

lspv -l hdisk13

Display amount of occupied space (in KB) for a file or collection of files in a directory or sub-directory

du -ks * | sort -n| tail

Display total file space in a directory

du -ks .

Cleanup any unwanted trace files more than seven days old

find . *.trc -mtime +7 -exec rm {} \;

Locate Oracle files that contain certain strings

find . -print | xargs grep rollback

Locate recently created UNIX files (in the past one day)

find . -mtime -1 -print

Finding large files on the server (more than 100MB in size)

find . -size +102400 -print

Crontab :

To submit a task every Tuesday (day 2) at 2:45PM

45 14 2 * * /opt/oracle/scripts/tr_listener.sh > /dev/null 2>&1

To submit a task to run every 15 minutes on weekdays (days 1-5)

15,30,45 * 1-5 * * /opt/oracle/scripts/tr_listener.sh > /dev/null 2>&1

To submit a task to run every hour at 15 minutes past the hour on weekends (days 6 and 0)

15 * 0,6 * * opt/oracle/scripts/tr_listener.sh > /dev/null 2>&1

Share

The Great Gama

May 22nd, 2017, posted in ChARACtERs, DAtEs iN a YeAR, PAKiSTAN, POEPLes
Share

Gama Pehalwan,The Great Gama,World Heavyweight Championship ,Heavyweight Championship ,

The “Great” Gama (born 22 May 1878 – 23 May 1960) also known as “Gama Pehalwan” (Urdu: گاما پھلوان‎) is the stage-name of Ghulam Muhammad Butt (Urdu: غلام محمد بٹ‎).

Born in Amritsar into a ethnic Kashmiri family, he was awarded the Indian version of the World Heavyweight Championship on 15 October 1910. Undefeated in a career spanning more than 52 years, he is considered one of the greatest wrestlers of all time. After Independence in 1947, Gama moved to the newly created state of Pakistan.

Share

Keep Calm And Wish My Son Happy Birthday

May 20th, 2017, posted in DAtEs iN a YeAR, Scarface'S DIARY
Share

Keep-Calm-Happy-Birthday-Son ,Happy Birthday Son,Happy Birthday Hamza,Happy,Birthday

Share

Ways to Open the Windows Task Manager

May 17th, 2017, posted in Windows
Share

Ways to Open the Windows Task Manager,Open the Windows Task Manager,Ways to Open,Windows Task Manager,Windows,Task Manager,Windows 10,Windows XP,Windows 7,Windows Server 2012,

Bringing up Windows Task Manager is not much of a task itself, but when a virus disables Ctrl+Alt+Del and takes it hostage, how else are you going to open task manager? Or maybe you’re just looking for some diversity in your life, so here are six different ways to open Windows Task Manager.


1) Ctrl+Alt+Del

Readers will probably be most familiar with the three-finger salute (AKA Ctrl+Alt+Del). Up until Windows Vista was released, pressing Ctrl+Alt+Del brought you directly to Windows Task Manager. Since Windows Vista, Ctrl+Alt+Del now brings you to the Windows Security screen which provides users with five different options including Windows Task Manager.

Ways to Open the Windows Task Manager,Open the Windows Task Manager,Ways to Open,Windows Task Manager,Windows,Task Manager,Windows 10,Windows XP,Windows 7,Windows Server 2012,


2) Right-Click Taskbar

Arguably the fastest way to bring up Windows Task Manager is by right-clicking the taskbar and choosing the Start Task Manager option. It’s just two clicks and voilà! You’re staring at Task Manager in no time! Of course, you could always create an AutoHotKey script to bring up Windows Task Manager even faster with a click of a button

Ways to Open the Windows Task Manager,Open the Windows Task Manager,Ways to Open,Windows Task Manager,Windows,Task Manager,Windows 10,Windows XP,Windows 7,Windows Server 2012,

 

3) Run taskmgr

The Run command is a great tool for accessing shared folders, but you can also use it quickly up programs such as Registry Editor or a Command Prompt. Click the Start button then the All Programs folder. Under the Accessories folder click the Run command. You can also press they Windows Key + R on your keyboard or enable the Run command in your Start Menu. Finally, simply type “taskmgr” and hit Enter.

Ways to Open the Windows Task Manager,Open the Windows Task Manager,Ways to Open,Windows Task Manager,Windows,Task Manager,Windows 10,Windows XP,Windows 7,Windows Server 2012,taskmgr,dos command

 

4) Ctrl+Shift+Esc

Another quick keyboard shortcut to bring up Windows Task Manager is Ctrl+Shift+Esc. Besides bringing up Windows Task Manager while using Remote Desktop, you can also use Ctrl+Shift+Esc to bring up the task manager while working locally.

Ways to Open the Windows Task Manager,Open the Windows Task Manager,Ways to Open,Windows Task Manager,Windows,Task Manager,Windows 10,Windows XP,Windows 7,Windows Server 2012,taskmgr,dos command

 

5) Browse to taskmgr.exe

This is definitely the longest way of opening the task manager, but if it’s your only option then it’s better than nothing at all. Open up Windows Explorer and navigate to C:\Windows\System32. The location of taskmgr.exe should be the same in all recent versions of Windows. Scroll down (or search) for taskmgr.exe and double click it.

Ways to Open the Windows Task Manager,Open the Windows Task Manager,Ways to Open,Windows Task Manager,Windows,Task Manager,Windows 10,Windows XP,Windows 7,Windows Server 2012,taskmgr,dos command


6) Create taskmgr.exe Shortcut

And last on our list is creating a nice, accessible shortcut to the Task Manager on your desktop. Right-click on your desktop and choose New then click Shortcut. A new window will pop up. Browse to the same path as above, C:\Windows\System32. Scroll down until you see taskmgr.exe, highlight it, and then click OK. Click Next, type a name for your shortcut, and finally click Finish.

Ways to Open the Windows Task Manager,Open the Windows Task Manager,Ways to Open,Windows Task Manager,Windows,Task Manager,Windows 10,Windows XP,Windows 7,Windows Server 2012,taskmgr,dos command

Share

GLOOMY SUNDAY

May 14th, 2017, posted in LYRiCS
Share
GLOOMY SUNDAY
(Rezsô Seress / László Jávor / Sam M. Lewis)

Hal Kemp & His Orch. (vocal: Bob Allen) – 1936
Vincent Lopez & His Orch. – 1936
Henry King & His Orch. – 1936
Paul Whiteman & His Orchestra – 1936
Paul Robeson – 1936
The Albert Sandler Trio with Hildegarde – 1936
Damia Sombre – 1936
Trío Piana-Garza-Kohan (vocal: Mercedes Simone) – 1937
Artie Shaw & His Orch. (vocal: Pauline Byrne) – 1940
Billie Holiday – 1941
Don Byas – 1946
Billy Eckstine & His Orch. – 1946
Charlie Barnet & His Orch. – 1949
Shelly Manne & Bill Russo – 1951
Jerry Wald Orchestra – 1955
Page Cavanaugh – 1956
Leroy Holmes & His Orch. – 1957
Josh White – 1957
Woody Herman & His Orch. – 1958
The Creed Taylor Orchestra – 1958
Mel Tormé – 1958
Ricky Nelson – 1958
Mickey Baker – 1959
Miss Toni Fisher – 1959
Bev Kelly – 1959
Claudia Thompson – 1959
Lorez Alexandria – 1961
The Bob Brookmeyer Orchestra – 1961
Johnny Griffin with Strings & Brass – 1961
Sarah Vaughan – 1961
Dorothy Ashby – 1961
Lou Rawls – 1962
Ketty Lester – 1962
Peter Nero – 1963
Roy Hamilton – 1964
Jimmy Smith – 1965
Herbie Mann – 1966
Stan Kenton & His Orch. – 1967
Carmen McRae – 1967
Anna Black – 1968
Rita Moss – 1968
Ray Charles – 1969
Joanne Vent – 1969
Barbara Dickson – 1970
Big Maybelle – 1973
Jimmy Witherspoon – 1975
Etta Jones – 1977
Elvis Costello & The Attractions – 1981
The Associates – 1982
Marc & The Mambas – 1983
Swansway – 1983
Marc Almond – 1984
Hades – 1984
Peter Wolf – 1985
Christian Death – 1986
Marianne Faithfull – 1987
Serge Gainsbourg – 1987
Abbey Lincoln – 1987
Cats Laughing – 1988
Carol Kidd – 1990
Sarah McLachlan – 1991
Diamanda Galás – 1992
Sinéad O’Connor – 1992
Charles Brown – 1994
Satan’s Cheerleaders – 1994
Gitane Demone – 1995
Lil Darling Hot Club – 1997
Danny Michel – 1998
Satan’s Sadists – 1998
Björk – 1999
Heather Nova (feat. in the film “Ein Lied von Liebe und Tod”) – 1999
The Smithereens – 1999
Sarah Brightman – 2000
Kronos Quartet (feat. in the film “The Man Who Cried”) – 2000
Hans Koller – 2001
Singing Loins – 2004
Eminemmylou – 2005
Angéla Póka – 2006

Also recorded by: Iva Bittová; Genesis; Lydia Lunch;
Branford Marsalis; Jack Walrath & Masters of Suspense.

Sunday is gloomy, my hours are slumberless
Dearest the shadows I live with are numberless
Little white flowers will never awaken you
Not where the black coach of sorrow has taken you
Angels have no thought of ever returning you
Would they be angry if I thought of joining you?

Gloomy Sunday

Gloomy is Sunday, with shadows I spend it all
My heart and I have decided to end it all
Soon there’ll be candles and prayers that are sad I know
Let them not weep let them know that I’m glad to go
Death is no dream for in death I’m caressing you
With the last breath of my soul I’ll be blessing you

Gloomy Sunday

Dreaming, I was only dreaming
I wake and I find you asleep in the deep of my heart, here
Darling, I hope that my dream never haunted you
My heart is telling you how much I wanted you

Gloomy Sunday

*************************

Alternate version with lyrics by Desmond Carter.
As recorded by Paul Robeson; Diamanda Galás; Hildegarde:

Sadly one Sunday I waited and waited
With flowers in my arms for the dream I’d created
I waited ’til dreams, like my heart, were all broken
The flowers were all dead and the words were unspoken
The grief that I knew was beyond all consoling
The beat of my heart was a bell that was tolling

Saddest of Sundays

Then came a Sunday when you came to find me
They bore me to church and I left you behind me
My eyes could not see one I wanted to love me
The earth and the flowers are forever above me
The bell tolled for me and the wind whispered, “Never!”
But you I have loved and I bless you forever

Last of all Sundays

*************************

SZOMORÚ VASÁRNAP
Original Hungarian version with words & music by Rezsô Seress:

Ôsz van és peregnek a sárgult levelek
Meghalt a földön az emberi szeretet
Bánatos könnyekkel zokog az öszi szél
Szívem már új tavaszt nem vár és nem remél
Hiába sírok és hiába szenvedek
Szívtelen rosszak és kapzsik az emberek…

Meghalt a szeretet!

Vége a világnak, vége a reménynek
Városok pusztulnak, srapnelek zenélnek
Emberek vérétôl piros a tarka rét
Halottak fekszenek az úton szerteszét
Még egyszer elmondom csendben az imámat:
Uram, az emberek gyarlók és hibáznak…

Vége a világnak!

*************************

SZOMORÚ VASÁRNAP
Second Hungarian version with lyrics by László Jávor:

Szomorú vasárnap száz fehér virággal
Vártalak kedvesem templomi imával
Álmokat kergetô vasárnap délelôtt
Bánatom hintaja nélküled visszajött
Azóta szomorú mindig a vasárnap
Könny csak az italom kenyerem a bánat…

Szomorú vasárnap

Utolsó vasárnap kedvesem gyere el
Pap is lesz, koporsó, ravatal, gyászlepel
Akkor is virág vár, virág és – koporsó
Virágos fák alatt utam az utolsó
Nyitva lesz szemem hogy még egyszer lássalak
Ne félj a szememtôl holtan is áldalak…

Utolsó vasárnap

*************************

SOMBRE DIMANCHE
French version with lyrics by Jean Marèze & François-Eugène Gonda.
As recorded by Damia; Serge Gainsbourg:

Sombre Dimanche, les bras tout chargés de fleurs
Je suis entré dans notre chambre le coeur las
Car je savais déjà que tu ne viendrais pas
Et j’ai chanté des mots d’amour et de douleur
Je suis resté tout seul et j’ai pleuré tout bas
En écoutant hurler la plainte des frimas

Sombre Dimanche

Je mourrai un dimanche où j’aurai trop souffert
Alors tu reviendras, mais je serai parti
Des cierges brûleront comme un ardent espoir
Et pour toi, sans effort, mes yeux seront ouverts
N’aie pas peur, mon amour, s’ils ne peuvent te voir
Ils te diront que je t’aimais plus que ma vie

Sombre Dimanche

*************************

TRISTE DOMINGO
Spanish version with lyrics by Francisco Gorrindo.
As recorded by Trío Piana-Garza-Kohan:

Triste domingo, con cien flores blancas
Y ornado el altar de mi loca ilusión
Donde mi alma se ha ido a postrar
Mientras mi boca llamándote está
Muere en mi sueños ocasos de hastío
Cansados de espera y de soledad

¡Triste domingo!

Tú no comprendes la angustia terrible
De estar esperando, sin verte, llegar
¡Vuelen tus pasos que debo marchar!
No ves que muero con mi loco afán
Quiero que seas la blanca y piadosa
Mortaja que cubra mi hora final

¡Triste destino!

Querido
Junto a mi ataúd que circundan muchas flores
Aguarda mi confesión un sacerdote
Y a él le digo:
Lo quiero, lo espero.

No temas nada si encuentras mis ojos
Sin vida y abiertos y esperandoté
Tus manos son quien los deben cerrar
Y acaso entonces yo habré muerto en paz
Siento un doblar de campanas, que
Lugubremente sus voces me ordena marchar

¡Triste domingo!

¡Vuela mi vida tu paso querido
Que llega la hora uque debo partir!
Quiero tenerte en mi viaje final
Y algo me dice que no llegarás
Triste domingo visitame amado
Que ahora en mi tumba yo te he de esperar

¡He de esperar!

*************************

TRIVIA:
According to urban legend, “Gloomy Sunday” has inspired hundreds of
suicides. When the song was first marketed in the USA in 1936, it
became known as “The Hungarian Suicide Song”. Supposedly after
hearing it, distraught lovers were hypnotised into jumping straight
out of the nearest open window, overdosing on barbiturates, or
blasting themselves in the head with a revolver. But there is no
known legitimate press coverage, or other documentation where any
such allegations appear, to substantiate such claims of suicides.
This urban legend appears to have been originally generated as a
marketing gimmick by song pluggers. However, Rezso Seress, the song’s
composer, did indeed commit suicide, jumping to his death from a
Budapest building in 1968.

*************************

Share