I travel quite a bit and the month of October and November seem to be filled with half my life is going to be spent hopping from one airport to another. Not to mention the amount of screening that go through every single time in every flight. However strange as it might sound, in one of such airport transits I was waiting for my bag to be screened through the machine and I was watching the screen on the other side where the security officer sits. It was interesting because it was a very skillful task as he was finding a needle in a haystack (in the literal sense). He was able to figure out what items, sharp items and toys which are restricted were getting passed through. I was amused and was transported into a world of wonderland because it was quite a challenging task. With these memories not subsiding, I landed to my desired destination and started checking my mails. There was one mail that caught my attention because suddenly it was a junior DBA who was trying to give some permissions and was getting an error. I was quick to get interested because it was a topic around security and I wanted to crack it. The message stated like: Error Fix: Msg 300, VIEW SERVER STATE
Interview Question of the Week #040 – Difference Between Unique Index vs Unique Constraint
Question: What is the difference between unique index and unique constraint? Answer: Add Unique Constraint ALTER TABLE dbo.<tablename> ADD CONSTRAINT <namingconventionconstraint> UNIQUE NONCLUSTERED ( <columnname> ) ON [PRIMARY] Add Unique Index CREATE UNIQUE NONCLUSTERED INDEX <namingconventionconstraint> ON dbo.<tablename> ( <columnname> ) ON [PRIMARY] There is no difference between Unique Index…
Read MoreSQL SERVER – Trick – Running SSMS With Different Windows Account
Recently in one of my interaction with a DBA inside a big financial organization, I was surprised to see that the administrator was logging into a desktop / server using a different credential. What baffled me was the fact that he was logging off. I immediately asked, why are you…
Read MoreSQL SERVER – Database Testing and Waitfor Delay – Notes from the Field #099
[Note from Pinal]: This is a 99th episode of Notes from the Field series. In this episode we are going to learn something very simple but effective about database testing. Database testing is one of the most critical elements for any developer or DBA. If you do not test your code, there are…
Read MoreSQL SERVER – Why Should You Not to Use Old Style JOIN?
If you want to JOIN two tables you can do it in two ways. One using ANSI compliant INNER JOIN and another with old style join But it is advisable not to use old style join. Here is the reason. Let us create the following data sets CREATE TABLE item_master(item_id…
Read MoreSQL SERVER – SSMS Query Command(s) completed successfully without ANY Results – Part 2
What do you do when you encounter something that you didn’t expect? A lot of times such experiences take you to a state of shock or a state of bafflement. The curiosity sometimes pushes you off the cliff to understand why certain behaviors occur. I am fortunate that I get…
Read MoreSQL SERVER – Steps to Backup to Windows Azure storage
Moving to a cloud-based world is inevitable, it is something we need to learn soon. Ever since SQL Server 2014 has been released, the concept of uploading your backups to Blobs with Windows Azure has been around. In reality, performing a backup or restore operations with SQL Server 2012 SP1 CU4 and later requires no additional tools actually, and be done with either T-SQL or SSMS. This blog describes how to perform backup operations with T-SQL. This will be part of a series of blogs to come in the future. Let me walk through the initial steps.
SQL SERVER – Creating a Database Administrator Group Using User-Defined Server Roles
When it comes to security related topics, I always read and learn something new from my friend Vinod. He always comes-up with something interesting and when he was at GIDS event, one of the attendees walked and asked a security question. He was interested in knowing how we can have…
Read MoreInterview Question of the Week #039 – What is Included Column Index in SQL Server 2005 and Onwards?
You may find it interesting that not many people still know what is Included Index in SQL Server. I have seen it personally around me and also have seen at Question:Â What is Included Column Index? Answer:Â In SQL Server 2005, the functionality of non-clustered indexes is extended by adding non-key…
Read More



