Installing SQL Server on Linux
HTML-код
- Опубликовано: 10 сен 2024
- NEW video: Install SQL Server 2022 on Ubuntu 22.04: • Install SQL Server on ...
In this video, we will show how to install SQL Server on a machine running Linux. We'll see how the Linux installation process differs from the Windows process and leave a bit of respect at Linux Mandrake's door (RIP Mandrake).
LINKS AND INFO
Catallaxy Services - www.catallaxys...
SQL Server on Linux installation process -- learn.microsof...
Installing SQL Server on Ubuntu -- learn.microsof...
Unsupported features of SQL Server 2022 on Linux -- learn.microsof...
Performance best practices for SQL Server on Linux -- learn.microsof...
ATTRIBUTIONS
Red Hat Linux 6.0 box by Gerard Braad -- www.flickr.com...
Linux Mandrake box image -- / 947943610971963392
you're an amazing person buddy thanks a lot for this video i was almost got sick for installing sql server on ubuntu and you just showed up like sun :D
I've been using sql since version 6.5 and it's nice to see it on Linux. Though I am afraid of anything but NTFS for production, such as Ext3/4, ReiserFS, etc. My experience has been nightmarish. We house more than 8000 databases, so clustering is an absolute must. Though I created a heavily customized Linux distro for our iSCSI disk enclosures. It can almost saturate a 10GB line with sql random reads and writes! And we closed the RAID6 write hole using a RAM/supercapacitor card, but that's another story...
Thanks for the insights, Brian. This is an area where I've had the good fortune to rely on good storage admins who know better than I do. My recollection is that ReiserFS isn't officially supported, just EXT4 and XFS--which seem to be the two people most commonly use for Postgres and MySQL.
The clustering and Availability Group experience with Linux is tough, yeah. A lot of that is switching from native clustering to a more indirect method with Pacemaker and on that note, I remember the DBA and sysadmin teams at the company I was with fighting to get things working the way they expected given normal operation on Windows.
Worked on Linux Mint 21.3
Thanks!
Great video. Thank you!
hi, when i want to setup configuration it's give me this error : /opt/mssql/bin/sqlservr: error while loading shared libraries: liblber-2.4.so.2: cannot open shared object file: No such file or directory
Are you trying this on Ubuntu 22.04? SQL Server currently only supports up to Ubuntu 20.04. There's a preview of SQL Server 2022 for Ubuntu 22.04 and RHEL 9 at techcommunity.microsoft.com/t5/sql-server-blog/sql-server-2022-now-available-for-both-rhel-9-and-ubuntu-22-04/ba-p/3896410, though it's not fully supported yet.
Sos un fenomeno pibe!!!!!!!
Thanks for the video.
¡Muchas gracias!
Hi, Kevin. I'm using Zorin and after the 4th step, sudo /opt/mssql/bin/mssql-conf setup, I got a respond that the command was not found. I tried to look at different forums but nothing helped. Do you by any chance know what I should do?
I'm not familiar with Zorin OS, personally, though I do see it's based on Ubuntu 20.04. It's possible that package installation puts SQL Server in a different location than what base Ubuntu does. My recommendation would be to run the command "locate mssql-conf" and see if you get any results. If you get none, you might need to update the locate database with "sudo updatedb" first. This should tell you where SQL Server was installed.
I am having the same issue. Any idea on what fixed it? @ifaaaifoo and@@KevinFeasel
When running command sudo apt-get install - y mssql-server, I am getting the following messages :
The following packages have unmet dependencies mssql-server: Depends: l ibldap-2.4-2 but it is not installable E: unable to correct problems, you have held broken packages
What is going wrong.
Note that SQL Server is only officially supported on Ubuntu 20.04 and Ubuntu 18.04, not 21.x or 22.x. Most likely, based on a similar error at serverfault.com/questions/1083491/cant-install-ms-sql-server-on-ubuntu-21-10, you're using a newer version of Ubuntu which Microsoft doesn't support at this time, and that's why it won't install.
I'd expect support for Ubuntu 22.04 at some point, knowing that it is also an LTS release, but for now, 18.04 and 20.04 are the only supported versions.
Hello Kevin. I have an issue. It says me "Failed to start Microsoft SQL Server Database Engine". How can i fix it?
That particular message simply indicates that there was a failure. I'd recommend checking out the guide on troubleshooting SQL Server on Linux: learn.microsoft.com/en-us/sql/linux/sql-server-linux-troubleshooting-guide Specifically, check the "Access the log files" section, as that will give you more information on what specific error occurred so you can at least see what the underlying problem is.
Sahii ho (This is nepali word for awesome)
Ho ho shai ho ❤
trying to install in ubuntu 23.10 but not able to install
is it possible to install or not in 23.10
This version was just for Ubuntu 20.04 and earlier. I have a follow-on video for Ubuntu 22.04 at ruclips.net/video/T3sXphWAPOs/видео.html. Ubuntu 23.10 *might* work but would not be officially supported. Microsoft only supports the LTS releases of Ubuntu, so there's a risk some library versions may differ between Ubuntu releases. Still, I'd recommend starting with that latter video and see if you can get it working. I haven't tried with Ubuntu 23.10 so I couldn't tell you for sure either way.
error while loading shared libraries: liblber-2.4.so.2: cannot open shared object file: No such file or directory
If you're using Fedora Linux, it appears to be a common issue: learn.microsoft.com/en-us/answers/questions/534164/opt-mssql-bin-sqlservr-error-while-loading-shared
The solution there is to create a symbolic link by hand, and you can get the specific details in the comments of the bugzilla ticket linked in that answer.
@@KevinFeasel brother i am using ubuntu 22.04.2 LTS,
@@muneebusmani670 That's the reason, then. SQL Server on Linux only supports Ubuntu 18.04 and 20.04. After 20.04, Ubuntu changed their LDAP library, so SQL Server won't work as-is. I don't know when (if?) Microsoft will support 22.04, but for now, those are the only two officially supported versions and the simplest workaround is to run SQL Server in a container or VM based on 20.04.
hi did you have troubel connection sqlserver in linux server from remote ?
Most likely, you're dealing with the firewall blocking that port by default. Steve Stedman has a blog post on how to open this port on Ubuntu at stevestedman.com/2016/11/allow-port-1433-ubuntu-linux-sql-server/
If you are using a different distribution of Linux, a quick search for enabling ports on your firewall should help, and the relevant port is TCP 1433.
it seems azure data studio is a light weight version of ssms although ssms do not supported on other OS than windows
Azure Data Studio and SQL Server Management Studio have a lot of overlap but ultimately fit into different niches.
SSMS is more of a traditional SQL Server DBA tool, so there's a lot of emphasis on administrative functionality, so it's easier to set permissions, change server settings, and review server logs. It also has a variety of built-in tools around things like monitoring replication, managing availability groups, etc.
Azure Data Studio is more of a development tool, so the emphasis is on writing and running code. Its result set viewer is much more practical, allowing you to export results in various formats. Its extensions focus more on the developer path: support for Postgres and Cosmos DB, working with notebooks, and working with SQL Server ML Services.
You're right that SSMS is Windows-only. There was never a good SSMS experience under WINE, so we couldn't even go that route for cross-platform support.
I'm using WSL installed on windows 11. can I do this install as well? What about the azure data studio ?
Yes, with a caveat. I recommend reading this post from Andrew Pruski, a friend, former co-worker, and all-around good guy: www.sqlservercentral.com/blogs/running-sql-server-in-windows-subsystem-for-linux-wsl
As for Azure Data Studio, you probably could using a technique like in learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps, though it'd be easier simply to install the Windows version and avoid any oddities around the way WSL supports GUI-based applications in Linux.
@@KevinFeasel Wow, I'm impressed with your prompt reply. I'm trying to avoid admin authentication from the institutional side as this takes too long. I want everything to be installed on the secure Linux side (WSL). I just thought the Azure data studio would be my biggest challenge in following your steps since it is not installed on the command line but by a direct click on the web. This would make it download to the windows side for me as I don't have a browser on the WSL side. All web downloads come straight to windows. Salutes for the resources you shared. I succeeded on the sql server install. I'm now thinking about the Azure data studio.
@@gambu4810 Got it. You can install Azure Data Studio for yourself in User mode, which would avoid the need for admin mode.
You can also grab the Debian package for Azure Data Studio from the install page: learn.microsoft.com/en-us/azure-data-studio/download-azure-data-studio . To do that, you could use wget against the .deb package link, rename the file it creates (probably starts with 'index...) to something like ads.deb, and then use sudo dpkg -i to install it. That said, on my Ubuntu WSL install, it did complain about not having libgtk, libpango, libsecret, or xdg-utils installed. Digging into this a little, there may be a way to get UI components installed following an article like medium.com/@japheth.yates/the-complete-wsl2-gui-setup-2582828f4577 but I haven't confirmed it.
How can I get username info when logging in Azure Data Studio?
Ok, it is sa by default. Thanks! Very useful video
Thank you Kevin, I have just one question... the "sa" account would be my local account? im begging in this world... could someone explend to me? thank you so much
sa is the default system administrator account in SQL Server. It's a SQL authenticated login which gets created automatically with every SQL Server instance. This is not the same as your Linux user account (/home/your_username) or any Active Directory or LDAP account. All of the security for these SQL authenticated logins is handled within SQL Server, so there won't be any entries in /etc/passwd or anything else like that.
It is also very good practice to create a separate login for regular use so that you aren't using the sa account for much. The process for doing this is the same as for any Windows-based SQL Server instance: creating a login, creating a user, assigning rights to that user.
Thank you so much, and could you tell me the default password please? WEB says its just space
Does SQL server 2019 version supported on rhel 9.2 version
It appears that RHEL 9 is something that SQL Server 2022 supports but not SQL Server 2019, at least officially. I haven't tried it myself, so maybe it does work despite no official support, but I'd recommend 2022 over 2019 for that reason.
How do I make a SQL admin account?
You get one administrative account by default when you install SQL Server on Linux: the sa account. If you want another account with administrative permissions, you'd start by logging in as your sa account using Azure Data Studio or SQL Server Management Studio. After that, create a login:
CREATE LOGIN [YourLogin] WITH PASSWORD '{Your_Password}';
To create specifically an administrative account, you can use the ALTER SERVER ROLE command:
ALTER SERVER ROLE [sysadmin] ADD MEMBER [YourLogin];
At that point, your new account is a sysadmin, which means there are (almost) no limits to its power. There's a lot more to talk about with security and permissions in SQL Server, of course, but that's the direct answer to the question.
can SQL server management be used to connect remotely?
Absolutely. As far as SSMS is concerned, this is just another SQL Server instance. SSMS is only available for Windows, so that's why I didn't demonstrate that, but there's no problem using it.
Niice
when i use sa account they say error
What are the details of the error and what action were you trying to take?
@@KevinFeasel i just type the username sa and the password that i typed in the installation
Into which tool? SQL Server Management Studio? Something else? What error did you get? Without enough information to troubleshoot, all I can do is speculate. My one free speculation without enough information to diagnose an issue: if you are trying to connect from SQL Server Management Studio and you know you are using the right password, make sure you have trusted the server certificate. I talk about how to do that in a later video in the series: ruclips.net/video/MunQ_TA6JBQ/видео.html
If you are using Azure Data Studio, make sure the option for encryption is True and not Strict, and that Trust server certificate is on.
Will these solve the problem? Maybe. But without error information or enough details to diagnose anything, it's the best I can do.
@@KevinFeasel i use linuc mint so i downliad azure studio and i did the same steps but why when you create new connection you use the username "sa"