kohera-logo-regular.svg

Make your Named Instance look like a Default Instance

Vector_BG.png

Make your Named Instance look like a Default Instance

Vector_BG.png

Recently I was working for a big international customer who, according to policy installs, Named Instances of SQL Server only. During a huge project deployment, an obstacle occurred: this customer had hardcoded the SQL connection string which pointed to the local Default Instance (even worse ‘.’).

Server=localhost;Database=someDB;User Id=IgnorentUser; Password=IgnorentUserPwd;

This was a problem because our server is not accessible with ‘.’ or ‘localhost’. In a perfect world I would say that this could not go into production, but our customer really wanted this into production that day. We had two options. I could either install a Default Instance on the server or make the current Named Instance look like a Default Instance. Together with our customer we decided to go for the second option. Below I will tell you how.

 

Convert your Named Instance into Default Instance

It is actually very uncomplicated to convert a Named Instance into a Default Instance. First, simply let your SQL Server listen to the Default port (1433).

Next, you want to make sure no Default Instance has been installed. Also, I have a server with only 1 Named Instance (SQL_NAMEDINST) installed. After that, just open the SQL Server Configuration Manager Tool and go to the TCP/IP Protocols Setting.

 

Go to the tab IP Address and look for the property TCP Dynamic Ports.

This is the port to which the SQL browser will listen. It will determine which instance the client tries to reach. The Default Instance of SQL Server will always be listed under port 1433. We will change this port to 1433 for our Named Instance.

After this, restart the SQL Server Instance. The Named Instance will now look as a Default Instance to the outside world.
It will be reachable by:

  • Named Instance Name
  • localhost (.)
  • Default Instance

 

Conclusion

As you can see, making a Name Instance look like a Default Instance is very easy. Moreover, other server applications remain accessible with the Named Instance name. This was the perfect trick for situations as the one I described.

Photo of successful woman coder hacker web creator sitting armchair comfortable workspace workstation indoors.
The hurdles and pitfalls of moving or migrating a System-versioned temporal table cross database
Maybe you already have your own way of doing this and are wondering about alternative methods, or maybe you are...
Group of computer programmers working in the office. Focus is on blond woman showing something to her colleague on PC.
Updating your Azure SQL server OAuth2 credentials in Power BI via PowerShell for automation purposes
The better way to update OAuth2 credentials in Power BI is by automating the process of updating Azure SQL Server...
2401-under-memory-pressure-featured-image
Under (memory) pressure
A few weeks ago, a client asked me if they were experiencing memory pressure and how they could monitor it...
2402-fabric-lakehouse-featured-image
Managing files from other devices in a Fabric Lakehouse using the Python Azure SDK
In this blogpost, you’ll see how to manage files in OneLake programmatically using the Python Azure SDK. Very little coding...
2319-blog-database-specific-security-featured-image
Database specific security in SQL Server
There are many different ways to secure your database. In this blog post we will give most of them a...
kohera-2312-blog-sql-server-level-security-featured-image
SQL Server security made easy on the server level
In this blog, we’re going to look at the options we have for server level security. In SQL Server we...