SQL Tips – 5 SQL Server Best Practices

In this blog post, we will see 5 SQL Server Best Practices.

SQL Server Best Practices

SQL Tips - 5 SQL Server Best Practices dilbertbestpractices-800x450

1) Backup Master. I am going to have a backup of the database using script; however, the backup script has not been updated for a long time now. Last time, I noticed that I was not getting the master database backup. And no matter what one suggests, I still think it is very important to have a backup of the master database. I am going to alter the script to have a correct backup of the master database.

2) Online Indexing. I have upgraded my server from SQL Server 2005 Standard to SQL Server 2008 Enterprise. On the other hand, I never changed the index rebuilding script. One of the tables is very huge and when indexes are rebuilt in it, it often gets broken. I plan to change the index rebuild script to include the option of (ONLINE = ON). This will be good to avoid the time outs.

3) Restarting the Server. I have the server connected to the UPS and even though we have lots of very short power outages, my server is not affected, fortunately. I almost forgot when I really restarted it. Although, it is not necessary to restart server at all, this procedure is intended for my windows box, which has many updates installed but I have not rebooted it in order for these updates to take effect. This may not be the best technique, but it works enough for me because my data is not that critical. If you are maintaining a high-availability solution, I suggest that you have failed over solution implemented before restarting the server.

4) Wait Stats. I recently learned about Wait stats. I am eager to know what Wait Statistics really are, and what they can do for my server. Due to the fact that I have not upgraded the hardware for many years now (although I have upgraded the OS, SQL Server version and huge data growth), I could find out which of my hardware needs an upgrade.

5) Fresh Air. I will make sure that after all of the above tasks are completed I am going to go out with my family and breathe some fresh air.

Reference: Pinal Dave (https://blog.sqlauthority.com)

Best Practices, Database, DBA, SQL Server
Previous Post
SQL SERVER – Check Advanced Server Configuration
Next Post
SQLAuthority News – A Monthly Round Up of SQLAuthority Blog Posts

Related Posts

55 Comments. Leave new

  • Many Happy Returns of the day! :)

  • Hey Pinal !!!

    wish you many many happy returns of the day….May you keep making progress in all aspects of your life.

    God Bless you:-)

  • Hi Pinal Sir,

    Many Many Happy Returns Of The Day.

    Sandip Bagwe.

  • Feodor Georgiev
    July 30, 2010 12:57 pm

    Regarding the backup – make sure you also test the back up and also make sure that the resource database is backed up as well.
    Regarding the ONLINE rebuild – you can get a script which automatically determines the edition and does the ONLINE rebuild for you.
    Regarding the wait stats – the best thing to do is to actually “dump” DMV data about wait statistics to a database ever our, lets say, and then analyze the data for a period of time.
    Also, keep track of the file stats, stalls, etc.
    Fresh air is important, as well as good food and especially good desert. :) Make sure you get some GOOD cake on your Birthday.

    Happy Birthday!

  • Hi Pinal,

    Count your life by smiles, not tears.
    May all your dreams and wishes come true coming years.

    Happy Birth day Sir.

    Wishing you a happy and prosperous birthday ………:-)

    Suhas R. Kudekar

  • Happy Birthday Pinal!
    KR, Laci

  • Devaraj Diraviyam
    July 30, 2010 2:01 pm

    Hi Pinal,

    Happy Birthday to DB Expert.

    Congrats for all your achievments.

    All the best for your new achievement in this year.

    Have a Great (B)Day

    -Devaraj Diraviyam

  • many man happy returns of the day, Pinalbhai.

    Viral Shah

  • Many more happy returns of the Day …….

  • vishal kadiwala
    July 30, 2010 2:22 pm


    Happy birth-day Pinal.

    Wish you many many happy returns of the day.


  • Thanhtien501
    July 30, 2010 3:02 pm

    Happy birthday to you Pinal. enjoy with your family :)

  • Many many happy returns of the day

  • Rajesh.Dharmakkan
    July 30, 2010 5:05 pm

    pINAL , wISh yOu A mANy mORe hAPPy rETURNs oF tHe dAy.

  • Sandesh Segu
    July 30, 2010 5:47 pm

    Happy Birthday…

  • Anup Warrier
    July 30, 2010 6:48 pm

    Hi Pinal,

    Many Many Happy Returns of the day,Have a great year ahead.

    You are one of the persons who makes me think on how to move forward when it comes to career terms and I greatly appreciate all your hardwork to make this blog stunning.


  • Imran Mohammed
    July 30, 2010 6:55 pm

    Happy Birthday Pinal.

    Enjoy your day.


  • Wish you a happy birthday, enjoy the time with your family, have fun…

  • Happy Birthday Sir

  • Many happy returns of the day !!

  • Chintak Chhapia
    July 30, 2010 10:07 pm

    Many Many Happy Returns Of The Day


Leave a Reply