Category Archives: Notes

All Articles

An Apple in the Bag

Dear Readers,

Good Story, please read it.

A teacher teaching Maths to seven-year-old Arnav asked him, “If I give you one apple and one apple and one apple, how many apples will you have?”Within a few seconds Arnav replied confidently, “Four!”

The dismayed teacher was expecting an effortless correct answer (three).  She was disappointed.  “Maybe the child did not listen properly,” she thought.  She repeated, “Arnav, listen carefully.  If I give you one apple and one apple and one apple, how many apples will you have?”

Arnav had seen the disappointment on his teacher’s face.  He calculated again on his fingers.  But within him he was also searching for the answer that will make the teacher happy.  His search for the answer was not for the correct one, but the one that will make his teacher happy.  This time hesitatingly he replied, “Four…”

The disappointment stayed on the teacher’s face.  She remembered that Arnav liked strawberries.  She thought maybe he doesn’t like apples and that is making him loose focus.  This time with an exaggerated excitement and twinkling in her eyes she asked, “If I give you one strawberry and one strawberry and one strawberry, then how many you will have?”

Seeing the teacher happy, young Arnav calculated on his fingers again.  There was no pressure on him, but a little on the teacher.  She wanted her new approach to succeed.  With a hesitating smile young Arnav enquired, “Three?”

The teacher now had a victorious smile.  Her approach had succeeded.  She wanted to congratulate herself.  But one last thing remained.  Once again she asked him, “Now if I give you one apple and one apple and one more apple how many will you have?”

Promptly Arnav answered, “Four!”

The teacher was aghast.  “How Arnav, how?” she demanded in a little stern and irritated voice.

In a voice that was low and hesitating young Arnav replied, “Because I already have one apple in my bag.”

“When someone gives you an answer that is different from what you expect don’t think they are wrong.  There may be an angle that you have not understood at all. You will have to listen and understand, but never listen with your mind already made up.”

Create A Love Account

Mother Teresa once said, “There are no great acts. There are only small acts done with great love.” What small acts can you do today to deepen the bonds between you and the people you value the most? What random acts of kindness and senseless acts of beauty can you offer to someone in an effort to make his or her day just a little better? The irony of being more compassionate is that the very act of giving to others makes you feel better as well.

To practice being more loving, create a love account. Each day, make a few deposits in this very special reserve by doing something small to add joy to the life of someone around you. Buying your partner fresh cut flowers for no reason at all, sending your best friend a copy of your favorite book or taking the time to tell your children in no uncertain terms how you feel about them are good places to start.

If there is one thing that I have learned in life, it is that the little things are the big things. Those tiny, daily deposits into the love account will give you far more happiness than any amount of money in your bank account. As Emerson said so eloquently, “Without the rich heart, wealth is an ugly beggar.” Or as Tolstoy wrote, “The means to gain happiness is to throw out for oneself, like a spider, in all directions an adhesive web of love, and to catch in all that comes.”

From Author’s desk

Dear Readers,

First of thank you very much for reading this blog

I hope this blog will help you in clearing your interviews, daily database issues and will enhance your knowledge.

As you aware WORDPRESS is not supporting Google Ads until you purchase its domain rights due to security reasons.

To earn some money by using Google Ads I have started blogging on BLOGSPOT.COM and the URL of my new blog is as below. I believe I will get the same kind of support and traffic on this blog as well.

http://dbsconsultant.blogspot.com/

Thank You,
Jugal Shah

SQL Server 2008 Interview Q&A

Which types of compression supported by SQL Server 2008?
SQL Server 2008 supports two types of compression namely as below

  • Database Backup Compression
  • Data Compression

Explain Database Backup Compression
SQL Server 2008 introduces a new feature called Database Backup Compression (DBC). This feature allows DBA’s to compress SQL Server 2008 database backups natively rather than taking uncompressed native SQL Server database backups or using a third-party tool. By default, database backup compression feature is turned off in the SQL Server 2008.
Using the Database Backup Compression feature, we can perform Full, Differential and Transactional log compressed backups.

Which SQL Server editions supports database backup compression feature?
Currently this feature is only available in the Enterprise Edition of SQL Server 2008. However, all editions of SQL Server 2008 allow the restoration of compressed database backup.

What are the pre-requisites for using database backup compression feature?

  1. SQL Server 2008 Enterprise edition
  2. Enable database compression at server level
  3. User WITH COMPRESSION clause while taking FULL, DIFFRENTIAL and LOG backup

How to enable database backup compression feature at server level?
You can use below TSQL code to enable the DBC at server level.
USE MASTER
GO
EXEC sp_configure ‘backup compression default’, ‘1’
GO
RECONFIGURE WITH OVERRIDE
GO

SP_Who Process status

Status Description
dormant SQL Server is resetting the session.
running The session is running one or more batches. When Multiple Active Result Sets (MARS) is enabled, a session can run multiple batches.
background The session is running a background task, such as deadlock detection
rollback The session has a transaction rollback in process
pending The session is waiting for a worker thread to become available
runnable The session’s task is in the runnable queue of a scheduler while waiting to get a time quantum.
spinloop The session’s task is waiting for a spinlock to become free
suspended The session is waiting for an event, such as I/O, to complete

Reference taken from microsoft books online