Thursday, December 17, 2009

Its been a while...

Its been quite some time since I wrote anything to this blog, let alone anything valuable.

However, last few months have been quite eventful in my personal and professional life. I have landed a job with a company in Bangalore now, which works a lot more with open source systems/applications than my previous employer. I can easily say that this was one of the points in my decision making.

Currently, I am opening up to working on Ubuntu and probably virtualization, mysql, postgresql and most importantly, Informatica Powercenter and Pentaho. The suite of tools is just too exciting for me to find right words to express my feelings.

Recently I have picked up a project to do a Proof of Concept for using an open source columnar database and compare its behavior with oracle for a given application. Of course it involves data loading, and analytical queries, so there would be some interesting stats collection and comparison. Attempts to break a system are always more interesting than to make it J

Lets see how it goes…

Also, I would try to be more regular on the blog now onwards…


Saturday, October 17, 2009

Happy Dipawali - The Festival of Lights

Dear Friend,

Another attempt to celebrate happiness in life,
another excuse to party,
has been brought upon by
Deepawali
The festival of Lights

Wishing you all the best, may this Deepawali and new year bring all the joy, happiness, prosperity and wealth into your life...

with loads of love and happiness on our parts as well,
Krishna, Pooja and  Raghav..

----------------------------------------
Live as if you were to die tomorrow
Learn as if you were to live forever


Check new snaps of our baby at http://baby.sraghav.in

Wednesday, October 7, 2009

10 ways to save money...

Here's a list I found on moneycontrol.com to create some saving habits -

1. Plan for your goals and invest your money in the correct assets. Take professional help, if needed. Put the investments on auto pilot like a SIP, RD etc. That is what works best for most people. This will ensure that you can spend only the rest.
2. Understand how much you are spending by tracking the expenses. You will be surprised how much you’re spending on the “misc” head
3. Don’t borrow to spend. Credit card spends ensures that you do precisely that. Use a debit card instead.
4. Buy most provisions for a month at one go. You’ll end up spending less time, effort and money.
5. Do focused shopping. Write out what you want buy, buy that and head for the exit. Don’t take children with you on these occasions. They fill the shopping cart with unwanted fluff.
6. Don’t buy unwanted items or in huge quantity, just because there is some offer.
7. Don’t buy a toy due to your guilt that you are unable to spend enough time with your child. Try and find the time instead. You child wants you, not another toy.
8. Stop spending on that item, once you reach the limit in that month. For instance, if your entertainment allowance for the month is Rs 3,000 and that is spent by the middle of the month, then it needs to be dal-chawal and TV for the rest of the month.
9. Same goes for fuel. Long drives and excursions on weekends are out, once the fuel limit for the month is breached.
10. Don’t switch on the AC by force of habit. Use AC as required. Switch off fans/ lights and other appliances, when no one is around. In many households, TV is on, irrespective of whether someone is watching or otherwise.

http://wealth.moneycontrol.com/columns/budgeting/10-simple-steps-to-cut-down-your-spending-/14092/0

Sunday, September 13, 2009

Viral fever hits the house...and a scare...

Well, what can a parent say... keep well my child.. thats all I guess...

My wife is the mad lady you might imagine that wants to shut all doors to the windows, no insescts should get in the apartment, even if we have to live a different closed box kind of life. And I used to curse her for her ways, but the last week's experience has changed me altogether.

Last week, when I took on cold/cough, I had no clue that the whole family will get into that.. especially the little one... And most unfortunately, he's the one who got affected the most.

My cough has come down a lot, and its great to be able to talk without coughing.. But, the mom in the house and the kid have taken it harder. I didnt get fever but they did.

The mom came out of it in three days, but the kid didnt. Somehow his fever managed to return after 3 days. On Saturday, we consulted a local doctor in our home town, she prescribed some medicine and a blood test. It was a terrible sight, watching blood taken out for the test. He was screaming like anything.. :( my poor one...

The test was intended to figure out if he has malaria. The result was out in 3 hours, which said that he has malaria and a dangerous one at that. Out of the types of malaria, this parasite, known as falciparum. Basically, it scared the hell out of me. The doc mentioned few bad things about this parasite, and advised injections and what not for him.

Driving back to home, I was thinking thousand things. Out of them was, should I trust this report ? At the risk of spending one night without medication, and some more blood extraction from his tiny body, we decided to go for another test, at a different lab, in a relatively larger town close to us, and consult a different doctor.

The idea was welcomed by everybody at home, and we travelled to Agra in the morning. This time around the blood extraction turned out to be even harder, he cried more.. :( But, the result that came out was, he has no such thing as malaria, let alone the dangerous type. At that very moment, I felt like going back to the earlier lab guys and kick their ****.

The doctor, who already had his doubts about diagnosis as malaria, laughed out load and told me to relax. He said, "the baby got the fever back probably because both parents still have fever and cough going on". That was most comforting. We bought some face masks and returned home...

Now, we have decided to split up, so that he gets lesser exposure to whatever we parents are carrying. I'm in diff town, he's somewhere else with his mom, and with some aunts, who are healthy-fine at the moment, so nothing is going to catch him again.. :(

Now, I wonder, what if it was malaria, I wont have been able to pardon myself for the lax behaviour wrt insects and apartment cleansing etc...

Great feeling that he's fine now...

Friday, August 28, 2009

Swine Flu scare

Ever since the Swine Flu broke out in Indian towns, we are more scared for him than for ourselves. Though I have more possibilities of meeting someone who's travelled from overseas, out of fear, we've stopped taking him out in public places.

The other day, we went to buy some vegetables. and out of fear thing, I stayed back in car with him, and his mom went out to buy stuff. When she came back to car, she washed her hands and only after that she took him up.....

Though at times, it feels that we are overdoing it, I think its worth it.

Wednesday, August 12, 2009

Baby Proofing the house

He's moving like a newly free man.. :) He'll follow any and all sounds to their origin, chase his mom or me moving around the house anywhere.

Or if we are not around or playing with him, he'd pick his own target and reach there. Given his height, the electrical sockets are a favourite destination, I think more so, because they provide a place for putting his in there.

The moment I realized that, I had to put duct tape on all the outlets within his height reach. Literally everything. Initially, we were also wondering if he would go another step and try to remove the tape. Till now, he has not improvised to that level, but once that happens, we'd have to seek another method to keep him safe and away from them....

Monday, July 27, 2009

Teeth Showing up...

Did I already mention that ??

Our young Krish has played both a Jerry (the mouse) and a Cheekoo (a bunny) by having two teeth showing up on both lower and upper teeth lines.

First he got his two lower central teeth. For about three months, he had them growing. We were enthralled by this. People used to comment that its very good for a baby to grow teeth at such early stage, it poses relatively lesser problems.

Well, starting 4th month (March-April) he's had the lower two. Now, starting July he started growing the upper central two.

Now that he's got parts of both the teeth visible, his wishes to chew and cut at any and everything in sight is starting to create problems of its own. The other day, while in lap, he cut his mom on the shoulder so hard that she screamed. :D

I've got my share of cuts, on shoulder and fingers and arms and where not...

More than this, his wish to chew everything is a problem. He tends to put everything in his mouth, whether its his plastic toys or my pen or wrist watch, or for that matter out mobile phones.. he needs everything in his mouth..

We're having hard time keeping an eye on him and watching everything that goes in his mouth..

Monday, July 20, 2009

Rota Virus Vaccine - 2

As I dreaded, the second vaccine of the Rota Virus came at the same price, another thousand rupees (1000).

So, the Rota Virus vaccine stands at Two Thousand Rupees, I guess a very high number for vaccine serving one virus. Not that I think its not worth it, I just think that it should be made available to the general public at a cheaper price tag.

Cheaper vaccines could be a very strong push for public to go for more vaccination coverage.

Wednesday, July 15, 2009

Starts crawling...

I was not home that day, but I wished I was.

He was on our double bed and was sleeping (I think). He woke up and suddenly she (his mom) saw him attempting crawls. At 6-7 months of age, the crawls should be expected behavior.

Whether expected or not, it was a pleasant surprise none the less... It was GREAT.. :)

After that day, we are thinking of getting him a walker.

Update: 10 August 2009
Got him a walker looking like this

Wednesday, July 1, 2009

Compile all packages in a schema

BEGIN
FOR cur IN
(
SELECT OBJECT_NAME,
OBJECT_TYPE ,
owner
FROM all_objects
WHERE object_type IN('PACKAGE', 'PACKAGE BODY')
AND owner = ':OWNER
AND status = 'INVALID'
)
LOOP
BEGIN
IF cur.OBJECT_TYPE = 'PACKAGE BODY' THEN
EXECUTE IMMEDIATE 'alter package "' || cur.owner || '"."' || cur.OBJECT_NAME ||
'" compile body';
ELSE
EXECUTE IMMEDIATE 'alter ' || cur.OBJECT_TYPE || ' "' || cur.owner || '"."' ||
cur.OBJECT_NAME || '" compile';
END IF;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Errors compiling - ' || cur.owner ||'.'||cur.object_name);
END;
END LOOP;
END;

Wednesday, June 24, 2009

On growth in India...

Yesterday evening, I went out to the local "dhaba" in the neighbourhood for dinner. Incidentally, while I was still eating, a father and two children arrived on the same table as mine. The father was wearing a shirt on which PepsiCo was embroiderd and was clearly visible.

They ordered two items - half plate each - and one "Naan". Seeing three people (father and two kids) ordering only one Naan, the waiter even asked, "only one ?", but the father was sure.. "Yeah, one for the moment".

I already had started thinking. From the appearances (and I agree that they can be very very deceptive), they looked like people not doing great financially. From the look, gestures, and other behavioural traits that I could monitor, I felt that the kids had been asking for going out to eat for a while and today was the chosen day that father agreed to take them out. Most probably the mother was home and did not come along to save some.

Of course this theory can be wrong, very wrong in-deed. But, if its true, to me it represents precisely the way I see the growth of Indian economy. Its growing, but not universally, as in everybody is growing. Only a select few are growing, and rest are almost where they were. Thus, widening the gap that was there a few years ago between sections of Indian society.

Or perhaps everyone is growing, at different paces. Some are outpacing the inflation and therefore are visibly financially well off, others who are growing, but perhaps not as much as the world around them are growing, therefore lagging behind the society around them, even though they are doing better than they were doing earlier.

This little family that I saw, fits into the mould nearly perfectly. The father was working with PepsiCo.. a MNC from all parameters, represents a bit of growth in itself. I would presume, better working conditions, perhaps a better salary as well. The kids were wearing relatively flashy clothing, which by my personal viewpoint, was not the quality concious choice, but a trend based choice. So, yes they are doing better than a few years, but not as good as the system/society around them demands to be.

Then, I was reading an article in mint (http://www.livemint.com financial daily of The Hindustan Times) by Niranjan Rajadhyaksha entitled "Poor arent lifeless bricks". In there, writer referred to a research done by some social scientists around the financial planning done by the poor people to get through life in such costly world.

One of the inferences of the study was that most of the people fell into poverty due to medical costs or social reasons like family breakup etc. These reasons are really very real, as in real life situations that happen all the time around us. Something similar was found in an study taken up in US a well. I have come across really few articles/studies coming back with reasons as real as this one.

I guess, its time for Dr Manmohan Singh's new government to do something about the "inclusive growth" they talked about...

good luck India...

Saturday, May 2, 2009

Rota Virus Vaccine...

We had seen enough infomercials on TV about how useful and life saving Rota Virus Vaccine can be... Doctors say that its best to be administered within the age of 3 to 6 months.

With our little one running 6th month, we decided to go for it.

Surprisingly, its very very expensive. Imagine a single vaccine dose for One Thousand Rupees (1000). And there are two doses, the second one to be administered after two months of the first one. I just hope that the price tag on the second one doesnt come with an extra zero... :)

At this price the vaccine is going to be un-affordable to quite a lot of Indian families. I guess the government should take up some steps to bring the price down.

Thursday, April 30, 2009

tweaks around Oracle 11g on Hardy 64bit

I did an oracle 11g 64bit install on my 64bit core 2 quad using the resources available on internet and some past experience.

The tutorial here is great :

http://www.pythian.com/blogs/968/installing-oracle-11g-on-ubuntu-804-lts-hardy-heron

However, some things still show up after the initial setup is done. Here are bits of my experience -

1. Starting Enterprise manager after a reboot -
Try emctl status agent
The last line of the output should tell you whats happening. If its not running, start it using the following -
emctl start dbconsole
This thanks to http://www.linuxquestions.org/questions/linux-general-1/linux-5-oracle-11g-enterprise-manager-question-616532/

2. The ORACLE_SID variable must be declared in either /etc/profile (for a single database on the system) or on user's local profile.

Tuesday, April 21, 2009

Earning money using cloud Computing ??

I dont know much more about cloud computing, but it sure sounds like an interesting idea. The way it allows computing resources to be shared and connected through internet and all that. The benefit to the average developer is huge, getting computing power so cheap..

However, I think the reverse should also be true and could turn out to be pretty interesting. The way we (developers) use resources from the cloud for our computing purposes, we could also share our spare resources to the same cloud so that someone else might use them and allow us to earn some money in exchange. There would be some preconditions and requirements and what not, but essentially that should be a possibility...

I dont know for sure whether this concept already exists, but i would sure like to see that happening...

Friday, April 17, 2009

Blank Subject Reminder in Outlook...

1. Open your outlook.

2. Press Alt+F11. This opens the Visual Basic editor and then Press Ctrl+R which in turn open Project-Project 1 (left side).

3. On the Left Pane, one can see "Microsoft Outlook Objects" or "Project1", expand this. Now one can see the "ThisOutLookSession".

4. Double click on "ThisOutLookSession". It will open up a code pane.

5. Copy and Paste the attached code in the right pane. (Code Pane) and save it.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim strSubject As String
strSubject = Item.Subject
If Len(Trim(strSubject)) = 0 Then
Prompt$ = "Subject is Empty. Are you sure you want to send the Mail?"
If MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check for Subject") = vbNo Then
Cancel = True
End If
End If
End Sub

For this you need to create a digital certificate. Go to http://office.microsoft.com/en-us/help/HP052495581033.aspx to see how to do it. Name your certificate whatever you like e.g No_Subject.

Once that’s done go back to the code window, click Tools, Digital Signature, Choose - and choose that signature you just created. Hit ok, save this project, close it. Close Outlook completely too.

Start up Outlook, you get the security box; click always trust running this macro thing. And you’re done! Try sending a message without body, you’ll get an alert. Now even if you restart outlook it’ll still work.

Courtesy a colleague, Mukesh.

Wednesday, April 15, 2009

Sunset at Le Lac du Plafond


Sunset at Le Lac du Plafond, originally uploaded by yOOrek.

Cute sunset created in studio... :)

Tuesday, April 7, 2009

All about Dual Table : AskTom

A very very interesting article from AskTom on dual table, its purpose and usage and everything else about it...

Here's some excerpts from it, leaving the rest for reading...
"DUAL is owned by SYS.  SYS owns the data dictionary, 
therefore DUAL is part of the data dictionary. You are not to modify the data dictionary
via SQL ever -- wierd things can and will happen"

More

the optimizer understands dual is a magic, special 1 row table.  It stopped on the 
select * because there is to be one row in there. Its just the way it works.
Read the rest of article here...

Ask Tom "All about the DUAL table "
Blogged with the Flock Browser

Oracle SQL tuning - Burleson Consulting

Burleson Consulting website has come to rescue in many situations. For many questions their site provides great pointers and ideas.

Here's a series of papers/articles on Oracle SQL Tuning -

Oracle SQL tuning parameters

And, here's an article on tuning of individual SQL Statements -

Tuning Individual SQL Statements

Blogged with the Flock Browser

SQL - Difference Between Hash Join & Merge Join

Difference Between Hash Join & Merge Join

Merge Join :Oracle performs a join between two sets of row data using the mergejoin algorithm. The inputs are two separate sets of row data. Output isthe results of the join. Oracle reads rows from both inputs in analternating fashion and merges together matching rows in order togenerate output. The two inputs are sorted on join column.

Hash Join :Oracle performs a join between two sets of row data using hash joinalgorithm. Input and Output same as Merge Join. Oracle reads all rowsfrom the second input and builds a hash structure (like has table injava), before reading each row from the first input one at a time. Foreach row from the first input, the hash structure is probed and matchingrows generate output.
SQL - Difference Between Hash Join & Merge Join
Blogged with the Flock Browser

Beware of Question Authorities « H.Tonguç Yılmaz - Oracle Blog

Beware of Question Authorities
Following suggestions are from Mr.Lewis Blog ;
  1. If it’s not dated - don’t assume it’s true*
  2. If its date is more than about 18 months old - don’t assume it’s (still) true*
  3. If there’s no version number - don’t assume it’s true*
  4. If it’s not your exact version number - don’t assume it’s (still) true
  5. For ‘technical implementation’ details, if there’s no platform mentioned - don’t assume it’s true
  6. For ‘technical implementation’ details, if the platform’s not the same as yours - don’t assume it’s true
  7. If there’s no rational justification supplied, and no repeatable test case - don’t assume it’s true.
And even when all the details are perfect and there is a repeatable test case - and even after the repeatable test case produces the same results - ask yourself this question
  • Could there be a different explanation for the same set of results - and if so, how badly could this advice damage my system, and how hard would it be to test my alternative hypothesis ?
Once you’ve got through that lot - then you might be safe trying the advice on a development system.

Mr.Kyte also mentions this problem under the ‘Question Authority.’ terminology;

There are lots of ‘experts’ out there;
  • Make them prove everything
  • Statements that should raise your eyebrows:
  •     It is my opinion…
  •     I claim…
  •     I think…
  •     I feel…

  • Everything can (and should) be proven - TKPROF goes a long way hereStatspack is great‘Runstats’ is a tool I use as well (search asktom for runstats)
  • Things change, expect that

Remember a test becomes a proof when;
  • it has a specification- the results are reproducible
  • alternative explanations have been eliminated
  • it is published- it survives peer-group review
Reference
“The Burden of Proof” presentation by Jonathan LewisDon’t take any “guru’s” word, test it and make sure you are convinced of the results..
Beware of Question Authorities « H.Tonguç Yılmaz - Oracle Blog
Blogged with the Flock Browser

Monday, April 6, 2009

wanna walk....

Well, he is growing up like anything and why not...

I have not seen any baby's childhood like I am seeing mine's. You bet it can get better than wonderful. Though there are times when you feel you were in a different situation (e.g. when he doesnt want to sleep at 2 in the night)...

He has already learnt to laugh at will and at prompting.. I can count things on my fingertips which would make him laugh... literally Laugh Out Loud..

And, he's only 4.5 months, but feels like he wants to run. Every time, you try to make him stand, and he would squeak as if he's been given something great... He would try to move his feet, already an attempt to walk...

The sweetness of his actions, various of which are unknown to me (happens with him and his mom), can not be described through words. Like these photos from today, there were taken when he was attempting to walk on my tummy... He was extra happy... photos show it all... better than words...

Its just great... :)

Thursday, April 2, 2009

An Extract from AskTom

Efficient SQL

This was probably the hardest part of the book to write - this chapter. That is not
because the material is all that complex, rather because I know what people want - and I
know what can be delivered. What people want: The 10 step process by which you can tune
any query. What can be delivered: Knowledge about how queries are processed, knowledge
you can use and apply day to day as you develop them.

Think about it for a moment. If there were a 10 step or even 1,000,000 step process by
which any query can be tuned (or even X% of queries for that matter), we would write a
program to do it. Oh don't get me wrong, there are many programs that actually try to do
this - Oracle Enterprise Manager with its tuning pack, SQL Navigator and others. What
they do is primarily recommend indexing schemes to tune a query, suggest materialized
views, offer to add hints to the query to try other access plans. They show you
different query plans for the same statement and allow you to pick one. They offer
"rules of thumb" (what I generally call ROT since the acronym and the word is maps to are
so appropriate for each other) SQL optimizations - which if they were universally
applicable - the optimizer would do it as a matter of fact. In fact, the cost based
optimizer does that already - it rewrites our queries all of the time. These tuning
tools use a very limited set of rules that sometimes can suggest that index or set of
indexes you really should have thought of during your design.

I'll close this idea out with this thought - if there were an N step process to tuning a
query, to writing efficient SQL - the optimizer would incorporate it all and we would not
be having a discussion about this topic at all. It is like the search for the holy grail
- maybe someday the software will be sophisticated enough to be perfect in this regards,
it will be able to take our SQL, understand the question being asked and process the
question - rather then syntax.

To me - writing efficient SQL requires a couple of things:

o Knowledge of the physical organization of what I'm asked to query against. That is
- the schema. Knowledge that the physical organization was actually designed in order to
help me answer my frequently asked questions (refer back to the chapter on designing an
efficient schema for advice in that arena)

o Knowledge of what the database is capable of doing. If I did not know about "skip
scan indexes" and what they did (we'll cover them below) - I might look at a schema and
say "ah hah, we are missing an index" when in fact we are not.

o Knowledge of all of the intricacies of SQL - from the lowly "WHERE" clause on up to
analytics and psuedo columns. Knowledge of what using a particular construct will do to
my runtime processing.

o And most importantly of all - a solid understanding of the goal, of what the
question is. Tuning a query or process is really hard (impossible I would say) - unless
you understand the question in the first place. I cannot tell you how many times I've
not been able to tune a query until I had the question in hand. Certainly you can derive
a question from a query - however, many times that derived question is much more
confining then the real question being asked. For example, many people use outer joins
in all queries - they are "afraid" of losing a row (perhaps they got "burned" in some
past experience and now use outer joins everywhere). If the objects are related in a one
to one mandatory fashion - we don't need an outer join at all. The question derived from
the query is much more confining then reality.

That last topic or point is so important, I'll close out this section with it. In this
chapter we'll cover the topics of what the database is capable of doing in general -
looking at many of the access paths and join operations available to us. We'll look at
what SQL is capable of doing - not by discussing the entire language, that in itself is a
book. Rather, we'll look at a couple of things that will whet you appetite - show you
how powerful this language can be, how much more than just "SELECT" "FROM" "WHERE" and
"ORDER BY" there is. Then we'll close up with a look at that most important topic - why
understanding the question is more important then having a query at hand to tune.

So, this section will not provide you with the N steps you need to follow in order to
tune a query or write the best queries in the world. For every rule of thumb out there
anyone has ever shown me regarding writing "efficient SQL", I've been able to come up
with a slew of common (not esoteric) counter cases to prove that rule of thumb is wrong
in as many cases as it is right. I've talked to people who swear "NOT IN" is fatal,
never use it - always use NOT EXISTS. Then I show them NOT IN running a query 10 times
faster then NOT EXISTS. I talk with people who feel NOT EXISTS is the worst construct
on the planet - you must use IN. Then I do the same - showing them how NOT EXISTS can
run many times faster then IN.

Tuesday, March 31, 2009

Me n Mom...

There he is...



A bit old (Feb 2nd week..

And he spoke.....

Today could easily be termed as one of the best days of my life...

The baby spoke for the first time.. and that too.. said "papa"... though I was not there to hear it first hand, it has been digitized (recorded in video) and I would hope to see/hear it when I get the first chance...

The very idea that he is already starting to speak up.. I can at least call it uttering... feels pretty great...

Imagine, a few months, this guy was inside a water bubble, a tiny thing barely a few centimeters.. and now he is already waving, smiling, crying, recognizing faces, doing all those pretty and naughty things that change a parent's life forever...

Fabulous feeling.. not enough words with me to describe it... :D

Thursday, March 12, 2009

Useful scripts for DBA perspective -

http://www.dbapool.com/scripts.php

More stuff on finding free space available in a database -

http://forums.oracle.com/forums/thread.jspa?threadID=624042

A sql that we found useful is here - (from the above link itself) -

SELECT
NVL (b.tablespace_name, NVL (a.tablespace_name, 'UNKOWN')) NAME ,
mbytes_alloc mbytes ,
mbytes_alloc - NVL (mbytes_free, 0) used ,
NVL (mbytes_free, 0) free ,
((mbytes_alloc - NVL (mbytes_free, 0)) / mbytes_alloc) * 100 pct_used,
100 - (((mbytes_alloc - NVL (mbytes_free, 0)) / mbytes_alloc) * 100) pct_free
FROM
(
SELECT
SUM(BYTES) / 1024 / 1024 mbytes_free,
tablespace_name
FROM
SYS.dba_free_space
GROUP BY
tablespace_name
)
a,
(
SELECT
SUM(BYTES) / 1024 / 1024 mbytes_alloc,
tablespace_name
FROM
SYS.dba_data_files
GROUP BY
tablespace_name
)
b
WHERE
a.tablespace_name(+) = b.tablespace_name

UNION ALL

SELECT
f.tablespace_name ,
SUM (ROUND((f.bytes_free + f.bytes_used) / 1024 / 1024, 2) ) "total MB" ,
SUM (ROUND(NVL (p.bytes_used, 0) / 1024 / 1024, 2)) "Used MB" ,
SUM (ROUND ( ((f.bytes_free + f.bytes_used) - NVL (p.bytes_used, 0) ) / 1024 / 1024, 2 ) ) "Free MB" ,
(SUM (ROUND (NVL (p.bytes_used, 0) / 1024 / 1024, 2)) * 100) / (SUM (ROUND ((f.bytes_free + f.bytes_used) / 1024 / 1024, 2))),
100 - (SUM (ROUND (NVL (p.bytes_used, 0) / 1024 / 1024, 2)) * 100) / (SUM (ROUND ((f.bytes_free + f.bytes_used) / 1024 / 1024, 2)))
FROM
SYS.v_$temp_space_header f,
dba_temp_files d ,
SYS.v_$temp_extent_pool p
WHERE
f.tablespace_name(+) = d.tablespace_name AND
f.file_id(+) = d.file_id AND
p.file_id(+) = d.file_id
GROUP BY
f.tablespace_name
ORDER BY
5 DESC --&orderby
;

Monday, March 9, 2009

Another month and another vaccine...

Its been another fascinating month... As the book, "What to expect in the first year" says, third month onwards, its the golden time of the babies infancy, I would have to concur, it cant be more correct...

The baby is squealing, smiling, laughing, attempting to curl on his own, would make faces and return ur expressions. And crying too.. out loud.. at times for quite some long time without any apparent reason.

Its all so fascinating. I see him only for three nights/two days a week but then the time is almost good enough to give me memories worth much longer in time and happiness. Its very easy for me to remember his face and expressions now. Its a lovely feeling...

He had another round of his vaccinations this weekend, and I have to say this has been the easiest ones. The pain he has been through in the earlier vaccinations, the trouble he has taken, and the rest of the family shared with him... One time he was turning all colors & crying almost all the night and we had to figure out lots of ways to find soothers for him.

But this around, he had some fever, but it was nearly painless, or may be just that we have had experience of this situation.

Wednesday, February 25, 2009

Compile all invalid packages in a schema : oracle

Came across this from sql developer, Looks like a very useful script, especially when its made available readymade

begin
FOR cur IN
(SELECT OBJECT_NAME, OBJECT_TYPE, owner
FROM all_objects
WHERE object_type in ('PACKAGE','PACKAGE BODY')
and owner = :OBJECT_OWNER AND status = 'INVALID' )
LOOP
BEGIN
if cur.OBJECT_TYPE = 'PACKAGE BODY'
then
EXECUTE IMMEDIATE 'alter package "' || cur.owner || '"."' || cur.OBJECT_NAME || '" compile body';
else
EXECUTE IMMEDIATE 'alter ' || cur.OBJECT_TYPE || ' "' || cur.owner || '"."' || cur.OBJECT_NAME || '" compile';
end if;
EXCEPTION
WHEN OTHERS THEN NULL;
END;
end loop;
end;

And then another one to check as to what all objects are invalid -

select object_type, count(*)
from user_objects
where status = 'INVALID'
GROUP BY object_type

Sunday, February 15, 2009

Deep Blue and Snow white...


20090212_10-56-43_119, originally uploaded by _maze_.

Amazing shot from a friend in Slovakia...

Thursday, February 12, 2009

Oracle : count(1) vs count(*)

It seems we should prefer using count (*) over count(1)
read the article from asktom here...
there've been other discussions and debates on this as well.

Monday, February 9, 2009

Feeling exhausted by happiness, laughter and work... :)

From 3rd of Feb, the festivities started and lasted till 7th night.
It was a great week.

The whole week was full of something or other. One fine day we had event A, on other we had B and so on... Every day of the week was full of some or other event giving a renewed reason to celebrate the day.

The festivities started on 3th with "Charua-Satiya" placing function. Here in, sisters of the father put on holy symbols (SWASTICAS) at the doors of the room where the newborn and the new mother spend most of their time, (basically their room). The idea is to initiate another round of omnious prayers.

These symbols are created using cow-dung, and are covered with a piece of cloth till the day of "Kuaan Poojan". The original idea of Kuaan Poojan was to purify the new mother and remove restrictions of movement in and about house. (Generally, in Indian households, the new mother is/was not supposed to move around and execute daily chores for quite some time after delivery. It was considered that she was not pure enough after deliver, I believe it was another excuse created by the learned people to make public follow their guideline, since its very helping to the new mother if she is resting a lot after delivery. Public in India is more prone to following an advice if its linked to religion somehow)

Then there was the Ekadashi Udyaapan program on 6th and 7th Feb. Basically, this is a closure of a ritual (of fasting) followed by someone for a lifetime. Here, the person is supposedly mentioning to the gods that the body doesnt allow anymore exertion of that level and the fast (of Ekadashi) is going to be discontinued.

A celebration is due since its a big thing anyway, also because its nice to have people around you and celebrate on every little occasion. For us it was even bigger because, it was posthumously done for my mom, and it was clubbed together with the Kuaan Poojan of our newborn. My mom originally wanted to perform the Udyaapan in June last year only, but when she got to know about the pregnancy, she postponed the udyaapan to be held together with the ceremonies for the baby. But, gods had planned it differently... :(

Knowing her (mom) as much as I knew her, she would have been the happiest person around on this birth. She was the single most excited person about the pregnancy and waiting for it to happen forever...

So, on the Udyaapan thing, there is quite a lot of religious acts performed. Donations being given to the Braahmins, a special meal-feast organized for Brahmins and loads and loads of relatives invited for the same.

It was very hectic for me personally, due to the fact that as a son, I had to be part of some of the ceremonies for my father. On the other hand, I was supposedly managing the whole procession singlehandedly. It was really really huge. For the first time, I was managing something of that scale. But it all paid off with the fun-laughter-satisfaction of having it done for my parents and son... the feeling is priceless...

Here are some snaps...

Wednesday, January 28, 2009

Invite for the weekend of 6&7th Feb

We request the honour of your presence on the auspicious occasion of

  Ekadashi Udyaapan
ceremony of our parents

Mr. Ramesh Chandra Sharma
&
Late Mrs. Shakuntala Sharma

I would also like to take this opportunity to
extend the invitation on their behalf for the

Kuaan Poojan

ceremony of their grandson

Krishna
(Son of Raghvendra and Pooja)
at

12/A, Sector B,
Govind Nagar, Mathura

 
as per the following programme : 

Ekadashi Falaahar    6-Feb-2009    12:00 pm
Kuaan Poojan          7-Feb-2009     4:00 pm
Dinner                   7-Feb-2009     7:00 pm
Devi Jaagran           7-Feb-2009    11:00 pm
 
 
Sharing happiness with you
Raghvendra and Pooja

Wednesday, January 14, 2009

Free Adobe Flex Video Training

Just found about it...

http://www.adobe.com/devnet/flex/videotraining/?sdid=EGMNU

not been through it yet, but it looks pretty good, combination of pdf ebooks, audio/video stuff and all that...

Another one from 20th Dec...































20th dec

After a long time...
























Here he is on 19th dec...
and yes, its a long time, if I dont post photos for a newborn baby for a month or so...
Apologies for posting late and with a delay, but he and job are keeping me quite busy... :)

Will try to post more and frequently...

Friday, January 2, 2009

More Free ebooks on Oracle - Unix - Linux

Find free to download ebooks on this site -

http://www.itstudy8.org

Changing System name in Ubuntu

When I installed Ubuntu for the first time, I named my system to reflect the os name (gutsy) and the architecture (64 bit). However, whenever there were system upgrades, the name got irrelevant. For example, when I upgraded to Hardy, the name still remained stuck to the last version of OS.

Therefore, I now thought of renaming my system to separate it from the os versions. This is so very simple to achieve in Ubuntu -

just edit the file /etc/hostname (owned by root, therefore use sudo). Put in the new name, and restart the system.

However, the consequences of this name change will have to be reflected across the network (if you have one). Hostname files on all other systems or dns entries will have to be updated to reflect the new system name.