jimm98y / MSSQLEXPRESS-M1-Install

Installers and installation scripts for Microsoft SQL Server Express on ARM64.
MIT License
233 stars 57 forks source link

SQL Server Network Configuration Registry Entries Missing #4

Open shennerf opened 1 year ago

shennerf commented 1 year ago

jimm98y - I have used your scripts to try to install all versions except 2022 Express, and I have been unable to get TCPIP on 1433 to work. When researching - it looks like the registry entries for the instance are missing (I do see them on my Windows 10 Intel VM) - Have you seen this issue (Everything else seems to install correctly)?

Gareth10jones commented 1 year ago

I also have the same problem, all protocols are missing, any ideas?

shennerf commented 1 year ago

I was able to get it to work by enabling what I could through the configuration manager, then going into the registry and manually enabling the protocols for the sqlserver entry (2019 developer). I wouldn't call it fixed as there seems to be missing settings to do it correctly through the config mgr, but the system does now work.

ohnv commented 1 year ago

@shennerf Are you able to share the exact steps and registry keys you had to add/modify to get TCP/IP to work? I have the same issue but have so far been unable to figure out what in the registry needs to be modified.

Gareth10jones commented 1 year ago

@shennerf - that would be amazing as i'm in the same boat.

shennerf commented 1 year ago

So, my install is SQLServer 2019 Developer, though I would expect this will work for all of them. Also - I am connecting to it via IP from another app on the same VM - I did not test connecting to it from a different machine. The entries are not fully correct - but it does work for me when I followed these steps:

  1. Go into Windows Defender and make sure you have a rules to allow 1433 on TCP, and 1434 on UDP
  2. In SQL Server Configuration Manager - Make sure SQL Native Client 11.0 Configuration (32bit) - TCP/IP is Enabled
  3. In RegEdit - go to HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQLServer\SuperSocketNetLib\Tcp - for that entry and the ones beneath - make sure Enabled and Active are 1 for the entries you need (I just did them all)
  4. Restart and you should be good to go.

Hope this helps

OttoG commented 1 year ago

Thank you @shennerf – for me, with SQL Server 2022 Express, it was sufficient to set Enabled under _HKEY_LOCALMACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL16.SQLEXPRESS\MSSQLServer\SuperSocketNetLib\Tcp to 1 and TcpPort to 1433 under _HKEY_LOCALMACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL16.SQLEXPRESS\MSSQLServer\SuperSocketNetLib\Tcp\IPAll. (With some reservation for the fact that I did change settings back and forth, but I believe that in the end, these are the only ones that differ from the defaults.)

I did not find anything relevant at all in the SQL Server Configuration Manager to change (the mentioned configuration item was completely empty), but the registry changes turned out to be sufficient.

Obviously, for connections from outside of the virtual machine, the firewall also needs to be set to allow incoming connections to port 1433. And as remote connections with Windows Authentications may or may not work well, it might be necessary to allow SQL Server Authentication, too (under Security in Server Properties in SQL Server Management Studio).

joshuadavidmcgee commented 11 months ago

Thanks, OttoG and shennerf! This was simple and did the trick for me running SQLServerExpress 2022 on Windows 11 Pro version 22H2 Arm.

  1. Open regedit.exe

  2. Navigate to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL16.SQLEXPRESS\MSSQLServer\SuperSocketNetLib\Tcp 2.1 Set DWORD Enabled value to 1

image

  1. Navigate to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL16.SQLEXPRESS\MSSQLServer\SuperSocketNetLib\Tcp\IPAll 3.1 Set DWORD TcpPort value to 1433 or any desired port nuber

image

  1. Restart SQLServer Instance or computer
aleks-f commented 11 months ago

Did anyone succeed connecting via TCP to SQL Server 2022 Developer on Win11 ARM (running inside Parallels 19 on M2)? DB seems to be running fine, but I can't connect via TCP.

I looked everywhere (I think) and tried many things, but no success.

For starters, the darn thing doesn't even know on which operating system it's running:

image image

Nothing in the configuration manager:

image

Remote conections are enabled:

image

Edited the "Enabled" value in registry, but no success:

image

Connection error:

SQLSTATE = 08001
Native Error Code = 258
[Microsoft][ODBC Driver 18 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to 10.211.55.5. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.

Any help appreciated!

joshuadavidmcgee commented 11 months ago

@aleks-f I have not tried the Developer edition, however it should work the same as Express. Have you tried following the above example. I only see a screenshot for step 2. The Enabled and TcpPort DWORDs are in 2 separate locations. If so did you restart the OS after? What does your connection string look like? It should be something like IPAddress,PORT example: localhost,1433

aleks-f commented 11 months ago

@joshuadavidmcgee thanks for replying.

The one registry setting seems to have been enough. The problem turned to be elsewhere, in two places:

=========================== ODBC Diagnostic record #2:

SQLSTATE = 08001 Native Error Code = -1 [Microsoft][ODBC Driver 18 for SQL Server]Client unable to establish connection. For solutions related to encryption errors, see https://go.microsoft.com/fwlink/?linkid=2226722

`Encrypt=no` fixed it:

Connected to [DRIVER={ODBC Driver 18 for SQL Server};UID=;PWD=;DATABASE=***;SERVER=10.211.55.5;PORT=1433;Encrypt=no]