Wednesday, December 21, 2005

Can end users adapt to change?

The question that all tech support can never run from. Can users adapt to change? Are they willing to change their routine work with anything regards to the puter for the benefit of the company? Will they think or feel their doing too much for the company and not being paid enough with the change at hand? - Frankly speaking, as the implementer, you really couldn't give a rat's ass what they feel, but sometimes, their comments can really dig into your skin, or even make you roll over laughing your head off.

Well i recently had the pleassure of assisting in the implementation of one, will not be named (for security purpose) proxy server for my organization. Everything was going as planned, setup completed successfully, roll out was error-less, and policies were well defined.. right up to the end-user implementation phase; and this happened to be one painful change the users weren't ready to accept. You see, right up till today internet surfing for those who were given the privilege had no boundaries, no monitoring and they could do everything a homeuser could do on the net. From yahoo! to MSN Messenger, just name it.

SO.. my first encounter today with one particular user was a retaliation most bitter. After briefing the user (USER01) on the new restricted access, User01 proceeded to bitch and bitch and bitch about why free surfing was needed. Lots of research needed to be performed and how without it, life as we know it will end. OKAY... i got your point. Tell it to judge! Your boss didn't give us the green light to upgrade your access to unrestricted okay?? Jeez, don't go throwing your tantrum at me cause i'm just doing my job!! Like i really get the pleassure out of banning you from the net? Puh-leaseee. (Although i must admit, controlling user access sure as hell saves the company hellava lot of bandwidth!!) You should see the crap users download every single day!!.. It's not to say they give a crap about the important business applications that run on the same network right? They just keep downloading, and downloading, and wasting all that bandwidth until one day, the important application hits a bottleneck, THEN They start to complain.. Yeah, thanks dude.. like you didn't contribute to the mess you made..

On the other hand, i encountered one particular user (USER02) which raised a question which made me nearly fall of my seat. The conversation went something like this..

USER02 : Hello, Hello!
Me : Hello, what's the matter?
USER02 : Eh, just now ah.. you all people install what on my pc ah??
Me : Oh, that's the new proxy access.. you have to log in before you can use the internet.
USER02 : Ya... i know! i alredi change password! but i cannot access internet!!!
Me : Can i know what site you're trying to access?
USER02 : fodee, fodee fodee lahhhh!! why cannot access?? something wrong isit?!?!
Me : fodee? What do you mean fodee? Our records show you are only allowed to access sites related to your work. If you mean why you can't surf to other sites, that's because you do not have the privilege to do so.
USER02 : Yaaa..... what ever lahhh.. now i ask u why i canot go fodee!!
Me : fodee?!? (I was really blur..) What is that??
USER02 : Aiyoh you ahh..... Kuda, TOTO, MAGNUM Lahhh!!! Why cannot access???

(Slight pause...)

Bloodyshit. This guy trying to look at horse race results online.. he meant 4D!!!

Me : (Refrain from laughing my ass off) Ohhhh.... you mean 4D is it... haiiihhh.. where can access that site?? You wanna see result go kedai lah.!!
USER02 : What go kedai.. why you all like that one?? Every morning i come work i check 4d now how to check 4d?! If kena how?

(Thinking to myself.. KNN, kena you no need to work lah! become king and live of your 4d lahh!)

Me : Sorry la. But access for you is restricted to business related sites. If you wanna check 4D, you send request to my boss for approval ok? (Sure will go through one, my boss sure give users like you access to 4D and while we're at it, we'll give you access to porn too!)
USER02 : Lidddatttt ahhh..... haihhh. Nevermind lah.. what to do, cannot check 4D anymore.. Eh, Sure ah cannot check 4D anymore?
Me : Yes... I'm very sure you cannot access 4D anymore.
USER02 : Then nevermind lah.. i check somewhere else lah. bye. *click*(hang up phone)

The shit we put up with everytime something new is implemented. I'm pretty much convinced, IT systems can only be implemented efficiently in an organization where bosses iron fist end users. In reality, most companies treat IT as the cost centre, without realising the potential of it being a profit centre, or at least a value added service to customers. Businesses today should be driven by IT, not being led by outdated methodology and mindset which died out with the dinosaurs. With all this said, IT policies and procedures will save any organization a significant, quantifiable amount of time and investment not to mention, the improvement of resource efficiency.

I guess, these things take time to adapt. Rome wasn't built in a day. End Users will never learn the value of bandwidth overnight. In some ways, i do feel sorry for USER02. I mean, all he wanted was to check his 4D..... So as consolation, User02.. i hope you DO read on your free and busy time.. (Although this isn't an approved site on the proxy..), i present to you, today's Magnum Results.

I sincerely hope, you blew your life savings on the number 4894. Then you can buy your own IT department, set up your own proxy, and allow only you, access to FODEE!!


Sunday, December 18, 2005

How do i collect Stats from Oracle?

Every DBA should be well aware of what's going on in their database. You can't expect to install it, mount it, and hope your users never complain about it. OR that is never crashes on you. OR it has Artificial Intelligence and can call you on your mobile telling you it's not feeling well and needs you to do reindexing. hah hah.. this isn't Dexter's Laboratory man..! Hence, today's topic on Maintaining oracle Alert Log files:: The first place DBA's should look for problematic DB's.

What's an Alert Log file?

It's a love letter full of rainbows and sunshine. Yeah right. ;).. Oracle Alert log files are logs that are churned by oracle that consists of a chronology of messages and errors on your database.
A DBA should always check alert log files regularly:

  1. Detect internal errors (ORA-600) and block corruption errors.
  2. Monitor database operations.
  3. View the nondefault initialization parameters

Where is the Alert log file situated?

It's not buried in your backyard i can tell you that much. It's actually located in the folder specified in your init.ora file under the parameter BACKGROUND_DUMP_DEST. The init.ora file can be located in your oracle home directory, under the database folder. Init.ora basically holds all the parameters to initialize your DB instance. This is where you set your SGA (System Global Area), or in other words how much memory is allocated to your database instance. In later posts, i will ellaborate more on how to tune your SGA correctly to ensure your database returns more cache hits than cache misses.

The alert log file contains information for tuning the database. Use it.

  1. Checkpoint start and end times. (Frequent checkpoints ensures instance recovery takes a shorter time to complete. However, too much checkpoint can also cause an overhead on process. Be aware.)
  2. Incomplete checkpoints.
  3. Time to perform archiving.
  4. Instance recovery start and complete times.
  5. Deadlock and timeout errors.

Moving on...

Background process trace file. This lil' loggie thingy can be obtained from your udump folder, or in other words the folder specified under init.ora file under the parameter USER_DUMP_DEST. Oracle server dumps information errors detected by any background process into trace files. These files don't usually contain tuning information; however if you are tuning user trace files then it will help you gather some stats on what's going on based on a specific user. This is the highlight of today's post:

How do i collect stats from User Trace Files?

First of all, let's look at how we can perform a Session-Level Trace:

SQL> Alter session set timed_statistics = TRUE;

SQL> Alter session set sql_trace = TRUE;

Now, get some information on your session by performing the following query while logged in as sysdba:

SQL> Select sid, serial#, user, osuser, machine from v$session;

You may want to format the columns for a better view (e.g. SQL> col machine format a25). Get the SID and SERIAL# of the user you want to dump to trace. Now, execute this package:

SQL> execute dbms_system.set_sql_trace_in_session ("SID","SERIAL",TRUE);

Once you get the 'procedure compiled successfully notification, return to your C:\> and run TKPROF.

Note: Tkprof is a tool in oracle for formating trace files to a readable format. To run TKPROF perform the following in C:\>

C:\> TKPROF C:\\udump\_ora_####.trc C:\outputfile.out sys=no explain=username/password

where: [""= Instance Name, "outpufile.out"=Name of your output file for review, "sys=no"=Do not report on sys user SQL statements, "explain=username/password"=Your Oracle Username and password.

Your output file should look something like THIS.

How do I interpret this file?

I'd like to say you can burn it in a cup, add some hot water and drink it down while chanting "oracle, oracle, oracle" but that doesn't work. There are some basic legends in the text files itself, but to understand more, it's best you look it up through or better yet if you're a metalink user, then head on down to Metalink. Alternative option will be to look it up at oraperf. Oracle documentation usually helps so use that.

Alot of people prefer gathering stats through OEM (Oracle Enterprise Manager). I prefer using command prompt cause it gives me the whole Matrix feel, especially if you set your screen colour to black and text to neon green. ;).. I guess it's always best to start from command line cause you grasp the concept better.

Stay tuned for next session on running Statspack!


Thursday, December 15, 2005

Oracle Rawks My Sawks!

I've been blogging about tweaking XP so much, im kinda bored of it. Okay, so maybe 4 posts on XP can't quantify as "So Much".. but then again, it's my blog so i'm gonna say it's enough for now. ;) Besides, i can't think of anything to write today on tweaking Windows.. maybe something will pop into my head tomorrow.

What's fresh in my head though, is Oracle 9i Tuning. Personally, i find Oracle to be one of the most kick-ass RDBMS. PostgreSQL is cool cause it's free but for enterprise deployment, i'll put all my money in Oracle. MS SQL? ermmmm... moving on. =p

Alot of DBAs deploy database and then forget about it.. until users start calling and asking why does it take 1/2 hour to print report 'X' when it used to take 3 mins? Data grows baby and if you don't manage it, you're digging your own grave. Before moving on to more technical tips on database performance tuning, I'd like to cover some of the basic tuning phases every dba should know or cover appropriately.

In a nutshell, tuning can be divided into 4 phases:
  1. Application design and programming.
  2. Database Configuration.
  3. Adding a new application to an existing database.
  4. Troubleshooting and tuning.

1#: Application design and programming

The fundamental of all tuning. 75% of the time, your users are breathing down your neck on performance due to this problem. The best way to do this, run statspack and see what kinda statements are being parsed. Statspack is god's gift to DBA's. Use it. (Will cover more on this)

2#: Database configuration

Always plan data configuration to ensure shorter recovery time and faster data access.

3#: Adding new application to an existing database

Workload changes when new apps are added to an existing system. You must accompany any major change in the workload with performance monitoring.

4#: Troubleshooting and Tuning

Use tools to identify bottlenecks. Examine this data to form a hypothesis. Develop a solution from the hypothesis and implement it. Run a test load to see if it solves your problems. Common performance problems are Bad session management, bad cursor management, and bad relational designs.

Remember, always collect a Baseline set of statistics. This should be when the system is optimal. From there, collect statistics on a scheduled basis and monitor for degration.

Some tools you can use to tune your database....
  1. Oracle Enterprise Manager
  2. Diagnostics and tuning packs
  3. Statspacks
  4. Dynamic troubleshooting views
  5. dba_xxxxxx dictionary views
  6. Oracle wait events
  7. utlbstat.sql and utlestat.sql scripts

I'll drill down more into using SQL Scripts and tools to manage and tune your database. But not today ;) Cause i have to sleep. Most of you probably have left this site reading the first few lines.. Those of you who did manage to reach this far.. thanks for reading my textbook bullshit ;)

Tomorrow, i hope to drill down to the more techi shit. Those who do return to read it, well i hope it helps you and if it doesn't, thanks for wasting your time at techrawks!

Tuesday, December 06, 2005

Terminal Server burns my nuts

LITERALLY. And it caused me to miss 1/2 day of my critical Oracle Fine Tuning training!! Frankly, I'm all for Windows technology even though sometimes their solution may cost a bomb but yesterday, My Windows Server 2003 running Citrix played a bloody cruel joke on me. Terminal Service expired on me, even though i have close to 100 licensed CALs installed! WTF!!

MS really got to lighten up on the licensing man.. Have you ever tried activating or reactivating your windows CAL? It's a freaking pain in the ass if you ask me! Anything i install for oracle doesn't ask me for freakin' serial number. But when it comes to windows... you need open license number, authorization number, activate over the net, key in MORE serial numbers and finally, calling ol' Bill himself for the final 1,200 character long, alphanumeric serial unlock. Okay im just kidding on the last part. But the actual process is pain-staking enough!

And don't get me started on Citrix. Can't the damn thing work the way it should?? I have it running on state of the art hardware yet, it never fails to kick me in the nuts everytime i don't have time to play with it!! The whole fact that it can't run without Terminal Service, The moment it expires, fails, what ever (When it really shouldn't!!).. Citrix falls like a sack of bricks from a 10 storey building. And for the same sad fact, after you finally get terminal service to work again, Citrix won't bloody innitiate! *ArrrGGggGGggghhhHHHHhhh*

Question of the day :: IS Citrix really worth running in an enterprise deployment?

Every white paper you read, they tell you the same crap:

  1. Mobility. Applications can be deployed and run from virtually anywhere in the world just from a few clicks of the browser.
  2. Better access management.
  3. Better control of users.
  5. Quick deployment.

What they forgot to mention was::

  1. Rigid.
  2. Not platform independent.
  3. Buggy.
  4. Resource hogger.
  5. works like crap over VPN. (But then again, everything works like crap over VPN).
  6. EXPENSIVE. Bad enough you gotta buy Citrix license, you gotta buy Windows and Terminal Service CAL as well!

Okay okay, so maybe every software has it's pros and cons, and i can't deny that Citrix does make deployment of software easier but today, i feel like ranting about it cause it pissed me off and wasted all of my time for nothing! Maybe if it works better next week. I'll boast about how good it really is. yeah, right...


How Drunk can you really get during and after a Wedding Dinner?

A special congratulations to my good friends Roger, Koma, Ah Liew and 'Lau Pan' on tying the knot this month. You guys are gonna make great husbands and fathers.

Sunday, December 04, 2005

Tweaking XP:: Lesson #4 Get rid of em' balloons!

You know, there's nothing i hate more than that damn XP balloons that pop up every 5 minutes telling ya that something's up with your PC. yeah yeah, informative i know.. but it's information i don't need when im doing my work! If i wanted to know something, then i'd look for it. I don't need you telling me that my desktop needs cleaning up okay! Or that i am 'connected' at 100Mbps. I'm always connected at 100Mbps everyday man, so telling me that isn't gonna make we feel that you've just unleash a wealth of information to me!

Okay, okay.. credit needs to be given where deserved, and yes sometimes it's good to know what's up with your PC, but not every-single-waking-hour when your PC is up and running right?? GEEZ! Personnally, i think it's just a waste of resource, balloons and all. If i wanted to see balloons so much i'd go get it from an ugly looking clown at the circus. And besides, it's not humurous information like this:

Thank god, XP allows us to tweak this. All you gotta do is:

RUN> Regedit



Add a DWORD Value and name it 'EnableBalloonTips' and give it the value '0'.

This should stop those pesky balloons from popping up. And if you get lonely and want XP to return to it's caring state off notifying you for every darn thing that happens, then remove the value you keyed in. Cherios!


Saturday, December 03, 2005

Tweaking XP:: Lesson #3

Performance! Who can stand a pc that starts up and operates slower than grandma doing push-ups? The best tweaks to do on your pc are to enhance performance, all the other cool extras can wait if you ask me =)

So today's little tweak technique is..........

How to keep Windows Operating Data in Physical Memory

Windows XP contains a couple of tweakable memory settings in the registry, one of which is DisablePagingExecutive registry key. This neat little bugger controls whether your OS will transfer it's essential drivers and kernel files to the Virtual Memory. By default, Windows XP allows the system to do this.

General Rule of Thumb. Anything that runs of physical memory is Ferari. Anything that runs from harddisk is kancil. Ka Piissh ? Moving on..

Windows XP will do this, whether you like it or not. So even if you got like 1 GB of memory running on your PC, if you don't tweak XP will still do what it's told to do by default.

So, if you got a good 256MB memory to spare, try this registry tweak to force Windows to keep it's Operating Data in Main Memory:

Under RUN> regedit

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Memory Management

Select the DisablePagingExecutive value to '1'
Reboot your PC.

So how, can ahh can ahh? PC got feel faster like FELALI ah? heh heh..
Try and see for yourself! =)


Thursday, December 01, 2005

And Symantec gave life, in the form of Livestate

I haven't had the chance to blog much recently, partly because the whole of last week was a pretty busy week, so is this week... Had a wedding to attend last week, this week, next week and in two weeks!! Oh, Im on training this week too and Im down with fever and yet, still so much to do! crap, crap, crap.. Nothing i hate more then falling sick. Makes me feel so damn unproductive. How i wished they had anti-virus scans in the form of tablets. Just pop one of em' buggers in and after a good 1 hour scan, your body is free from any sickness.. Fevers and all, begone! Ya, a far fetched idea and in fact, an idea only a geek is capable of conjuring.. Go figure.

Annyywwayy.... speaking of anti-virus, the makers of one of the most widely used Anti-virus systems in the world SYMANTEC recently acquired Veritas Corporation. In my opinion, the merger really edges for consumers. Not only has Symantec began incorporating all their key products into Veritas Backup Exec, but licensing scheme has changed to the advantage of us corporate users. Check this out:

  1. Symantec Backup Exec 10d bundles 10 free Symantec Client Security with every purchase.
  2. IDR (Intelligent Disaster Recovery) now comes unlimited for all servers with just one license purchase for your media server. Before the merger, you had to buy 1 IDR license per server and it costs something like RM2000++ !!
I attended Symantec's launch of Backup Exec 10d last week at Sheraton Imperial KL, and it was there the most cost/implementation effective Bare Metal Recovery solution was revealed to me..


Okay, maybe it's not that cost effective but we are talking about bare metal recovery here...

You can read more about it here

Livestate is sort of like your cross between Symantec Ghost and Veritas IDR. Backing up an entire system literally takes minutes to complete. The same goes for recovery. Just pop the recovery CD in, recover either from your SATA disk or Tape Drive and before you know it, your system is back to pre-disaster state.

Now what's really cool about this piece of software is it's ability to perform bare metal recovery on virtually any box. It doesn't have to be the same configuration as the box that crashed. Like if you had your system running on a dell machine and it blows, you can just as easily recover your entire system on an IBM machine.. even if you have different RAID implementation, recovery can still be performed. Pretty good if you have a mission critical server to bring up if you have SLA with end users on uptime.

I would seriously recommend Livestate if you can afford it, but if not using IDR with your Backup Exec is just as good. The only limitation is recovery works best only on the same config machine.

Neway, symantec is paying me for boasting their solution, but they did give away free Backup Exec 10d Softwares with Continuous Protection Server during the seminar! ;)

-: Im such a geek sometimes :-

Next topic, Oracle 9i Database tuning TIPS! or maybe i'll blog about this new software im about to evaluate.. "Tune-up", or maybe more tweaking tips on XP.. See how first la. ;)

Oh btw, feel free to ask me anything you need to know on Backup Exec.. Just drop me a comment.