Change a Sql-Server (express) from a named instance to localhost?

后端 未结 3 2071
粉色の甜心
粉色の甜心 2020-12-14 19:29

Is there a way to change a mssql express from a named instance to localhost?

When first installing the server I gave my mssql express server, a name. Now, working on

相关标签:
3条回答
  • 2020-12-14 20:01

    If you don't specify an instance name when connecting to a server, it will look at port 1433.

    By default, the MSSQLSERVER instance (i.e. the default) will be assigned this static port.

    By default, any named instances will be assigned dynamic ports which are discovered using the SQL Server Browser service.

    You might not be able to rename an instance, but you can change its port number.

    For your named instance, you need to set it to the static default SQL Server port, i.e. 1433. Obviously TCP/IP will need to be enabled for the instance:

    enter image description here

    Once you've done this, should be able to connect to localhost without supplying a name as it will just try and connect to 1433.

    0 讨论(0)
  • 2020-12-14 20:16

    You can rename the Server name, but not the Instance name. The only way to change it is to re-install.

    0 讨论(0)
  • 2020-12-14 20:24

    This is what worked for me.

    1) Go to SQl Server Configuration Manager

    2) Open SQL Server Network Configuration

    3) Click on my Named Instance

    4) Open TCP/IP

    5) Click on IP addresses

    6) Added port 1433 to all ip's

    (Edit)

    It may be necessary to run the SQL Server Configuration Manager as an admin if the port is uneditable.

    0 讨论(0)
提交回复
热议问题