I have tried to explain the usage of simple WHILE loop in the first example. BREAK keywords will exit the stop the while loop and control is moved.
SQL SERVER – Get Permissions of My Username / Userlogin on Server / Database
A few days ago, I was invited to one of the largest database company. I was asked to review database schema and propose changes to it. There was special username or user logic was created for me, so I can review their database. I was very much interested to know what kind of permissions I was assigned per server level and database level. I did not feel like asking their Sr. DBA the question about permissions.
SQL SERVER – Difference Between @@Version and xp_msver – Retrieve SQL Server Information
Just a day ago, I was asked which SQL Server version I am using. I said SQL Server 2005. However, the person I was talking was looking for more information then that. He requested more detail about the version. I responded with SQL Server 2005 Service Pack 2. After the…
Read MoreSQL SERVER – 2005 – Limitation of Online Index Rebuld Operation
Just a day ago, during one interview question of Online Indexing come up. I really enjoy discussing this issue as I was talking with candidate who was very smart. Following two questions were discussed. 1) What is Online Index Rebuild Operation? Online operation means when online operations are happening the…
Read MoreSQL SERVER – Set Server Level FILLFACTOR Using T-SQL Script
As the title is very clear what this post is about I will not write long description. I have listed definition of FILLFACTOR from BOL here.
SQL SERVER – Types of DBCC Commands When Used as Database Console Commands
Just a day ago, while discussing some SQL issues with one of the Sr. Database Administrator in India, we end up discussing DBCC as Database Console Commands when used as T-SQL. We both tried to remember what are the types of DBCC as Database Console Commands and could not come…
Read More