Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing SQL Server named instance to default instance

This question is in regard to instances. That I asked earlier. Is it possible to change default instance in SQL Server without uninstalling and re-installing? How do we do that if possible? If not possible why is that? Thank you for help :).

like image 719
kinkajou Avatar asked Oct 20 '11 04:10

kinkajou


People also ask

How can I tell if SQL Server is default or named instance?

On the server where the database is installed, go to Start > Run > and type cmd to open a command line window. Replace <server> with the name of the server. This indicates the SQL server on the default instance accepted the command and is ready for queries.

Can I change the SQL Server instance name?

Please keep in mind that we cannot change complete name of SQL Server named instance. Suppose you have installed a named instance SERVERNAME\DBInstance1 on your server. If you want to rename this named instance then we can only change first part of this name i.e. SERVERNAME.


3 Answers

All instanses are named but only one runs as default. Remove the port from the default instance and set the port of the named instance you want as default to 1433 in SQL Server Config Manager under SQL Server Network Config

like image 197
Joe Perkins Avatar answered Sep 23 '22 04:09

Joe Perkins


No.

If you want to change the name of your instance, or make it the default instance, you have to reinstall. No way around that.

like image 35
marc_s Avatar answered Sep 26 '22 04:09

marc_s


This might solve your problem: https://kohera.be/blog/sql-server/make-named-instance-look-like-default-instance/ (Full credit to Stefan, but I'll paraphrase below in case his blog disappears)

The idea is to make your named instance appear as the Default instance.

  1. Open SQL Server Configuration Manager.
  2. Navigate to: SQL Server Network Configuration -> "Protocols for XYZ" treenode.
  3. Right-click on the TCP/IP item in the right pane.
  4. Choose Properties menu item.
  5. On Protocol tab, ensure Enabled is set to Yes.
  6. On IP Addresses tab, scroll to bottom, and enter 1433 in IPAll->TCP Dynamic Ports field.
  7. Then restart your named instance.
  8. You should now be able to connect to your named instance via:
    • (local)
    • localhost
    • . ( <-- that's a dot )
    • 127.0.0.1
    • named instance name (e.g. mymachine\myinstance)

enter image description here enter image description here enter image description here

like image 29
Lee Grissom Avatar answered Sep 24 '22 04:09

Lee Grissom