jimm98y / MSSQLEXPRESS-M1-Install

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

[Help Request] SQL Server 2022 Developer #2

Closed cigoic closed 1 year ago

cigoic commented 1 year ago

Hi,

Is it possible add support to install SQL Server 2022/2019 Developer version? It fail to install via simply rename SQLExpr to SQLDev in the .ps file. Especially when the process comes to copy master.mdf, there is no existing path to find any .mdf file. =(

Thanks.

Attached file is the modified version. However, it looks like something is missing here. install2022.ps1.txt

cigoic commented 1 year ago

By the way, here are screenshots if I run the original script and try to install SQL Express.

截圖 2023-01-25 下午1 40 42 截圖 2023-01-25 下午1 40 51

robybrigno commented 1 year ago

I have the same problem. There is a solution?

cigoic commented 1 year ago

Hey,

I made some progress yesterday...Finally, SQL Server 2022 was installed successfully. You could try to modify as shown below:

  1. Replace "SSEI-Expr" to "SSEI-Dev"
  2. Use "https://download.microsoft.com/download/c/c/9/cc9c6797-383c-4b24-8920-dc057c1de9d3/SQL2022-SSEI-Dev.exe" to Download Developer version of SQL Server 2022 for example.
  3. $instanceName = "MSSQLSERVER"

install2022.ps1.txt

First, execute above script and it will fail to rebuild database. Then, I simply manually execute command in PowerShell instead.

136 # rebuild databases 137 $user = whoami 138 Start-Process -FilePath "$setupFolderPath/SETUP.EXE" -ArgumentList "/QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=$instanceName /SQLSYSADMINACCOUNTS=$user" -Wait

  1. Switch to $setupFolderPath folder, and find out current username with "woami" command.
  2. ./SETUP.EXE /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS=PUT_YOURUSERNAME_HERE
  3. net start MSSQLSERVER

Though, SQL Server 2022 Developer could be installed. SQL LocalDB installed via VS 2022 will fail to be recognized inside Visual Studio itself.

SSMS 19 can recognize and connect to SQL LocalDB, but VS 2022 cannot. I have no idea about this.

Any suggestion? Thanks a lot!

jimm98y commented 1 year ago

It looks like I've fixed it 5 minutes after you :)

I think the issue with SQL LocalDB in Visual Studio 2022 is caused by VS 2022 being ARM64 native process. It attempts to load the SQL DLLs directly, which is not possible (ARM64 process cannot load x64 DLLs). In VS 2019 it works because that is being emulated as x64 application, therefore it can load the DLLs.

robybrigno commented 1 year ago

sorry but how to fix this ?

Screenshot 2023-01-27 alle 08 35 30
jimm98y commented 1 year ago

sorry but how to fix this ? Screenshot 2023-01-27 alle 08 35 30

Could you please send me a screenshot of the ./Temp directory when this error happens? In case it was deleted already by the script, then please restore it from the Recycle Bin. Looks like a problem with the language, but I've tried it on an US OS with Czech language pack and I could not reproduce the issue.

robybrigno commented 1 year ago

Screenshot 2023-01-30 alle 20 27 08 Screenshot 2023-01-30 alle 22 22 31

this is the image

hynekk commented 1 year ago

I had similar issue and then I uninstall everything and tried to install developer 19 version and all seems to work just fine.