HeidiSql connection to MS SQL Server LocalDB

后端 未结 3 1615
执念已碎
执念已碎 2021-02-03 23:04

I have been trying in vain to connect to my SQL Server database, attached to the LocalDB instance (localdb)\\v11.0, using HeidiSql and Windows Authentication.

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-03 23:34

    For normal SQL Server instances rather than LocalDB instances:

    I realize this question asks about local db; however, this result came up when I was looking around and this answer would have helped me.

    In windows search (press enter and type to search) enter "sql server configuration manager". Open that, but make sure you are not opening "sql server master data servervices configuration manager" that is not correct. For me, the first time I had to look be low it in the results under "apps".

    Then Click "SQL Server Network Configuration".

    If that does not come up, you can manually open the file. See: https://docs.microsoft.com/en-us/sql/relational-databases/sql-server-configuration-manager

    For me it is at "C:\Windows\SysWOW64\SQLServerManager13.msc"

    Double click "Protocols for [your instance here]"

    To access connect using something besides SSMS, you'll need to choose to enable a named pipe, or TCP/IP.

    TCP/IP

    Right Click "TCP/IP" and click properties

    Change "Enabled" to true

    Change IP4 (or the one with 127.0.0.1 as the IP Address) to be enabled.

    Click "Ok".

    Jump to restarting

    Named Pipe

    Right click "Named Pipes" and click "Properties"

    Change "Enabled" to true

    Copy the "Pipe Name" and use that in your database client later

    Jump to restarting

    Restarting

    As you are warned, you need to restart the service, so click "SQL Server Services" on the left

    Right click "SQL Server ([your instance name])" and click "Restart"

    You can now use your database client to browse your sql server instance. In heidi, you simply select the network type that matches your setup - choose "Use Windows authentication" and fill in the appripriate hostname/ip (the pipe name or the ip depending on which method you chose to use)

提交回复
热议问题