All Articles ISJSON-NULL-01

SQL SERVER – 2016 – Check Value as JSON With ISJSON()

I have been wanting to write about the various operators that govern to use JSON and my first shot has been with: SQL SERVER – Getting started and creating JSON using SQL Server 2016. That was like a primer and as I see the subsequent releases of SQL Server 2016 CTP’s, I see more capabilities have been added to this. One of the most important tasks to do is to access the value that is represented in a JSON document. In this blog, let me talk about one of the most important function that can be used to validate / address if the document entered in JSON or not with the help of ISJSON().

Read More
All Articles 116-1-600x400

SQL SERVER – Boosting User Experience with Analysis Services Perspectives – Notes from the Field #116

[Note from Pinal]: This is a new episode of Notes from the Field series. When I was new to SSAS it took me quite a while to understand the various terminology of SSAS. The reason for the same was, I was from networking background and not familiar with many of the analytical terms. I am sure if you are not familiar with SSAS the very first line of this blog “Analysis Services Perspectives are a feature that enable the designer to control which portions of the data model are exposed to the users.” may be confusing. It is alright if you are not familiar with the concept, the goal of this blog post is to understand what is perspective and how it helps user experience.

Read More
All Articles move-tempdb-03-600x285

SQL SERVER – How to Start SQL Server Service Without tempdb?

Before I start explaining the situation, I got into while experimenting with the SQL Server instance on my machine, let me air a word of caution – Please DONOT try this on your production environments. Unless you want to grab unwanted attention from your seniors, this is not something I would want you to ever experiment. In a recent configuration change on my local instance, I was facing an unique issue as I was standing in front of an audience for a SQL Server based session. Rarely does it happen that I get into Murphy’s law of demo not working in front of an audience because I carry multiple backups. Interestingly, this time when I tried to connect to the SQL Server using SSMS, it just refused to connect. I was completely taken aback and what happened after that is a different story about how to start SQL Server Service.

Read More
All Articles Windows-Started-01-600x211

SQL SERVER – Scripting Tip: PowerShell to Identify Last Bootup Time

I know I have been fortunate to write back-to-back on topics around SQL Server. I get a number of you do take time in writing down to me over emails, comments and even sometimes over Skype pings. I see every such mail as an opportunity to learn something from you for sure. One of my friends from the networking team pinged me to check if I knew a query about the last bootup time he had:

Read More
All Articles startingup-02-600x382

SQL SERVER – Starting Up Database – Why Multiple Times in Errorlog?

Fixing error messages is something which keeps me energized because there is something challenging that is put in front of me. I know these can be frustrating times working on errors, but they also make you learn more about the product and make you better. My day life includes creating demo’s for sessions and learning new techniques that will enhance my knowledge. One of the days I started my machine and immediately connected to my SSMS environment to just see that it was taking unusually longer than expected time to get the instance up and ready. Let us see blog post about Starting Up Database.

My instinct was to scan through the ERRORLOG, I found the below series of messages.

Read More
All Articles columnstore-600x400

SQL SERVER – Updating Data into ColumnStore Index with SQL Server 2012

Off late I have been writing tons of content working with SQL Server 2016. Some of the cool capabilities was to introduce the ability to update a ColumnStore index. This was also covered in the SQL SERVER 2016: Updating Non-Clustered ColumnStore Index Enhancement earlier. One of the readers asked me an interesting question about being inside SQL Server 2012 and they wanted to write / update their data on the ColumnStore enabled system and what was the process for them. The email started saying they were getting the following error.

Read More
All Articles 118-414x400

SQL SERVER – Attaching and Restoring Database in Clustering Generates An Error – Notes from the Field #115

[Notes from Pinal]: In my career, I have seen many database experts who are great with what they do, but when they have to work with clustering or AlwaysOn solutions, they usually avoid it. The reason is that there are not many experts who know this subject well enough. One thing I always personally felt that the documentation is also not widely available when it is about clustering. If one receives some error, they are usually lost. This is when I reached out to Eduardo and asked him what can we do to if we face error while attaching or restoring database in clustering environment in SQL Server.

Read More
All Articles state06-01-600x400

SQL SERVER – FIX Error 18456, Severity: 14, State: 6. Login failed for user

One of the blog which I wrote earlier was also on Login failed for user with state 58. Let us see how to FIX Error 18456.

After reading that blog, one of the blog reader contacted me and told that she is getting state 6. I thought this error are very common and is important to demystify some of the reasons for the same. I have asked completed error message to assist him. Here is the message she shared:

Error: 18456, Severity: 14, State: 6.

Read More