Archive for category Fun

Sangam 2010 Summarized….

As I mentioned before leaving that I shall be attending AIOUG’s 2nd user group conference Sangam. I got back today morning from the 2 day schedule. It was a fantastic event and definitely, presence of Jonathan Lewis was the key attraction of it. I am too small to say anything about Jonathan Lewis so would just say that it was my pleasure and honor to attend his two, half day sessions about SQL optimization and see in person that how great and knowledgeable he is! I can’t say enough about him except this that I was completely mesmerized by him, by his knowledge and his willingness to share it all with people like us! I always wanted to attend his session and it was just a dream come true that I got a chance at this user conference. It was Jonathan’s first ever visit to India and I am just so glad that I didn’t miss this golden opportunity. This was my first ever chance to see him presenting( have attended his webinars before) and all I can say is that he is just awesome! Here is a snapshot of him when he was delivering his session,

IMG_5031 

In addition to Jonathan Lewis, this presentation became so special for me since I got a chance to meet my friend and an Oracle ACE Director , Francisco Munoz Alvarez in person. Though we interact almost every day on various web platforms but this was going to be the first ever chance when I was going to meet him in person and I am just so glad that it happened in this conference where he came to gave two presentations. It was for the first time that I saw him presenting and he was just so good!  We also did spend some time after the conference was over munching snacks and discussing tons of things :) . It was just so good to meet him and I hope we do meet again very soon!  Here is a pic of him presenting at the same conference,

IMG_5033

In addition to Jonathan and Francisco, the conference also had the presentations from Mark Rittman, Iggy Fernandez, Murali Vallath and Vivek Sharma. It was a high doze of hard core technical content for 2 days :) . Overall, it was a very good event and I am glad that I did attend it with my friends Amardeep Sidhu, Neeraj Bhatia and Ankit Goel. We had a great time there and I hope, it would be the same in next year as well.

1 Comment

I Shall Be At Sangam, Will You….

This is just a quick post to say that I shall be leaving today with Amardeep Sidhu , Ankit Goel and Neeraj Bhatia to attend AIOUG’s annual oracle conference Sangam which is happening at Hyderabad this year. If you are also attending, just come and say Hi! I hope it would be good two days of Oracle and just Oracle :-) . I am not presenting this time so I would have plenty of time to attend my favorite sessions and meet my friend, Francisco Munoz Alvarez and one of the best known Oracle guru’s in this world, Jonathan Lewis.

Its time for me to get going and do the last minute checks for ticket printouts and everything else. Next stop would be Hyderabad!

,

No Comments

The True Legends….

I am too small to say anything about these people! Just a collage of the who’s who of the computer industry who have changed for forever the ways, thinking and lives of millions in this world! True legends, true gurus! Thanks to Sidhu for sending me this pic!

gurus

I always have believed in Steve Jobs saying “stay hungry, stay foolish” and looking at these legends, it just again strikes me that how much lesser knowledge I have! Hats off to you guys!

No Comments

Case Used By My Query In Sql*Plus….

There was an interesting question which me and two other delegates were discussing in the last week’s session. One delegate asked that how can we make the queries fired use a particular case? I couldn’t recall any parameter which does so(any guesses?) . One solution which I proposed was to put all the queries in the stored programs. If they would be there in the stored procedures, it would be not possible to play around with their case-sensitivity. This also serves the mantra that all the things related to the database must remain within the database only. Another solution proposed by one delegate was to use triggers to make this kind of thing possible. I am not sure that how using triggers it would be possible but anyways, that’s not the point of this post.

So in this discussion, since we were using good’ol, terminal prompt, I just recalled that there is an option in this client tool to set the case to whatever we want! The default setting of this is set to “mixed” . The delegates immediately checked the parameter and changed it to UPPER case and then also to LOWER. Well, nothing changed :-) . See for yourself,


SQL> set sqlcase upper
  SQL> show sqlcase 

sqlcase UPPER 

SQL> select * from scott.dept; 

    DEPTNO DNAME          LOC
  ---------- -------------- ------------- 

        10 ACCOUNTING     NEW YORK 

        20 RESEARCH       DALLAS 

        30 SALES          CHICAGO 

        40 OPERATIONS     BOSTON 

SQL> set sqlcase lower
  SQL> select * from scott.dept; 

    DEPTNO DNAME          LOC
  ---------- -------------- ------------- 

        10 ACCOUNTING     NEW YORK 

        20 RESEARCH       DALLAS 

        30 SALES          CHICAGO 

        40 OPERATIONS     BOSTON

So what does this setting did actually? Well since its a client tool, the change of the case send the query , including everything with it, like literals and all, in the proposed case. But how do we go and check and confirm it?

Since sql*plus is a client tool, the best way to check such thing was to enable client side network tracing. For this, we entered the following entries into the sqlnet.ora

TRACE_LEVEL_CLIENT= support : This parameter would enable the tracing for the OCI client connections and the level is set to gather the maximum information. This is not something which should be used in a normal environment/condition because the information collected would be huge!

TRACE_DIRECTORY_CLIENT=/tmp:  This parameter would set the directory where the trace file should go.

DIAG_ADR_ENABLED=OFF : This parameter would not let the tracing information go to the 11g specific Automatic Diagnostic Repository(ADR) .

So after setting all these parameters, this is how the sqlnet.ora would look.


TRACE_LEVEL_CLIENT=support 

TRACE_DIRECTORY_CLIENT=/tmp 

DIAG_ADR_ENABLED=OFF 

 

After that, we connected from sql*plus with the user Scott again and issued the same command, select * from dept , first in lower case and then in upper case. Doing this would create immediately a file in the /tmp with a name like cli_25111.trc. Since we had used the tracing level to support, the file is very huge. So I am going to chop off lots of content from it. Here are the sections which actually we were looking for in the file,


[29-JUN-2010 17:40:57:613] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........|
  [29-JUN-2010 17:40:57:613] nsbasic_bsd: 00 00 00 00 00 12 73 65  |......se| 

[29-JUN-2010 17:40:57:613] nsbasic_bsd: 6C 65 63 74 20 2A 20 66  |lect.*.f| 

[29-JUN-2010 17:40:57:613] nsbasic_bsd: 72 6F 6D 20 64 65 70 74  |rom.dept| 

[29-JUN-2010 17:40:57:613] nsbasic_bsd: 01 00 00 00 00 00 00 00  |........| 

[29-JUN-2010 17:40:57:613] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........| 

[29-JUN-2010 17:40:57:613] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........| 

[29-JUN-2010 17:40:57:613] nsbasic_bsd: 00 00 00 00 01 00 00 00  |........| 

[29-JUN-2010 17:40:57:613] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........| 

[29-JUN-2010 17:40:57:613] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........| 

[29-JUN-2010 17:40:57:613] nsbasic_bsd: 00 00 00 00              |....    | 

[29-JUN-2010 17:40:57:613] nsbasic_bsd: exit (0) 

[29-JUN-2010 17:40:57:613] nsbasic_brc: entry: oln/tot=0 

[29-JUN-2010 17:40:57:624] nsbasic_brc: type=6, plen=436 

[29-JUN-2010 17:40:57:624] nsbasic_brc: what=1, tot =436

<output trimmed>

[29-JUN-2010 17:41:06:731] nsbasic_bsd: FE FF FF FF FE FF FF FF  |........|
  [29-JUN-2010 17:41:06:731] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........| 

[29-JUN-2010 17:41:06:732] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........| 

[29-JUN-2010 17:41:06:732] nsbasic_bsd: 00 00 00 00 12 53 45 4C  |.....SEL| 

[29-JUN-2010 17:41:06:732] nsbasic_bsd: 45 43 54 20 2A 20 46 52  |ECT.*.FR| 

[29-JUN-2010 17:41:06:732] nsbasic_bsd: 4F 4D 20 44 45 50 54 01  |OM.DEPT.| 

[29-JUN-2010 17:41:06:732] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........| 

[29-JUN-2010 17:41:06:732] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........| 

[29-JUN-2010 17:41:06:732] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........| 

[29-JUN-2010 17:41:06:732] nsbasic_bsd: 00 00 00 01 00 00 00 00  |........| 

[29-JUN-2010 17:41:06:732] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........| 

[29-JUN-2010 17:41:06:732] nsbasic_bsd: 00 00 00 00 00 00 00 00  |........| 

[29-JUN-2010 17:41:06:732] nsbasic_bsd: 00 00 00                 |...     | 

[29-JUN-2010 17:41:06:732] nsbasic_bsd: exit (0) 

[29-JUN-2010 17:41:06:732] nsbasic_brc: entry: oln/tot=0 

[29-JUN-2010 17:41:06:742] nsbasic_brc: type=6, plen=436 

[29-JUN-2010 17:41:06:742] nsbasic_brc: what=1, tot =436

So we can see that the case used by both the queries from the sql*plus tool is changed. Nothing really great? Well did I say that it would be ;-) ? It was a just something which came across and was interesting so thought to share it!

,

1 Comment

Testing Syntax Highlighter….

I am not happy with the technical code part that I post over here. Though I know that I have to use some syntax highlighter but I just behaved lazy and didn’t try even to search for one. As like always, Sidhu came as a rescue and asked me install Syntax Highlighter which is a wordpress plugin. I am going to give it a try and see how it shows my code. So this is just a test post for checking the code and the plugin :-) .

SQL> set long 10000000
SQL> set longchunksize 10000000
SQL> set linesize 200
SQL> select dbms_sqltune.report_sql_monitor from dual;
SQL>select count(*) from test;

  COUNT(*)
———-
   1101904

Hope the highlighting is not over-done :-) !

,

6 Comments

So Are You A Consultant?

Okay, apologies for a non-technical post but I guess, its worth sharing. I have received today via email from a friend of mine who himself is an consultant and I guess, its really good! If you have seen/read it already, again apologies! And yes, I am not going to post non-technical posts over here. Its just one of those rare ones :-) . Here we go,

A shepherd was herding his flock in a remote pasture when suddenly a brand-new BMW advanced out of a dust cloud towards him. The driver, a young man in an Armani suit, Gucci shoes, Ray Ban sunglasses and YSL tie, leans out the window and asks the shepherd, “If I tell you exactly how many sheep you have in your flock, will you give me one?” The shepherd looks at the man, obviously a yuppie, then looks at his peacefully grazing flock and calmly answers, “Sure. Why not?” The yuppie parks his car, whips out his Dell notebook computer, connects it to his AT&T cell phone, surfs to a NASA page on the internet, where he calls up a GPS satellite navigation system to get an exact fix on his location which he then feeds to another NASA satellite that scans the area in an ultra-high-resolution photo. The young man then opens the digital photo in Adobe Photoshop and exports it to an image processing facility in Hamburg, Germany. Within seconds, he receives an email on his Palm Pilot that the image has been processed and the data stored. He then accesses an Oracle database through an ODBC connected Excel spreadsheet with hundreds of complex formulas. He uploads all of this data via an email on his Blackberry and, after a few minutes, receives a response. Finally, he prints out a full-color, 150-page report on his hi-tech, miniaturized HP LaserJet printer and finally turns to the shepherd and says, “You have exactly 1586 sheep.” “That’s right. Well, I guess you can take one of my sheep.” says the shepherd. He watches the young man select one of the animals and looks on amused as the young man stuffs it into the trunk of his car. Then the shepherd says to the young man, “Hey, if I can tell you exactly what your business is, will you give me back my sheep? “The young man thinks about it for a second and then says, “Okay, why not?” “You’re a consultant.” says the shepherd. “Wow! That’s correct,” says the yuppie, “but how did you guess that?” “No guessing required.” answered the shepherd. “You showed up here even though nobody called you; you want to get paid for an answer I already knew, to a question I never asked; and you don’t know crap about my business. . . ” … Now give me back my goat.”

So are you an consultant LOL ?

,

5 Comments