In recent past, I have renamed my VM and wanted to make sure that everything is fine. This renaming process is also needed for changing the server names called inside of SQL Server too. So I searched to know various places from where we can get host name and SQL Server name. Let us learn in this table how to change server name? Finally, I formed this query which can gather same details from various sources:
Interview Question of the Week #028 – T-SQL Script to Detect SQL Server Version and Property
Here is a very basic question I just came across the other day. I was interviewing nearly 20 candidates and I found that only 5 of them could write the query (with the help of the internet). Question: How to determine the version and properties of SQL Server with the help of…
Read MorePOSTGRESQL – How to Create Function? – How to Declare Local Variable
I have written few courses on PostgreSQL on Pluralsight. You can watch list of all the courses over here. Recently, after watching my courses one of the user who is familiar with SQL Server but just beginning with PostgreSQL asked me very interesting questions. Let us here the question in…
Read MoreSQL SERVER – Puzzle – Working with functions to Concatenate columns
Every now and then I get pulled into coding review sessions and those are some of the fun times I every have working with T-SQL of any sorts. This blog is inspired by one such time where I saw at a customer location a code that was lengthy and in…
Read MoreSQL SERVER – Identifying Blocking Chain Using SQL Scripts
There are a number of blog posts that have been written on this very topic. This can be from basics to almost advanced in many ways. I am outlining some of them here below: SQL SERVER – Quickest Way to Identify Blocking Query and Resolution – Dirty Solution SQL SERVER…
Read MoreSQL SERVER – Creating Dataset Using VALUES Clause Without Creating A Table
You know that you can add data to a table using VALUES clause. But did you know that you can create a dataset using VALUES clause like a table without adding into another table? Suppose you want to create a data set with two columns named a and b SELECT…
Read More