Tuesday, June 30, 2009

Dear Manager - Please Delegate

Some managers do not delegate work to their sub-ordinates, why?

Reasons:
  1. Manager has no patience to teach his sub-ordinates on how to do some of the stuffs.
  2. Manager simply doesn’t trust his sub-ordinates.
  3. He thinks he will lose the control of the department, as he cannot keep up with – “what is happening?” kind of stuff
  4. Some managers hesitate to delegate thinking that, what his subordinates will think of him – “he just dumps everything on us and browses eBay all after-noon”
  5. Manager thinks the sub-ordinates are not intellectually capable of handling the work.

While manager is one who has capability, maturity, strong business sense and can play the role of a mentor. If this is what manager is then he should not be worried about any of the above.

As a manager you should trust your sub-ordinates and have full faith in them and depend on them, else your boss will ask you – What is your productivity, with 7-8 members under you? And you will have no answer.

Many a times, you will face situations where you think, its better you do it yourself instead of teaching your subordinate, just because you don’t have time and patience to deal with, you cannot slip away from taking the role of a “mentor”. You have to develop that quality of being patient and teach your sub-ordinates. Teaching and making your sub-ordinates more productive is the best time-investment that can count on.

You should keep tab on what is going on in your department to the extent of what is happening, it’s not necessary to understand how it being done. You simply cannot keep account of every piece that happens within the department. It’s like driving the car at its optimal speed, whenever there is some noise or you suspect some performance issue, you need to open the hood and check it out. As a manger you should be spending more time on thinking how to improve the effectiveness of the team rather than looking each individuals tasks and taking account of them.

Yes manager has to browse the world (not eBay) to gain knowledge and develop new thoughts or ideas. However do not forget your sub-ordinates (your team) have more ready ideas and thoughts that can directly affect your team’s effectiveness. So first listen to them and see if you can materialize them.

Read the above paragraphs above about your personnel development again. You have to give knowledge, capabilities and have to trust your team and that’s the way you can develop some level of independence within the team. Do not paralyze your team by making it dependent on you for every decision that you make for them, soon you will be the bottleneck and you will be in stress.

Sunday, March 29, 2009

How to Back Up the Transaction Log When the Database Is Damaged





This is one of the best and most frequently asked question in the SQL DBA interview especially if you are being interview for "Production Support DBA" role.



"How to Back Up the Transaction Log When the Database Is Damaged" aka "how to perform tail log backup" - you will face this kind of issues when your database which get corrupted and goes in suspect most while in use or when you recover from a server crash mostly in cases like disk failures. When such failures occur your best method to recover the data is to restore your backup (full/diff/t.logs), so when do we need the tail log backups ?



Assume a case like this one - you take a full backup every night and differentials every 4 hrs. and t.log backups every 15 minutes, which most of us do. Suppose your t.log backup was about to start at 11:15 AM and crash happens at 11:13 AM. So, we are left with a gap of 11:00 AM to 11:13 AM transaction - how do we recover from this gap, yes we depend on tail log. There is no gurantee that you will recover best all of the data, but is a "best effort" strategy as a responsible DBA.



Here is the T-SQL command,




BACKUP LOG TestDB TO TestDB_FullRM_log1 WITH NO_TRUNCATE
GO




Notice the keyword "NO_TRUNCATE", why we need it ? - NO_TRUNCATE clause allows the active part of the t.log to be backed up even if the database is inaccessible/offline, provided the transaction log file is accessible and undamaged, this is very important so keep it in mind :) - for interview as well as for real case where you are required to recover the database from a failure.Why it's called tail log ? - because this is the last backup taken from the failed database in order to recover from failures.


About Me

By profession I am a Database Administrator (DBA) with total 13 yrs. of experience in the field of Information Technology, out of that 9 yrs as SQL DBA and last 3 years in IBM System i/iSeries and DB2 LUW 9. I have handled Developer, plus production support roles, and I like both the roles. I love and live information technology hence the name "Techonologyyogi" Apart from that I am a small, retail investor, with small investments in India and United States in the form of Equity holdings via common stocks. Don't ask me if I have made money, I have been loosing money in stocks.