A closer look at everything related to SQL Server

file000280483350

We know, that the TAJ MAHAL is a symbol of love, built by the Emperor Shahjahan because of his IMMENSE, UNBOUNDING LOVE, for his wife Mumtaz.

BUT, the lesser known facts are:-

1. Mumtaz was Shahjahan’s 4th Wife out of his 7 wives.
2. Shahjahan killed Mumtaz’s husband to marry her.
3. Mumtaz died during her 14th delivery.
4. After her death Shahjahan married Mumtaz’s sister.

Would you now look at Taj Mahal the same way as before knowing these facts?
Do History books ever tell you the facts ?

TSQL 2012 IFF Function

In a nutshell, IFF function is a shorthand for Case function. Here is the example to illustrate its use and syntax.

Create database myDB;
Go
Use myDB;
Go
Create table Employees (id int, name nvarchar(30), city nvarchar(30), region nvarchar(30), country nvarchar(30));
Go

Insert some records to play with. Read the rest of this entry »

Here are the #TSQL2sDay prompts from Erin Stellato.

Here is how my day look on Thursday July 12th 2012.

7:00 AM

Came in 2 hours early to patch a critical sql server. Installation of 25 windows patches took 30 minutes.
Completing it with verifying everything another half hour. I used the waiting time to check my outlook inbox and my Hotmail emails.

8:00 AM

Replied to several emails that needed my attention. Spoke to my manager (offsite) about the issues
that happened yesterday as he and other Team members have to pitch in to patch and restart 12 servers yesterday. Those were my responsibility but I had an off day yesterday.

9:00 AM

2 days ago, I have ugraded 8 OLAP servers to SQL server 2008 R2 (SP1) from SQL server 2008. Today the team lead is saying that  they are experiencing and issue and it looks like a bug introduced by upgrade. He wanted to know how difficult it is to undo the upgrade. DBA’s life is always challenging in that way. So the normal looking day turned into an interesting one. I kicked myself into high gear and started my research.

10:00 AM

Attended a webcast on sql 2012 Availability Group from Pragmatic Works by Ross LaForte.

11:00 AM

 We recently had a new Dell SAN called Compllent attached to 3 servers each of them have a DB of 10 TB. They are exactly same and used for reporting. They are loaded from staging DB in parallel. Ops informed me they need to create a snapshot and I have to detach DB one by one on each serve. Steps involve: lien the server, detach db, stop sql server, ops did the snapshot, I have to start the sql server and attach DB. Verify that everything is fine. This database has monthly filegroups (for easier backup strategy) so need to make sure all FGs are attached. Let the attach create the new log file.

12:00 PM

Went to grab a sandwich and did my lunch at my desk. Logged my WebMD fitness and food log. Checked tweeter and followed couple of links to read if it fascinated me. Tweeted what I found interesting.

1:00 PM

 I have patched one server on Tuesday on which we use 3rd party high availability tool called Neverfail. It is very different then Microsoft failover cluster or Microsoft replication but both these terms are used in it. Neverfail cluster has 3 nodes namely Primary, Secondary and Tertiary. The replication Usually takes 20 hours (in our environment) to complete but it was still running after 60 hours. Opened ticket with them which they will Work with me tomorrow but in the mean time I gave 4 gb more to OS so replication can move faster. Reviewed Logs to find out any other hardware related issue. Also I have to do lot of communication with users of this server.

2:00 PM

 One development server was scheduled to be upgraded to sql server 2012 today. I had prepared by running upgrade advisor and informed the interested party about its report showing some issues with the code after the upgrade. Still they wanted to move forward with in place upgrade. But I have to postpone it after I received installation error because C: drive had only 2 GB free (total C: drive was 25 GB, old 2950 dell server). Requested Ops team to create a VM replacement for this server. There was nothing that can be deleted from C: drive. SQL 2008 R2 install was on C: drive and sql 2012 in place upgrade install needs atleast 6 GB of free space on C: to work. My plan is to install sql 2008 R2 on VM. Restore user databases and logins and jobs and linked server and whatever packages user need to migrate. Then do the in place upgrade to SQL 2012.

3:00 PM

Helped Junior DBA (remote), hired 2 months ago, to install sql server in a step by step fashion according to our 

SOP. Helped her via IM, phone and email.

4:00 PM

 There were few requests pending since morning to give permission on certain object to certain groups and users. I completed that and informed the users. Next I completed this log to record my day today.

5:00 PM

 Wrote email to ops to change the registry setting on one of our backup servers. I have researched the errors on Tuesday and had 2 documents prepared. Over the weekend most of our backup jobs run on most of our servers and goes to one backup server. Sometimes backups (usually transaction log backups) fail with OS error 87 ‘setendoffile’ that end of file not found. Apparently the error occurs when OS estimates certain space for backup but the compressed backup actually takes different amount of space so when OS tries to correct the end of file it sometimes times out. Solution we will try is to add a registry key of SessTimeout = 300 seconds. Default is 60 seconds.

Who does not want to accomplish more in a less time? If you don’t then I doubt you will be reading this. Trick is to be selective. If time is a constant and you want to accomplish more, here is the equation comes to my mind.

More work done = Time X Selectivity

Since Time is a limited quantity and you can only increase it so much and very soon it becomes a constant. So your only option (according to my equation) is to increase your selectivity. And what is selectivity? In my opinion, weeding the junk out of your life and really know what are few most important things in your life is the selectivity.

It is easier to say remove junk out of you life and choose only important things. But this is actually the crux of the problem. How we do that? It is not something you can do in an hour or a day. It requires deep thought and concentration. It requires you to go through your motives, pros, cons and values for each thing you are currently spending time on. This requires you to record them in some way such as on a sheet of paper, on iPad, smartphone or simple old spreadsheet. Also you need to go over it multiple times. Maybe you need to include and ask for advice from your significant other or someone important in your life. Beware, you don’t live in a vacuum. Your decision to select what is important is going to affect you as well as the people around you.

There are many books, blogs and tools available that can help you sort things out in your life. Here is the one simple tool http://www.mindtools.com/pages/article/newHTE_91.htm. I will not bore you by repeating what is written at this link. But I will assure you that it will help ease the process of beginning to identify junk in your life and once you get your focus, you may or may not need to use this tool.

So there is no trick or magic to get more work done in a limited amount of time. It is the same old focus and organization to do the task which are most important to you that will give you the most satisfaction.Once you have gone through this difficult process of selecting most important things and applying your time and energy towards them, you will feel more satisfaction and you will feel more accomplished.

Also note that in the above equation I have used the operator of multiplication instead of an addition. Because even if you increase your selectivity by a small number, the effect of satisfaction of getting work done will be much higher.

Wish you best of luck.

Cheers!

“Everyone knows what attention is. It is the taking possession by the mind in clear and vivid form, of one out of what seem several simultaneously possible objects or trains of thought…It implies withdrawal from some things in order to deal effectively with others.” (Principles of Psychology, 1890)

Brad M. McGehee, Director of DBA Education, Red Gate Software posed this question to all who are now Database Administrators in their professional lives. Read more here: http://www.bradmcgehee.com/2012/02/february-question-if-you-werent-a-dba-what-would-you-like-to-do/

 

Although I have not given any type of formal thought to this question before, yet I did not have to think long when I read his question. I love to sew clothes. I think this is in my genes.  My mom, who is alive and back home, was an excellent seamstress in her time. I remember in my childhood watching my mom, pondering over an impossible short piece of cloth and finally figuring out what pattern will work and producing a magical garment without any flaws. It was just very mesmerizing for me. I will sit for hours watching her measuring and cutting pieces of fabrics, then matching the thread, ribbons and buttons to sew with it. I would ask her questions and sometimes when she thought she had good handle on the project she would let me help her. I cannot explain how much happier that made me. My mother got the formal education on sewing from the school where she was raised and came first in exams in her district. I, on the other hand, had not received any formal education in sewing because my parent thought that this will not help me pay my bills in my life. So they stressed me to pay attention solely to my school and my homework. But I would not miss any chance to create stuff from the left over fabrics that my mom would through in the waste basket. Though she never encouraged me but sometimes when I showed my creation to her, I would see a slight smile at the corner of her lips or an extra pause to look at my piece or sometimes just a slight brightness in her eyes. And that would confirm me that I had done a good job. But she would never praise verbally because she thought that will divert my attention from my education.

 

Fast forward to 5 years back, my husband bought me a sewing machine as a birthday gift. He knew that I love to sew. Now that my kids were older and I had a set career, I could indulge some of my free time to satisfy my hobby and passion. I have created several outfits for myself and people ask and I tell them my mom sent me from back home. I have created beautiful bed sheets and pillow covers. I send pictures of my creations to my mom back home.  But it is not the same. I cannot see her lips curled slightly upward at the corner or that light of pride in her eyes.

So my answer to Brad’s question would be if I were not a DBA, I would be a Seamstress.

If You Could Bottle It, You’d Be A Gazillionaire

Posted on January 10, 2012 by Cathy Eng

Cathy Eng Blog: http://resumerocketeer.com.superior-it.com/blog/?author=2

Check out The Women’s Center of Jacksonville (http://www.womenscenterofjax.org/).
Posted in Career Development

Working with Deadlines

My #memeMonday post is here.

As a DBA, aside from scheduled and unscheduled maintenance tasks, we often have projects with deadline to work on. I usually break down my projects into smaller deliverable tasks. For example, a 3 month project may have 3 to 6 deliverables or  tasks, depending upon the type of project. These interim tasks give me confidence that I can deliver the project on time. This also helps me see any potential problems early on which could otherwise impact my final deadline. For each of these task, I try to anticipate and visualize the final deliverable and how it will fit with other tasks of the project and keep on tweaking as I go along. Another important thing is not to keep everything in mind. I write down and document as much as I can. Having broken down big project into manageable chunks, I make sure to address any problem in a timely manner. Last but not least, if all else fell, I do not fail to communicate early on if I am not going to meet the deadline. Not only that, but I also communicate the reason and the action I am going to take to resolve the problem that is sitting between me and my deadline.

Goal #1: Loosing Weight

I am hanging at 172#. It was 173# a week ago. So I am in a positive mood and hence decision to join this online support group. This is my first time ever participating in any support group. I always struggled with my weight in private. I like my weight to be around 145#. I would consider this as my lifetime goal. It means that after I get to this ideal weight, hopefully in 2 or 3 years, I like to keep it and maintain it for the rest of my life. Discipline of maintaining what I have lost is a big issue with me. And this discourages me next time when I start again. I think ” what’s the point? It is going to come back again.”. So this time I will try something new. I will call it “wait and watch”. I will explain it shortly.

My goal for 2012 is to loose 15#. Wait a minute! Do not call me chicken yet. I want to start small so chances of success increases. I guess there is nothing wrong with that. First 3 months, starting today till April 16th 2012, I am planning to loose 10#. Yes, you read correctly, 10# only. Next 3 months, I am going to watch and concentrate on not gaining a single ounce up. So that means I will still be filling out my work loss spreadsheet. I will continue going to gym etc and if I loose any more pounds, I will consider it as bonus but loosing weight will not be my primary objective during this period. Then for the next 3 months I am planning to loose another 5#. Again for the last 3 months of the year I will “wait and watch”.

I can only speak for myself. Knowing myself, I think this gentle attitude towards loosing weight will make it more like for me to loose weight and keep it off. But I sure like to hear other people input about what they think. Have you tried anything like this before? Did it work?

Goal 2: Control my OCD

This is going to be very hard to explain. I have been suffering from it for about 8 years now. Each year I notice that it gets worse. While I have made many advancement, improvements and accomplishments in my personal and professional life, yet I have this little thing that I cannot control. I have been to doctors and I know what I have to do. I have to use my will power and be attentive to triggers. So my second goal is to pay attention every time it triggers and try to calm it down before it gets worse. I know some of you may not understand what I am trying to say without much details here but this is how much I am ready to tell now. Maybe with little success, I will be able to share more in future.

Thanks to Jen and Sarah for starting #GetHawt. Together, we all will make each other very Hawt.

http://weowls.wordpress.com/2012/01/16/invitation-to-gethawt-friday-002-the-buddy-system/

  • Death of Osama Bin Laden, May 2
  • Packers win the Super Bowl, Feb. 6
  • Casey Anthony verdict, July 5.
  • Charlie Sheen, early March.
  • Death of Steve Jobs, Oct. 5 
Follow

Get every new post delivered to your Inbox.