DB Capacity Plan

Posted: ઓગસ્ટ 28, 2017 in અવર્ગીકૃત

CREATE OR REPLACE FORCE VIEW “CAPACITY_PLNG” (“Tablespace”, “Max Size”, “Current Size”, “Current Free Space”, “Current Used Space”, “Used Space using Max Size”, “Growth Rate”, “Months_of_Survival”, “Space to be added for 6 mnths”, “Space to be added for 12 mnths”, “Datafile Name”, “Autoextensible Yes/No”) AS
SELECT capacity_plng.”Tablespace”,
TRUNC(capacity_plng.”maxSize”,2) “Max Size”,
TRUNC(capacity_plng.”Size”,2) “Current Size”,
TRUNC(capacity_plng.”Free”,2) “Current Free Space”,
TRUNC(capacity_plng.”Size” – capacity_plng.”Free”,2) “Current Used Space”,
TRUNC(capacity_plng.”maxSize” – capacity_plng.”Free”,2) “Used Space using Max Size”,
growth_rate.GROWTH_RATE “Growth Rate”,
TRUNC(capacity_plng.”Free”/DECODE(growth_rate.GROWTH_RATE,’0′,’1′,growth_rate.GROWTH_RATE)) “Months_of_Survival”,
DECODE(SIGN(TRUNC(((capacity_plng.”maxSize” – capacity_plng.”Free”) + 6* growth_rate.GROWTH_RATE)*100/75 – capacity_plng.”maxSize”,2)),-1,0,TRUNC(((capacity_plng.”maxSize” – capacity_plng.”Free”) + 6* growth_rate.GROWTH_RATE)*100/75 – capacity_plng.”maxSize”,2)) “Space to be added for 6 mnths”,
DECODE(SIGN(TRUNC(((capacity_plng.”maxSize” – capacity_plng.”Free”) + 12* growth_rate.GROWTH_RATE)*100/75 – capacity_plng.”maxSize”,2)),-1,0,TRUNC(((capacity_plng.”maxSize” – capacity_plng.”Free”) + 12* growth_rate.GROWTH_RATE)*100/75 – capacity_plng.”maxSize”,2)) “Space to be added for 12 mnths”,
ddf.file_name “Datafile Name”,
ddf.autoextensible “Autoextensible Yes/No”
SELECT df.tablespace_name “Tablespace”,
df.bytes / (1024 * 1024) “Size”,
SUM(fs.bytes) / (1024 * 1024) “Free”,
df.maxbytes / (1024 * 1024) “maxSize”
FROM dba_free_space fs,
(SELECT tablespace_name,SUM(bytes) bytes, sum(decode(maxbytes,0,bytes,maxbytes)) maxbytes
FROM dba_data_files
GROUP BY tablespace_name) df
WHERE fs.tablespace_name (+) = df.tablespace_name
GROUP BY df.tablespace_name,df.bytes,df.maxbytes
SELECT fs.tablespace_name tspace,
fs.bytes / (1024 * 1024),
SUM(df.bytes_free) / (1024 * 1024),
FROM dba_temp_files fs,
(SELECT tablespace_name,bytes_free,bytes_used
FROM v$temp_space_header
GROUP BY tablespace_name,bytes_free,bytes_used) df
WHERE fs.tablespace_name (+) = df.tablespace_name
GROUP BY fs.tablespace_name,fs.bytes,fs.maxbytes) capacity_plng, GROWTH_RATE, dba_data_files ddf
where capacity_plng.”Tablespace” = growth_rate.TABLESPACE
and capacity_plng.”Tablespace” = ddf.tablespace_name
and ddf.file_id = (select max(file_id) from dba_data_files ddf_in where ddf_in.tablespace_name = ddf.tablespace_name)
ORDER BY capacity_plng.”Tablespace”;






INSERT INTO tablespace_stats
SELECT utl_inaddr.get_host_name,sysdate,a.tablespace_name,
ROUND (a.bytes_alloc / 1024 / 1024, 2),
ROUND (NVL (b.bytes_free, 0) / 1024 / 1024, 2),
ROUND ((a.bytes_alloc -NVL (b.bytes_free, 0)) / 1024 / 1024, 2)
(SELECT f.tablespace_name, SUM (f.BYTES) bytes_alloc,
SUM (DECODE (f.autoextensible,’YES’, f.maxbytes,’NO’, f.BYTES)) maxbytes
FROM dba_data_files f where tablespace_name not like ‘UNDO%’
GROUP BY tablespace_name) a,
(SELECT f.tablespace_name, SUM (f.BYTES) bytes_free
FROM dba_free_space f where tablespace_name not like ‘UNDO%’
GROUP BY tablespace_name) b
WHERE a.tablespace_name = b.tablespace_name(+);




That man from the match

Posted: એપ્રિલ 9, 2011 in Short Stories

“Who on earth started the match so loud on TV, can you please keep it low??!!” I screamed as there was a big roar of the crowd started around me all of a sudden. It’s horrible when someone starts TV when you haven’t slept for 3 consecutive days and finally you have got a chance to get some sleep. I just hate it. “Now just switch it off, whoever it is, and just bloody switch off!!” I again shouted.

“Hey hey… hey dude, Are you insane?? How can you sleep when such an existing match is going on and that is too when more than 20000 people are making noise around you? Come on, wake up…Man!!” person beside me woke me up in a very exciting tone. You must be thinking that I am kidding but even I got a shock when I saw that I was sitting in a stadium where an actual match was ongoing instead of TV and that too I was sleeping there, I was very embarrassing.

That guy was very excited about the match and was cheering the up the players with a loud voice and lots of whistle. “Earth Earth Earth!!” he was shouting, “Go Earth, go”. It was a cricket match and it looked to be very interesting by the roar and the cheers of the crowd. But I was a little bit confused listening people cheering up shouting “Earth”.  But I just ignored thinking that it might be a match between Earth and some other planet some creepy aliens. Hehe. Yeah I know that was a bad joke but stop cursing me. People around me were shouting “Earth Earth” not me!! So now listen further.

“So hey, Khumbhkarn… which team do you support?” the guy asked me.

“Of course, INDIA!! Whom else I can support, huh? I know I was sleeping but I can see Tendulkar’s century on the big screen so surely it’s India’s match.” I replied trying to show some smartness.

“Wait a minute!! What am I seeing??!! How on earth Afridi’s name is there? What is going on, have I gone mad??” I was shocked by looking at Tendulkar and Afridi’s name together on the score board.

“Ohh come on!! From which century are you from!! 21st?? You have still not come out of that so called ‘I support my country’ thing??” he disgusted on me like I am an 19th century man with an orthodox nature with a totally narrow mind who will always fight for ‘My Cast’, ‘My state’ and all.

“Grow up Man!!” he shouted.

“What do you mean by Grow up? Where are you from? Why shouldn’t I support my country, huh?”

He gave me a weird look and

“Today world has reached don’t know how many light years far, fought how many battles with all sort of creepy aliens. Now finally one good guy has come up with a great idea to stop all that and to start walking on the way of peace and that is sharing of sports, music and all,  to find a common place to get together and know each other.” He explained.

“And you are still talking about country? After how much hard work and how many sacrifices we have come out of that fight of ‘My state, my country’. After so many struggles we have become one, the world our one family.” He was just not stopping.

“Udaracharitanam tu vasudhaiva kutumbakam, your Indian literature only says that. It means ‘This is my own relative and that is a stranger’ – is the calculation of the narrow-minded; for the magnanimous-hearts, however, the entire earth is but one family’. You are an Indian how can you forget it if you are so proud of your country?” He was right, I understood.

“You know what, I am really sorry!! I was wrong, I forgot my own values but I am still confused. What kind of match is this, is this like world 11 vs some other team? Who is the opponent team?” I asked.

“You really don’t know, do you? Or it’s just that you want to make me fool, I know it’s 1st April.”

“No seriously, tell me who the two teams are?”

“Ok, I tell you. One is as you said; it is world rather Earth 11 and the other team is from Sirius, the star around 8.5 light yeas far from earth. And you know what they are always serious. :)”

I stood up to check out the serious team “The Sirius” and I started sweating, my head started spinning and that’s it, I collapsed.

And the song started, “I am not a perfect person, there’re many things I wish I didn’t do…” Hey, it was my alarm. I woke up and I was just in a big shock, sort of hangover like I completed the entire JD bottle in the night. My head was paining like hell; I took some pills and sit. But then I remember that we have an India-Pakistan match. I started TV but my mind was somewhere else. I was not able to stop thinking about the dream I had. I thought for a long time and then I realize that the man from that match was right, he was the real man of the match. What are we doing, why are we fighting for a piece of land, sometimes it’s our state and sometimes it’s our country. It’s all ours; we are all together, we are one family. So please join hands, forget all past, get together, and we will make our ShatraS true. We will make one earth one family, our “Vasudhaiv Kutumbakam”.


Posted: ડિસેમ્બર 6, 2010 in Short Stories

It was Friday, 16th December, the environment was very pleasant. I was sitting in my room and cold breeze was coming from the balcony door and the window. My phone rang and I thought who might have called now!! I picked up the call and started running towards the balcony of my 5th floor flat and saw down. Two boys were standing face to face against each other. One was wearing blue denim jeans and white t-shirt with a brown shirt over it. Other was wearing black leather jacket with aviator look goggles on it. Suddenly the 1st boy pushed with a force and the other boy and he fell down on the ground. The environment started changing, instead of breeze the wind started blowing heavily. The environment was all different, the boy stood up from the ground, he looked very angry and all his face become red with anger and rage. He attacked the other boy and they started hitting each other harder and harder.

I was stunned by looking at it. I ran inside the flat, opened the main door and started going down via stairs.

They both fell down on the earth and trying to hit each other hard, they were rolling on the ground trying to stab each other’s neck. I reached on the fourth floor. I was trying to run as fast as possible.

The boy with the leather jacket kicked other boy and both were departed. Third floor.

They both stood up and ran against each other as fast as possible with a force to hit hardest. Second floor!!

The boy in blue jeans holds other boy’s neck with one hand and left hand with other. The other boy was trying to take hand of that boy from his neck with his right hand but he has held it very tight. He was getting dragged towards the wall. I reached just on First floor yet one more to go!!

There was a sharp nail on the wall towards which they were getting dragged. Wind was blowing very heavily and there was dirt everywhere in the air. They both were very close to the wall and the nail. Finally I reached the ground floor and ran out of the building. I reached out of the main gate but till then all over. The director shouted cut and the scene was complete. Both the boys were sitting on the chair and make up man was removing their makeup. It was pack up for the day. I was very angry why didn’t my friend inform me about the shooting early. I missed the whole scene.

તુ તો નહિ પણ…

Posted: એપ્રિલ 3, 2010 in કવિતાઓ

તુ તો નહિ પણ તારો મેહબુબ મળી જાય છે,

ક્યારેક અરીસામાં તો ક્યારેક ચાની લારી પર ભટકાય છે.

અરીસાવાળો [હું પોતે] તો હંમેશા ગાળો જ ખાય છે [પ્રેમ વ્યક્ત ન કરવા માટે],

પણ સાથે ગર્વ પણ થાય છે જ્યારે એનું બલિદાન દેખાય છે.

બીજાની [મેહબુબાનો પ્રેમી] તો વાત જ શું, ગાળો સાથે દુઆ પણ લેતો જાય છે,

સુખે થી રાખે તને, ભવિષ્યમાં તારો પતિદેવ થાય છે.

ફરક એટલો જ છે બન્નેમા [પ્રેમીઓમાં],

એક તને તો બીજો તારી યાદ લેતો જાય છે.

તારા અને તારી યાદમાં પણ એજ ફરક છે કે,

તુ ક્યારેક જ, પણ તારી યાદ હમેશા મારો સાથ આપી જાય છે.


Posted: એપ્રિલ 3, 2010 in સરસ વસ્તુઓ

રમેશ પારેખની રચના જોવા મળી ફેસબુક પર, તો મને થોડુ ઉમેરવાની ઇછ્છા થઇ.

થોડોક ભૂતકાળ મેં આપ્યો હશે કબૂલ, તું એને ધાર કાઢીને પાછો ન મોકલાવ – રમેશ પારેખ

મારા તરફ્થી,

મોકલાવે તો વાંધો નહિ, પણ ભુંસીને ફરી લખવા માટે નવાને બદલે એ જ જુના પત્તાં મોકલાવ

I hope that I have not spoiled Rameshji’s રચના.


Posted: સપ્ટેમ્બર 5, 2008 in કવિતાઓ

ક્યારેક સારાં શબ્દોની, તો ક્યારેક સારાં વર્તનની અપેક્ષા,

ક્યારેક મિત્ર પાસે, તો ક્યરેક દુશ્મન પાસે થાય અપેક્ષા,



ક્યારેક વહાલની, તો ક્યારેક સલાહની અપેક્ષા,

ક્યારેક પિતા પાસે, તો ક્યારેક માતા પાસે થાય અપેક્ષા,



ક્યારેક કંઇક કરી બતાવાની, તો ક્યારેક કંઇક મળી જવાની અપેક્ષા,

 ક્યારેક ખુદની પાસે, તો ક્યારેક ખુદા પાસે થાય અપેક્ષા,



ક્યારેક જીતી જવાની, તો ક્યારેક હારી જવાની અપેક્ષા,

ક્યારેક દિલ પાસે, તો ક્યારેક જિંદગી પાસે થાય અપેક્ષા,



ક્યારેક મિલનની, તો ક્યારેક નાસી છુટાય તેની અપેક્ષા,

ક્યારેક પ્રેમી પાસે, તો ક્યારેક મોત પસે થાય અપેક્ષા,



ક્યારેક નાદાનીયતની, તો ક્યારેક સમજદારીની અપેક્ષા,

ક્યારેક મોટાં પાસે, તો ક્યારેક નાનાં પાસે થાય અપેક્ષા,



ક્યારેક યાદ આવી જવાની, તો ક્યારેક ભુલી જવાની અપેક્ષા,

ક્યારેક પરીક્ષાનાં એક જવાબ પાસે, તો ક્યારેક વર્ષો પુરાણાં જખ્મો પાસે થાય અપેક્ષા,



ક્યારેક રોજ મળવાની, તો ક્યારેક માત્ર એક મિસ્ડ કોલની અપેક્ષા,

ક્યારેક નવા સંબંધો પાસે, તો ક્યારેક ફોન બુકના એક નંબર પાસે થાય અપેક્ષા,



ક્યારેક ઊંઘ આવે એની, તો ક્યારેક આંખો ખુલ્લી રહે એની અપેક્ષા,

ક્યારેક વિરહની પળો પાસે, તો ક્યારેક પરીક્ષાની આગલી રાત પાસે થાય અપેક્ષા,



ક્યારેક એકલતાની અપેક્ષા, તો ક્યારેક કોકના સાથની અપેક્ષા,

ક્યારેક સમય પાસે, તો ક્યારેક સંજોગ પાસે થાય અપેક્ષા,



ક્યારેક એકદમ નાની, તો ક્યારેક બહુ મોટી અપેક્ષા,

જીવનમાં ખુશ રહેવૂ હોય હંમેશા, તો કદી કોઇની કરશો નહી અપેક્ષા.


Posted: ઓગસ્ટ 20, 2008 in કવિતાઓ

ઘણી વાર એવા સંજોગો કે એવુ ધર્મ સંકટ સર્જાય છે કે એક પોતાનાના ભલા માટે બીજા પોતાના સાથે પક્ષ્પાત કરવો પડે, અને આવા સંજોગોમાં ઘણીવાર માણસ મિત્રોથી નહી મિત્રતાથી પણ દુર થઇ જાય છે, આવા એક સંજોગને વર્ણવાની કોશીશ કરી છે.

बदलना चाहता हुं, खुदको बदल रहा हुं,

बुरा मत लगाना दोस्त, तुझे भुलाना चहता हुं।


गलती नहि है तेरी बेवफा मैं ही हुं,

कुदरत खफा है मुजसे वफा तो मैं भी चाहता हुं।


जानता हुं मैं दुरीयां क्यों बढी,

माफ करना मुझे, तुजसे छुपाना चाहता हुं।


किसीसे वफाका अंजाम है, तुजसे बेवफाई,

बेवफा खुदको बनाकर, उसे बचाना चहता हुं।


पक्षपात किया है तुजसे, खुदकोसझ दे रहा हुं,

सिर्फ तुजसे ही नही दोस्त, दोस्तीसे दुर हो रहा हुं।