Interesting Information on Windows “Blue Screen”

January 23, 2012 Leave a comment

Reasons for Windows Crash

Your Windows system / server can crash due to:
- memory access violation,
- kernel subsystem inconsistencies
- driver operational (e.g. USB, display) inconsistencies
One might argue that Widows might as well (in some cases) isolate the hardware and continue operations, but chances are that it might (generally does) lead to memory space inconsistencies, and hence Windows follows a "fail fast" policy attempting to prevent corruption in RAM from spreading to disk.

The Blue Screen

Could be any reason, but actual function responsible for (managing?) system crash is KeBugCheckEx. It makes use of a "stop code" and four parameters which are interpreted on a per-stop basis. This function then switches resolution to VGA mode with blue background and some comments on what user shall do next. It then calls for KeRegisterBugCheckCallback function allowing drivers opportunity to stop. It then calls KeRegisterCheckBugReasonCallback so drivers can append data to the crash dump.

To summarize:

KeCheckBugEx -> paints the screen blue -> KeRegisterCheckBugCallback -> KeRegisterCheckBugReasonCallback.

In rare occurrences, even the blue screen display stage isn’t reached and server crashes before that.

SQL Server 2012 Removed SOAP/HTTP Endpoint

January 16, 2012 Leave a comment

Since our childhood days (pun intended), we have learnt our ancestors telling us that a Database (or any Data-heavy computing layer) should be hosted independent of others. That is, host Database Servers on one/more servers, and don’t share the same servers for other application/web computing. SQL Server® for some reasons, kept the same standard best practice as a recommendation, but at same time rolled out SOAP/HTTP endpoint in SQL Server 2005. But finally, Microsoft® has finally realized for the issue (or it not being adopted much) and has decided to drop off SOAP/HTTP endpoint in SQL Server 2012 (Denali).

To me, SOAP/HTTP has always been a confusing decision (though now, the response for its rollback is equally confusing). You have a .NET based environment and generally accompanied with .NET / WCF Application servers where you could develop full fledged web services. For pure reporting functions, you had SQL Server Reporting Services. So as a Data Architect, it was always difficult to draw the line on where exactly we go about SOAP/HTTP (and I admit, I recommended my teams to keep presentation or decision logic to be on App/Web layers, and keeping Data masking/handling/filtering/logic etc. at Data layer; recommending a clear demarcation among each layer). Not to mention, clear limitations of SOAP/HTTP were also key contributors to the decision. The only viable use that it offered (in my view) was that you could SP directly wrapped within a webmethod directly – but really how many are such cases where you would want that !?

So, am glad a decision has finally been reached to end this confusion. With SQL Server mainstream (for quite some time now in fact), its pivotal to have clear vision and to have efforts spent on right spots, and getting rid of what’s nothing but dead weight. SQL Server Reporting Services is already a robust piece, but yet a lot lacking if we look at other Reporting Tools available in the market. Those who had the understanding / rule of thumb on keeping application functions segregated, I think they shall continue to remember what they already know, and should try forgetting SOAP/HTTP (from within SQL Server).

Right Place, Right Time

January 9, 2012 2 comments

While I was walking out today morning to catch my office cab, I noticed the usual mendicant-young-boy. He doesn’t match with usual beggars or anything like that; he walks with some ingenuity, dignity, seldom talks, and mostly talks of either good doings and/or gods. I have seen him growing, have seen him visiting our streets several times.

What’s so special about it?

I didn’t noticed it much, but this guy doesn’t come along every now and then. He comes on specific days, only on days which hold some mythological values (in India) and when its “said” to be among good values to donate some eatables or household items on those days. This guy calls out importance of these days, and what all is generally guided to be donated on those specific days. He comes almost very early in the morning, I don’t think I have ever seen him around beyond 9 or 10AM.

Now, this guy’s chances of carrying full bags are way much higher than other’s (and he carries a large bag). And simple reason, he spends time to identify what’s the right day and time, and he is around at that time ! And his USP (unique selling proposition) is the information he repeatedly calls out at different common points in a street (and information is mostly re-validated to be always correct by the elder one’s in our family). He is prepared (like many other’s of his kind), but key differentiator is that he tries to be at right place at right time !

There are so many other cases where a person or product has reached great heights just for the reason that it hit right place at right time. There’s a book named Outliers which circumvent around similar idea (though at different intellectual levels obviously!). So, how would one know what’s the right time and right place ? Well, we are far from a formula (at least for now). Till then, follow your heart, be always prepared and look for patterns that you can make use of. Chances are that you too would know the right time and place which is right for your success !

Handling Challenging Times…

Everybody talks of Industry been through tough and challenging times recently, and progressing into another slow down. But that’s too vast a situation. But I believe in thinking individually. You either have a job at hand or don’t. And you either enjoy the job at hand or don’t. Statistics and percentages are for Government, and they are never out of their paying job !

Problems also creep in when you are doing something “un-enjoyable” for a long slot. Chances are you wont do your best, with peers and/or leads being unhappy about it. Now, that’s too challenging / rough times in a way – you being into something that you don’t like, and which you don’t have much control upon !

What do you do then? Start saying no to everything that comes your way (that you don’t want)? Or, Switch? Well here’s the news. Switch doesn’t happen over-night. And with you saying no, chances are you would soon be shown the way out, or worst, be put on to PIP (performance improvement plan).

From aforementioned context, seems odds are all lined up against you (or who-so-ever been in such state). Well; no, that’s not the case. You have some good options which you can try:

1. Remind yourself that its just a patch and will sooner or later be over. As an employee you always have an option to quit, but real joy is in succeeding against all the odds ! Think about the fact what you would have done if you owned the “task” as its real owner.

2. Remind yourself that what you are delivering is probably not your best. And that, there are people who would be ready to do the same job, and yet it will be an upgrade for them (in some cases at least).

3. Talk about the situation with someone who can do something about it. Don’t warm up your phone receivers, or spill coffee in the corridors cribbing about what you are doing and how bad it is. They can’t do anything about it ! And believe me, same message would be something else when it eventually reaches someone who should have been approached in the first instance.

4. Take some time out, at least weekly if not daily. Go over your “wow” moments from the past. Remind yourself that people did appreciated you and your work. And if that happened, chances are that it happened because you took interest in what you were doing. And importantly, remember that if you can “fake” your interest to yourself, you would be back bang-on. 

5. Dont miss out any opportunity to take time off, not deliberate or sick-time-off’s (unless genuine obviously). Enjoy your time. Its generally being said (but hardest to follow), keep your love-life and work-life separate. That’s a really good thing if you can manage for that, atleast attempt at it (its another story though that am till struggling for this last statement). Spend time with your loved one’s. Spend time with someone who appreciates your time – be it from family or at any charity. You will cherish such moments, I can really tell you that !

Now, I am not a Psychologist or an HR pro talking about it. Am talking from my own experiences (Yes, am open to admit that I had some challenging times too, am sure everyone had). And am sure there are more good things that people (i.e. You) would have tried themselves. I will be obliged if you have anything to add to the listing.

2012 Resolutions

January 2, 2012 2 comments

This time round, am a little late (by a day at the least) to put my resolutions to paper. But to me, that’s a sign that I want them to be realistic to the levels that I can commit to them.

Last year brought in lot many good changes. I switched company for first time in my career (after >7 yrs ! ), and boy, was that something ! Its surprising what all HR can expect out of you at times. Winking smile But it was a good – game changing – learning experience. More than that, closing of the year couldn’t have been better. I secured my OCP 11g upgrade, achieved MCITP SQL Server 2008 Certification, ITIL v3 Foundation Certification – all in the last 2 months of the year 2011 !

But the real satisfaction came out from meeting up some of my past year’s resolutions end-to-end. So, here I am, geared up for my next lot all again ! I have the intent already, wishing for “be the force with me”.

1. Health and Exercise Regime:

This is the only aspect of my last year’s plan that actually let me down. I was happy to be keeping well most of the time, with still taking least number of sick-time-off’s in my time (I guess), but yet, am far from the age where I would start pumping my heart mad even at small brisk walks! I resolved for health to be my top priority, but slowly career & capital took over (and I didn’t even noticed till it was too late). This has to and will change this year. Talking specific, my target would be:

  • Reducing weight to 70kgs
  • At least 12kms of walk per week (ideally it should be 21, but let me start with it at least)

2. Quality of Life (new addition to my listing, inspired from my dearest Kapil)

    I have always been a fond lover of Books. I read them online, and hard copies. Last year, I (and my wife) together spent around 8K on books alone, which is not bad at all. I would like to keep it going. Last day of 2011 made me learn another thing. I went out to India Gate with my wife, we spent like 4-5 hours together, had some quality time spent together, and it was good fun (and not that expensive). But there are more aspects I would like to add:
  • Spend at least 2hrs daily in “my” room. If am there, am bound to do something substantial – just that I ditched it more than often last year.
  • Plan out a trip within / around Delhi at least once every 2 months.

3. Socialize and Share

I like to be social (intellectually, not partying stuff!). I love every time I meet up a old pal of mine. And I love it even more when we together resolve some problem/s, in person or virtually. I love it to the levels that its not a task to me, but still mentioning it more to get myself more disciplined at it. So, here’s what I will be targeting for:

  • To leverage my technical know-how (or lack of it), to resolve some online queries on online forums – at least three responses a week.
  • Ask at least one interesting questions each month on the forums I respond to – can be on something new, or something I already work upon (and stuck with). To my surprise, though I love to discuss my problems, I haven’t published any query online in last 3 yrs – straight ! (Though I did blogged about some problems that we resolved)
  • And, am up for that dreading “150 blog posts an year” again – I failed this target last year. Lets try again !

4. Finance

Finance is going on the last spot this year. And am open to say I am happy with it that ways. Last year allowed me enough opportunities to handle my finances well. I think I now have a firm system in place and much of my concentration would be towards keeping the system oiled and running smoothly (though quite much of studies went into it). For this year, I would be targeting for:

  • Closely work with my CA to have clear understanding on Tax liabilities and tax saving instruments (not policies, but otherwise – I have some in place already, but I can learn to do better). Not this Fiscal year, but next year I should be able to calculate and submit my Tax myself (obviously after a review from our CA).
  • Learn to read financial statement of a company/group of companies! Its one thing that has fancied me more than anything else when talking of finances, and this is high time to get it addressed.
Tags:

2011 Resolution’s Scorecard

December 30, 2011 6 comments

Before I start day dreaming on eve of 31st December for “what’s next”, I thought its pivotal to first validate if I made any progress on my “this” year’s resolutions. Though I have tried to do such checks almost every quarter, but think its the time to openly write about it.

Here’s what I resolved for exactly an year ago and my respective status on them:

1. Health and Exercise Regime.

This was at the top for some reason. Because I wanted to give it most attention. Though it didn’t garnered my best attention but it at least got me started. I have some hold on what I eat at the least. BUT. Its still afar from being ideal. I started off with gym, but it got unattended for most of the time. Score: 50%.

2. Financial Stability.

I earlier mentioned I am not very comfortable writing up the details in public. That hitch continues, but scoring is exclusive from that. Score: 100%. Smile

3. At least 150 blog posts.

I was confident of meeting it up, but wasn’t up to it. And even when they came they were generally in clusters, rather than being equi-spaced and consistent. I feel the issue was it being given less priority and even less time to think on the topics. I cant really match some of the real bright minds I admire, who blogged almost everyday. But I also missed the fact that their bread & butter is heavily dependent on blogging and social PR, while mine is not (as yet). Score: 30%.

4. Paperless Task Management.

I think I was able to hit down my 2nd resolution mostly because I was able to set up my calendar with absolute conviction for inline milestones. Same goes for my technical readings and work space. Score: 100%.

On the book reading part, focus shifted a little from “just anything good” to “really good OR technical”. I would like to keep it that ways with a few more strategic readings included.

In end, I think there is no life with zero deviations. On some grounds, I achieved way much more than I had targeted for. On other occasions, I missed a few resolutions. But I think this year has ended with an higher note. Ice on the topping, I was able to shoot down ALL my planned assignments by 28th December itself, which resulted in a “surprising” off for rest of week till the New Year ! ;-D

Tags:

SQL Server Connection Protocols

November 24, 2011 Leave a comment

Amidst of all the jazzy terms and technical stuff, there are times when we simply miss out taking a note of building blocks on top of which our IT systems are breathing. One such topic is that of SQL Server Connection Protocols. Am sure most of us remember the four key protocols, but at times must have felt a void around what they really mean or what’s their clear line of segregation. That’s what pushed me to put this note together.

Four Key connection Protocols for SQL Server are/were:

- Shared Memory

- Named Pipes

- TCP/IP

- VIA (to be depreciated in future releases).

Below is a quick write up for more details on each of them.

TCP/IP

By default, the default protocol for SQL Server clients is TCP/IP. If the connection cannot be made using TCP/IP, the other enabled protocols are attempted.
Connection String Format:
Alias Name   <serveralias>
Port              <blank or Pipe name>
Protocol        TCP/IP
Server          <servername or IP or Localhost>\<InstanceName>

Named Pipes

Both on Windows and POSIX systems, named-pipes provide a way for inter-process communication to occur among processes running on the same machine. What named pipes give you is a way to send your data without having the performance penalty of involving the network stack.
By setting up additional named pipes, you can have multiple DB servers running, each with its own request listeners. The advantage of named pipes is that it is usually much faster, and frees up network stack resources.
– BTW, in the Windows world, you can also have named pipes to remote machines — but in that case, the named pipe is transported over TCP/IP, so you will lose performance. Use named pipes for local machine communication.
For named pipes, network communications are typically more interactive. A peer does not send data until another peer asks for it using a read command. A network read typically involves a series of peek named pipes messages before it starts to read the data. These can be very costly in a slow network and cause excessive network traffic, which in turn affects other network clients.
For TCP/IP Sockets, data transmissions are more streamlined and have less overhead. Data transmissions can also take advantage of TCP/IP Sockets performance enhancement mechanisms such as windowing, delayed acknowledgements, and so on. This can be very helpful in a slow network. Depending on the type of applications, such performance differences can be significant. TCP/IP Sockets also support a backlog queue. This can provide a limited smoothing effect compared to named pipes that could lead to pipe-busy errors when you are trying to connect to SQL Server.
It is also important to clarify if you are talking about local pipes or network pipes. If the server application is running locally on the computer that is running an instance of SQL Server, the local Named Pipes protocol is an option. Local named pipes runs in kernel mode and is very fast.
Default Pipe for a named Instance: \\<computer_name>\pipe\MSSQL$<instance_name>\sql\query
Default Pipe for a default Instance: \\.\pipe\sql\query
Connection String Format:
Alias Name  <serveralias>
Pipe Name   <blank or Pipe name>
Protocol    Named Pipes
Server      <servername or IP or Localhost>

Shared Memory

When you connect to the Database Engine from a local client (the client application and SQL Server are on the same computer), the connection uses shared memory protocol by default. Formats: “”, “.”, “\”, “(local)\”. “localhost”, “.\namedInstance”

For connecting locally but using a different protocol, use:
“servername.domain.com”, “tcp:*”, “np:\\<computer_name>\pipe\<pipename>” etc.

Named Pipes is a protocol developed for local area networks. A part of memory is used by one process to pass information to another process, so that the output of one is the input of the other. The second process can be local (on the same computer as the first.

VIA

Virtual Interface Adapter (VIA) protocol works with VIA hardware. The VIA protocol is deprecated. This feature will be removed in a future version.
Connection String Format:
Alias Name    <serveralias>
Port        0:1433
Protocol    VIA
Server      <servername >\<InstanceName>

Tags:

Interact, In Person.

November 21, 2011 2 comments

Social Media. Big Data Analytics. Marketing. Word of Mouth. SEO. In-Person Interaction.

Out of all above, what is it that would have decisive impact on what you choose at anything like:

- school your kids would go to

- that charismatic site for your first (or any number in fact) house/shop/workshop/factory

- Term or Medical Insurance for your life

- Marriage Material ! ;-D

Today’s world is full of noises when it comes to finding inputs when you want to reach a decision. Information is money, that’s rightly said. But what does it lead to in end. SEO are a paid services. Social Media is sponsored. Big Data Analytics and inferences are based upon funding by big-players. Word of mouth can be a good starter, but rest all (except in-person interaction) are inputs that you may consider, but cant rely. In the end, for key decisions, which matter to your or your loved one’s happiness – are based on In-Person Interaction.

Word Of Mouth indeed makes a difference. BUT, why should I purchase an house from a builder where Sehwag (an Indian Cricketer) is saying its wonderful and reliable. No, I cant, I wont.

Now, it may not be required for each and every thing (e.g. you wouldn’t want to meet chef who originated Chip’s recipe), but you definitely would like to have a word with chef who is going to cook for your beloved in the evening when you are going to propose! For things that are important, remember to interact, in person. Spent some time with your clients, peers, friends, family, so they can make a decision which supports you – financially and otherwise. And trying doing it in person. When congratulating, give them a call. When celebrating, inviting them or join them. When in grief, be around (even if speechless). Even in today’s virtual world, its important to – Interact, In Person.

Tags:

SQL Server 2012 Licensing

November 21, 2011 Leave a comment

The bull is out now. Smile

If you arent yet aware, read the Official Declaration is here. A lot has already been written and speculated so far. I wouldn’t add to it any further.

Key points (read, my interpretations) from Licensing Guide are below.

a. Computing power based licensing now costed on basis of cores, instead of processors. Its to make costing simplified for phyiscal and cloud based setups. (earlier it literally were like two seperate lines, one for physical setup, and other for virtualized setups). And the bummer now. :) You will have to buy 4-core license, at the least! It only means that you will continue to cost almost same as if using SQLServer2008 when you are using quad-core processors. If you are using more cores, then you will have to pay more.
b. Workgroup, Small Business, Datacenter editions retired. Glad to hear that to be honest, the edition listing was literally too long earlier. You now have Enterprise (all inclusive), Business Intellignce (Std + Corporate BI features), Standard (basic Database Engine + Standard BI), Developer, Express, Compact, and Web. I personally still feel that Express/Compact could have been merged into one, but still, at least some clarity has been looped in. Yet though, key point am not able to get my around is that why BI edition is available in Server+CAL licensing only. If you want to go for Core licensing for BI (for cost benefits), go for EE.
c. Virtualized environments can be licensed in two modes: Individual VMs, or maximum virtualization (in case of highly virtualized platforms).
d. VM based licensing follows standard stand-alone server licensing as in point#b. For intra-serverfarm/host provider/cloud movement for a VM, you will have to procure "Software Assurance" along with core licenses.
e. For Maximum virtualization, one shall procure SQL Server Core licenses + Software Assurance for whole server farm.
f. Current clients for EE can upgrade to SQL2012 at no additional cost, with following caveat:
    – it shall be done by 30/06/2012
    – if you are running SQL2008R2 with >20 cores, contact your MS representative for transitioning licensing mode
g. For moving current processor license to core licensing
    – SE/EE per processor under Software Assurance (SA) will be exchanged with 4core licenses per processor, and
    – DataCenter Edition per processor under SA will be exchanged with 8core EE licenses per processor.

Tags:

MySQL– Backups

October 31, 2011 Leave a comment

Different types of Backups for MySQL databases

Logical Backup

It is done by dumping the contents of database into text files containing SQL statements which can be used to rebuild the database. They can be used even to build it on a host with different architecture and with different engine. But they are generally slower than the raw kind, for both backup and recovery operations. And they can be larger than the actual data too. It can be performed using the mysqldump utility.

Raw (Binary) Backup

It involves only file copy operations, so can be very fast to perform backup or recoveries. The engine type of tables cannot be changed in this method, as it preserves the actual data format. Depending on engine type, it can be used to take Cold, Hot or Warm backups. Various tools are available for this operation, which will be covered in a slide ahead.

Snapshot Based Backup

This kind of backup uses external utilities to take file system snapshot of MySQL. For InnoDB, a hot backup can be performed using this, and for other engines, a warm backup.

Replication-Based Backup

A copy of the Primary installation can be maintained on a separate server using a Replication setup. Using this method, an exact replica of the databases can be maintained separately, and can be used for backup purposes. But it is comparatively an expensive option.

Incremental Backup

The binary logs, which contain a record of all changes done on the database can be backed up for the  purpose of doing point-in-time-recovery. Using tools like mysqlbinlog, databases can be recovered from Binary logs till a certain point in time, or certain log position also. Binary logging should be enabled on MySQL servers

Backup Tools

Though backups can be taken without the use of any tool, there are some tools designed specifically to make the operation easier. Some of them have been described here

mysqlhotcopy

Provided with the MySQL distribution, this is useful to perform raw backup of MyISAM type tables only. Contrary to its name, it is not exactly a “hot” backup, as database is not fully available during the operation, but is available only for read. It is locked and cannot be altered. So, it is also called a “warm” backup.

mysqldump

It is provided with the MySQL distribution. It helps in taking logical backups for any kind of engine. Our  current masters are designed to automatically enable this backup in cron at the time of installation.

MySQL Administrator

It is available as a separate GUI download from MySQL, and can be used to perform logical backups. It can also be used with any database engine, and has some tracking capabilities also.

InnoDB Hot Backup (ibbackup)

It is a commercial product available from InnoDB. It performs raw backups of MySQL databases using InnoDB engine only. It is in fact a real “hot backup” as databases are completely available for read and update during the operation.

Third Party Tools

Among the many commercially available third party tools available, there is one called Zmanda Recovery Manager, that can perform both logical and raw backups for all engine types. It can do both warm and hot backups, and can drive Replication and Snapshot based backups too. It takes consistent backups, and has extensive reporting and Tracking capabilities

Follow

Get every new post delivered to your Inbox.