{"id":378139,"date":"2024-06-06T03:00:14","date_gmt":"2024-06-06T03:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=378139"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=378139","title":{"rendered":"<span>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 MS SQL Server \u043d\u0430 Linux<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043d\u0430\u0443\u0447\u0443 \u0432\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c Microsoft SQL Server 2022 \u043d\u0430 Linux \u0438 \u043c\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 Microsoft \u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 Linux.<\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c Yum \u0434\u043b\u044f Linux \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432: RedHat (RHEL), CentOS, Scientific Linux \u0438 DPKG (Debian Package) \u2013 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 \u0432 Debian \u0438 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445 \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Ubuntu \u0438 \u043d\u0430\u0431\u0438\u0440\u0430\u044e\u0449\u0435\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c  Astra Linux, \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0437\u0430\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0434\u043b\u044f \u043e\u0431\u043e\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0445 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u0432. \u0422\u0430\u043a \u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 Docker. <\/p>\n<p>Microsoft SQL Server \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0421\u0423\u0411\u0414), \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0435\u0439 Microsoft. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u044f\u0437\u044b\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (\u0434\u0438\u0430\u043b\u0435\u043a\u0442 SQL) \u2014 Transact-SQL (T-SQL). <\/p>\n<p>\u0414\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0421\u0423\u0411\u0414 MS SQL Server \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f 2 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430: <br \/>1. \u0421\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u00a0<strong>sqlcmd<br \/><\/strong>2. Microsoft SQL Server Management Studio (SSMS)<\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u0434\u043b\u044f \u0432\u0430\u0441 DBeaver \u0438\u043b\u0438 DataGrip \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435:<\/p>\n<ol>\n<li>\n<p><a href=\"#version\" rel=\"noopener noreferrer nofollow\">\u0412\u044b\u0431\u043e\u0440 \u0432\u044b\u043f\u0443\u0441\u043a\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#docker\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043f\u0443\u0441\u043a MS SQL Server \u0447\u0435\u0440\u0435\u0437 Docker<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#ubuntu\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 MS SQL Server \u043d\u0430 Ubuntu 20.04.6 LTS (Debian, Astra Linux)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#rhel\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 MS SQL Server \u043d\u0430 Oracle Linux Server 8.7 (RedHat (RHEL), CentOS)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#sqlcmd\" rel=\"noopener noreferrer nofollow\">\u0421\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u00a0sqlcmd<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/ssms\" rel=\"noopener noreferrer nofollow\">Microsoft SQL Server Management Studio (SSMS)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#engine\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0441\u043b\u0443\u0436\u0431\u043e\u0439\u00a0 Database Engine<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/sql_info\" rel=\"noopener noreferrer nofollow\">SQL \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#fts\" rel=\"noopener noreferrer nofollow\">Full-Text Search<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#example\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0411\u0414 \u0434\u043b\u044f Linux<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#ms-example\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0411\u0414 Microsoft \u0434\u043b\u044f Linux <\/a><\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"version\" id=\"version\"><\/a><\/p>\n<h2>\u0412\u044b\u0431\u043e\u0440 \u0432\u044b\u043f\u0443\u0441\u043a\u0430<\/h2>\n<p>\u0412\u044b\u043f\u0443\u0441\u043a\u0438 SQL Server \u0438\u043c\u0435\u044e\u0442 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438: Evaluation, Developer \u0438 Express.<\/p>\n<ol>\n<li>\n<p>Express \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0435\u0439. \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d, \u0441\u0430\u043c\u043e\u0435 \u043e\u0449\u0443\u0442\u0438\u043c\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u044d\u043a\u0441\u043f\u0440\u0435\u0441\u0441 \u0432\u0435\u0440\u0441\u0438\u0438 \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u0437\u044b 10 \u0413\u0411. \u042d\u0442\u0430 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0443\u0434\u0435\u043d\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0430\u0431\u043e\u0442 \u0438\u043b\u0438 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f SQL\/T-SQL.<\/p>\n<\/li>\n<li>\n<p>Developer \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 Enterprise \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0438 \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e, \u043d\u043e \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>Web \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 standard, \u043a\u0440\u043e\u043c\u0435 \u043a\u0430\u043a \u0431\u043e\u043b\u0435\u0435 \u0441\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0435 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>Standard \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f, \u043d\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432\u0441\u0451 \u0435\u0449\u0435 \u043d\u0435\u0442. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0451\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SQL Server \u2013 128 \u0413\u0411, \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 AlwaysOn \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b. Standard \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f\u0445.<\/p>\n<\/li>\n<li>\n<p>Evaluation \u2014 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f SQL Server, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b Enterprise \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 180 \u0434\u043d\u0435\u0439 (\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438).<\/p>\n<\/li>\n<li>\n<p>Enterprise \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u0442. \u041a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0438\u043b\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>SQL Server Developer \u2014 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/sql\/sql-server\/editions-and-components-of-sql-server-2022?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/sql\/sql-server\/editions-and-components-of-sql-server-2022?view=sql-server-ver16<\/a><\/p>\n<p><a class=\"anchor\" name=\"docker\" id=\"docker\"><\/a><\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a MS SQL Server \u0447\u0435\u0440\u0435\u0437 Docker<\/h2>\n<pre><code class=\"bash\"># \u0418\u0437\u0432\u043b\u0435\u0447\u044c \u043e\u0431\u0440\u0430\u0437, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 c MS SQL Server \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 1433 \u0438 \u0438\u043c\u0435\u043d\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 mssql1 docker run -e \"ACCEPT_EULA=Y\" -e \"MSSQL_SA_PASSWORD=strongPassword123\" -p 1433:1433 --name mssql1 -d mcr.microsoft.com\/mssql\/server:2022-latest  # \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 docker ps -a  # \u0421\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 sqlcmd \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 Transact-SQL docker exec -it mssql1 \/opt\/mssql-tools\/bin\/sqlcmd -S localhost -U sa -P strongPassword123  # \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u043c\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 docker rm mssql1 -f<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: <\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/sql\/linux\/sql-server-linux-docker-container-deployment?view=sql-server-ver15&amp;pivots=cs1-bash\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/sql\/linux\/sql-server-linux-docker-container-deployment?view=sql-server-ver15&amp;pivots=cs1-bash<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/hub.docker.com\/_\/microsoft-mssql-server\" rel=\"noopener noreferrer nofollow\">https:\/\/hub.docker.com\/_\/microsoft-mssql-server<\/a>  <\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"ubuntu\" id=\"ubuntu\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 MS SQL Server \u043d\u0430 Ubuntu 20.04.6 LTS (Debian, Astra Linux)<\/h2>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/sql\/linux\/quickstart-install-connect-ubuntu?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/sql\/linux\/quickstart-install-connect-ubuntu?view=sql-server-ver16<\/a><\/p>\n<pre><code class=\"bash\">wget -qO- https:\/\/packages.microsoft.com\/keys\/microsoft.asc | sudo tee \/etc\/apt\/trusted.gpg.d\/microsoft.asc sudo add-apt-repository \"$(wget -qO- https:\/\/packages.microsoft.com\/config\/ubuntu\/20.04\/mssql-server-2022.list)\" sudo apt-get update sudo apt-get install -y mssql-server sudo \/opt\/mssql\/bin\/mssql-conf setup systemctl status mssql-server<\/code><\/pre>\n<p><a class=\"anchor\"><\/a><\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0440\u0442\u044b<\/p>\n<pre><code class=\"bash\"># \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e sudo ufw default deny incoming sudo ufw default allow outgoing # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 sudo ufw allow 1433 # \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c UFW sudo ufw enable  # \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e: # \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u043f\u043e\u0440\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b sudo ufw allow 6000:6007\/tcp sudo ufw allow 6000:6007\/udp<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: <\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/sql\/linux\/quickstart-install-connect-red-hat?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/sql\/linux\/quickstart-install-connect-red-hat?view=sql-server-ver16<\/a><\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"rhel\" id=\"rhel\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 MS SQL Server \u043d\u0430 Oracle Linux Server 8.7 (RedHat (RHEL), CentOS)<\/h2>\n<pre><code class=\"bash\">sudo curl -o \/etc\/yum.repos.d\/mssql-server.repo https:\/\/packages.microsoft.com\/config\/rhel\/8\/mssql-server-2022.repo sudo yum install -y mssql-server sudo \/opt\/mssql\/bin\/mssql-conf setup systemctl status mssql-server<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0440\u0442\u044b<\/p>\n<pre><code class=\"bash\">sudo firewall-cmd --zone=public --add-port=1433\/tcp --permanent sudo firewall-cmd --reload<\/code><\/pre>\n<p><a class=\"anchor\" name=\"sqlcmd\" id=\"sqlcmd\"><\/a><\/p>\n<h2>\u0421\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u00a0sqlcmd<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b <strong>sqlcmd<\/strong> \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 ODBC Driver for SQL Server, \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u043c \u043a\u0430\u043c\u043d\u0435\u043c \u0442\u0443\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 <strong><u>\u0438\u043c\u0435\u043d\u043d\u043e 17 \u0432\u0435\u0440\u0441\u0438\u044f<\/u><\/strong> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Microsoft SQL Server 2022 (RTM-CU4) (KB5026717).<\/p>\n<p>1) \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0437-\u043f\u043e\u0434 Windows 10 \u0438\u0437 Windows Terminal (PowerShell)<\/p>\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/connect\/odbc\/download-odbc-driver-for-sql-server?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">Download ODBC Driver for SQL Server<\/a><\/p>\n<p>2) RHEL 8<\/p>\n<pre><code>sudo curl -o \/etc\/yum.repos.d\/msprod.repo https:\/\/packages.microsoft.com\/config\/rhel\/8\/prod.repo sudo yum remove unixODBC-utf16 unixODBC-utf16-devel sudo yum install -y mssql-tools unixODBC-devel echo 'export PATH=\"$PATH:\/opt\/mssql-tools\/bin\"' >> ~\/.bash_profile echo 'export PATH=\"$PATH:\/opt\/mssql-tools\/bin\"' >> ~\/.bashrc source ~\/.bashrc<\/code><\/pre>\n<p>3) Ubuntu 20.04<\/p>\n<pre><code>sudo apt-get update sudo apt install curl curl https:\/\/packages.microsoft.com\/keys\/microsoft.asc | sudo tee \/etc\/apt\/trusted.gpg.d\/microsoft.asc curl https:\/\/packages.microsoft.com\/config\/ubuntu\/20.04\/prod.list | sudo tee \/etc\/apt\/sources.list.d\/msprod.list sudo apt-get update sudo apt-get install mssql-tools unixodbc-dev sudo apt-get update sudo apt-get install mssql-tools echo 'export PATH=\"$PATH:\/opt\/mssql-tools\/bin\"' >> ~\/.bash_profile echo 'export PATH=\"$PATH:\/opt\/mssql-tools\/bin\"' >> ~\/.bashrc source ~\/.bashrc<\/code><\/pre>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<pre><code>sqlcmd -S localhost -U sa -P strongPassword123  # \u0412\u044b\u0445\u043e\u0434 \u0438\u0437 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b sqlcmd QUIT<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/sql\/tools\/sqlcmd\/sqlcmd-utility?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/sql\/tools\/sqlcmd\/sqlcmd-utility?view=sql-server-ver16<\/a><\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"ssms\" id=\"ssms\"><\/a><\/p>\n<h2>Microsoft SQL Server Management Studio (SSMS)<\/h2>\n<p>SQL Server Management Studio (SSMS) \u2014 \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 SQL.<\/p>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/sql\/ssms\/download-sql-server-management-studio-ssms?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 SQL Server Management Studio (SSMS)<\/a><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6d3\/f7e\/804\/6d3f7e804db6c39f79e138a17c2e2be8.png\" width=\"1043\" height=\"410\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6d3\/f7e\/804\/6d3f7e804db6c39f79e138a17c2e2be8.png\"\/><\/figure>\n<p><a class=\"anchor\" name=\"engine\" id=\"engine\"><\/a><\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0441\u043b\u0443\u0436\u0431\u043e\u0439\u00a0 Database Engine<\/h3>\n<pre><code class=\"bash\">#\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u043b\u0443\u0436\u0431\u044b Database Engine sudo systemctl status mssql-server   #\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 Database Engine sudo systemctl stop mssql-server sudo systemctl start mssql-server sudo systemctl restart mssql-server<\/code><\/pre>\n<p><a class=\"anchor\" name=\"sql_info\" id=\"sql_info\"><\/a><\/p>\n<h2>SQL \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/h2>\n<pre><code class=\"sql\">SELECT Name from sys.databases; SELECT @@VERSION as Version SELECT SERVERPROPERTY('ServerName') as 'Container ID' SELECT SERVERPROPERTY('Edition') as Edition SELECT CURRENT_USER;  GO<\/code><\/pre>\n<p><a class=\"anchor\" name=\"fts\" id=\"fts\"><\/a><\/p>\n<h2>Full-Text Search on Linux<\/h2>\n<p>\u041f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 SQL Server. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 .csv \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0411\u0414.<\/p>\n<p>RHEL<\/p>\n<pre><code>sudo yum install -y mssql-server-fts sudo yum check-update sudo yum update mssql-server-fts<\/code><\/pre>\n<p>Ubuntu<\/p>\n<pre><code>sudo apt-get update  sudo apt-get install -y mssql-server-fts<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/linux\/sql-server-linux-setup-full-text-search?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">Install SQL Server Full-Text Search on Linux<\/a><\/p>\n<p><a class=\"anchor\" name=\"example\" id=\"example\"><\/a><\/p>\n<h2>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0411\u0414 \u0434\u043b\u044f Linux<\/h2>\n<p>\u042d\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 Microsoft.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438 SQL-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0411\u0414 Microsoft \u043d\u0430 Linux.<\/p>\n<p>\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0430: <\/p>\n<ol>\n<li>\n<p><a href=\"#fts\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Full-Text Search<\/a><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c sql-\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0438\u0436\u0435<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 SQL \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/mobaxterm.mobatek.net\/\" rel=\"noopener noreferrer nofollow\">MobaXTerm<\/a>)<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0433\u0440\u0443\u043f\u043f\u044b<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0438\u0445 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b Linux (\u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432):<\/p>\n<pre><code class=\"bash\"># \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 TestMe \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f - \u043c\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c: admin # \/home\/admin\/ mkdir TestMe # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 ftp \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 MobaXTerm # \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0432 \u0438\u0445 \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  # \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043d\u0430 root (\u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f) sudo su cd \/var mkdir sqlbackup cd sqlbackup mkdir TestMe # \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0444\u0430\u0439\u043b\u044b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e TestMe - cp \/home\/admin\/TestMe\/* \/var\/sqlbackup\/TestMe chown mssql -R sqlbackup\/ chgrp mssql -R sqlbackup\/<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a sql \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 <strong>sqlcmd<\/strong> \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u043e SSH \u0447\u0435\u0440\u0435\u0437 MobaXTerm<\/p>\n<pre><code>sqlcmd -S localhost -U SA -P strongPassword123 -i \/var\/sqlbackup\/TestMe\/ddl.sql<\/code><\/pre>\n<p>\u0421\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; AddressType.csv  <\/p>\n<pre><code class=\"scala\">1       Billing {B84F78B1-4EFE-4A0E-8CB7-70E9F112F886}  2008-04-30 00:00:00 2       Home    {41BC2FF6-F0FC-475F-8EB9-CEC0805AA0F2}  2008-04-30 00:00:00 3       Main Office     {8EEEC28C-07A2-4FB9-AD0A-42D4A0BBC575}  2008-04-30 00:00:00 4       Primary {24CB3088-4345-47C4-86C5-17B535133D1E}  2008-04-30 00:00:00 5       Shipping        {B29DA3F8-19A3-47DA-9DAA-15C84F4A83A5}  2008-04-30 00:00:00 6       Archive {A67F238A-5BA2-444B-966C-0467ED9C427F}  2008-04-30 00:00:00<\/code><\/pre>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">\u0424\u0430\u0439\u043b<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">ddl.sql<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u0411\u0414, \u0435\u0441\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430<\/p>\n<p align=\"left\">\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0411\u0414<\/p>\n<p align=\"left\">\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">insert.sql<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">select.sql<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u0435\u043b\u0430\u0435\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">delete.sql<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>ddl.sql<\/p>\n<pre><code class=\"sql\">:setvar SqlSamplesSourceDataPath \"\/var\/sqlbackup\/TestMe\/data\/\" :setvar DatabaseName \"TestMe\"   IF '$(SqlSamplesSourceDataPath)' IS NULL OR '$(SqlSamplesSourceDataPath)' = '' BEGIN         RAISERROR(N'The variable SqlSamplesSourceDataPath must be defined.', 16, 127) WITH NOWAIT         RETURN END;   SET NOCOUNT OFF; GO  PRINT CONVERT(varchar(1000), @@VERSION); GO  PRINT ''; PRINT 'Started - ' + CONVERT(varchar, GETDATE(), 121); GO  USE [master]; GO -- **************************************** -- Drop Database -- **************************************** PRINT ''; PRINT '*** Dropping Database'; GO  IF EXISTS (SELECT [name] FROM [master].[sys].[databases] WHERE [name] = N'$(DatabaseName)')     DROP DATABASE $(DatabaseName);  -- If the database has any other open connections close the network connection. IF @@ERROR = 3702     RAISERROR('$(DatabaseName) database cannot be dropped because there are still other open connections', 127, 127) WITH NOWAIT, LOG; GO   -- **************************************** -- Create Database -- **************************************** PRINT ''; PRINT '*** Creating Database'; GO  CREATE DATABASE $(DatabaseName); GO  PRINT ''; PRINT '*** Checking for $(DatabaseName) Database'; \/* CHECK FOR DATABASE IF IT DOESN'T EXISTS, DO NOT RUN THE REST OF THE SCRIPT *\/ IF NOT EXISTS (SELECT TOP 1 1 FROM sys.databases WHERE name = N'$(DatabaseName)') BEGIN PRINT '*******************************************************************************************************************************************************************' +char(10)+'********$(DatabaseName) Database does not exist.  Make sure that the script is being run in SQLCMD mode and that the variables have been correctly set.*********' +char(10)+'*******************************************************************************************************************************************************************'; SET NOEXEC ON; END GO  ALTER DATABASE $(DatabaseName) SET RECOVERY SIMPLE,     ANSI_NULLS ON,     ANSI_PADDING ON,     ANSI_WARNINGS ON,     ARITHABORT ON,     CONCAT_NULL_YIELDS_NULL ON,     QUOTED_IDENTIFIER ON,     NUMERIC_ROUNDABORT OFF,     PAGE_VERIFY CHECKSUM,     ALLOW_SNAPSHOT_ISOLATION OFF; GO  USE $(DatabaseName); GO  CREATE TYPE [Name] FROM nvarchar(50) NULL; GO  CREATE TABLE [Person].[AddressType](     [AddressTypeID] [int] IDENTITY (1, 1) NOT NULL,     [Name] [Name] NOT NULL,     [rowguid] uniqueidentifier ROWGUIDCOL NOT NULL CONSTRAINT [DF_AddressType_rowguid] DEFAULT (NEWID()),     [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_AddressType_ModifiedDate] DEFAULT (GETDATE()) ) ON [PRIMARY]; GO <\/code><\/pre>\n<p>insert.sql<\/p>\n<pre><code class=\"sql\">USE [TestMe]; GO  BULK INSERT [Person].[AddressType] FROM '\/var\/sqlbackup\/AdventureWorks\/AddressType.csv' WITH (     CHECK_CONSTRAINTS,     DATAFILETYPE = 'char',     FIELDTERMINATOR= '\\t',     ROWTERMINATOR = '\\n',     KEEPIDENTITY,     TABLOCK ); GO  SELECT * FROM [PERSON].[AddressType]; GO <\/code><\/pre>\n<p>select.sql<\/p>\n<pre><code>USE [TestMe]; GO  SELECT * FROM [PERSON].[AddressType]; GO<\/code><\/pre>\n<p>delete.sql<\/p>\n<pre><code>USE [TestMe]; GO  DELETE FROM [Person].[AddressType]; GO  SELECT * FROM [Person].[AddressType]; GO<\/code><\/pre>\n<p><a class=\"anchor\" name=\"ms-example\" id=\"ms-example\"><\/a><\/p>\n<h2>\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0411\u0414 Microsoft \u0434\u043b\u044f Linux<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Linux \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>\/var\/sqlbackup\/AdventureWorks<\/code><\/p>\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/samples\/sql-samples-where-are?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">SQL samples<\/a> -> <a href=\"https:\/\/github.com\/microsoft\/sql-server-samples\" rel=\"noopener noreferrer nofollow\">GitHub Repository<\/a> -> <a href=\"https:\/\/github.com\/microsoft\/sql-server-samples\/tree\/master\/samples\/databases\/adventure-works\" rel=\"noopener noreferrer nofollow\">adventure-works<\/a> -> <a href=\"https:\/\/github.com\/Microsoft\/sql-server-samples\/tree\/master\/samples\/databases\/adventure-works\/oltp-install-script\" rel=\"noopener noreferrer nofollow\">oltp-install-script<\/a><\/p>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u043f\u0443\u043d\u043a\u0442:<a href=\"https:\/\/github.com\/microsoft\/sql-server-samples\/tree\/master\/samples\/databases\/adventure-works#to-install-adventureworks\" rel=\"noopener noreferrer nofollow\"> To install AdventureWorks<\/a><\/p>\n<p>\u0418\u0437 \u043d\u0435\u0433\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c zip \u0430\u0440\u0445\u0438\u0432 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 sql \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0442\u043a\u0438 \u0411\u0414. <\/p>\n<p>\u0420\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u043c zip<\/p>\n<p>\u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b <code>instawdb.sql<\/code><\/p>\n<pre><code>... :setvar SqlSamplesSourceDataPath \"\/var\/sqlbackup\/AdventureWorks\/\" ... :setvar DatabaseName \"AdventureWorks\"<\/code><\/pre>\n<p>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0441:  <code>CODEPAGE='ACP',<\/code> \u0432 instawdb.sql<\/p>\n<p>ACP \u044d\u0442\u043e ANSI, \u0430 Linux \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 UTF-8, \u0430 UTF-8 \u044d\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 ANSI, \u0430 \u043a\u043e\u0434\u043e\u0432\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432 Linux \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u0431\u0440\u0430\u0432 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c .csv \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 sql-\u0441\u043a\u0440\u0438\u043f\u0442 \u0432 <code>\/var\/sqlbackup\/AdventureWorks<\/code> \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Linux<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c sql-\u0441\u043a\u0440\u0438\u043f\u0442<\/p>\n<pre><code class=\"bash\">sqlcmd -S localhost -U SA -P strongPassword123 -i \/var\/sqlbackup\/AdventureWorks\/instawdb.sql<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 =) <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/819839\/\"> https:\/\/habr.com\/ru\/articles\/819839\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043d\u0430\u0443\u0447\u0443 \u0432\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c Microsoft SQL Server 2022 \u043d\u0430 Linux \u0438 \u043c\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 Microsoft \u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 Linux.<\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c Yum \u0434\u043b\u044f Linux \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u0432: RedHat (RHEL), CentOS, Scientific Linux \u0438 DPKG (Debian Package) \u2013 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 \u0432 Debian \u0438 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430\u0445 \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Ubuntu \u0438 \u043d\u0430\u0431\u0438\u0440\u0430\u044e\u0449\u0435\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c  Astra Linux, \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0437\u0430\u043c\u0435\u0449\u0435\u043d\u0438\u0435\u043c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0434\u043b\u044f \u043e\u0431\u043e\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043d\u044b\u0445 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u0432. \u0422\u0430\u043a \u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 Docker. <\/p>\n<p>Microsoft SQL Server \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0421\u0423\u0411\u0414), \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0435\u0439 Microsoft. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u044f\u0437\u044b\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 (\u0434\u0438\u0430\u043b\u0435\u043a\u0442 SQL) \u2014 Transact-SQL (T-SQL). <\/p>\n<p>\u0414\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0421\u0423\u0411\u0414 MS SQL Server \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f 2 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430: <br \/>1. \u0421\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u00a0<strong>sqlcmd<br \/><\/strong>2. Microsoft SQL Server Management Studio (SSMS)<\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u0434\u043b\u044f \u0432\u0430\u0441 DBeaver \u0438\u043b\u0438 DataGrip \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435:<\/p>\n<ol>\n<li>\n<p><a href=\"#version\" rel=\"noopener noreferrer nofollow\">\u0412\u044b\u0431\u043e\u0440 \u0432\u044b\u043f\u0443\u0441\u043a\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#docker\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043f\u0443\u0441\u043a MS SQL Server \u0447\u0435\u0440\u0435\u0437 Docker<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#ubuntu\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 MS SQL Server \u043d\u0430 Ubuntu 20.04.6 LTS (Debian, Astra Linux)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#rhel\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 MS SQL Server \u043d\u0430 Oracle Linux Server 8.7 (RedHat (RHEL), CentOS)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#sqlcmd\" rel=\"noopener noreferrer nofollow\">\u0421\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u00a0sqlcmd<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/ssms\" rel=\"noopener noreferrer nofollow\">Microsoft SQL Server Management Studio (SSMS)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#engine\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0441\u043b\u0443\u0436\u0431\u043e\u0439\u00a0 Database Engine<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/sql_info\" rel=\"noopener noreferrer nofollow\">SQL \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#fts\" rel=\"noopener noreferrer nofollow\">Full-Text Search<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#example\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0411\u0414 \u0434\u043b\u044f Linux<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#ms-example\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0411\u0414 Microsoft \u0434\u043b\u044f Linux <\/a><\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"version\" id=\"version\"><\/a><\/p>\n<h2>\u0412\u044b\u0431\u043e\u0440 \u0432\u044b\u043f\u0443\u0441\u043a\u0430<\/h2>\n<p>\u0412\u044b\u043f\u0443\u0441\u043a\u0438 SQL Server \u0438\u043c\u0435\u044e\u0442 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438: Evaluation, Developer \u0438 Express.<\/p>\n<ol>\n<li>\n<p>Express \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0435\u0439. \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d, \u0441\u0430\u043c\u043e\u0435 \u043e\u0449\u0443\u0442\u0438\u043c\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u044d\u043a\u0441\u043f\u0440\u0435\u0441\u0441 \u0432\u0435\u0440\u0441\u0438\u0438 \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0430\u0437\u044b 10 \u0413\u0411. \u042d\u0442\u0430 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0443\u0434\u0435\u043d\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0430\u0431\u043e\u0442 \u0438\u043b\u0438 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f SQL\/T-SQL.<\/p>\n<\/li>\n<li>\n<p>Developer \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 Enterprise \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0438 \u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e, \u043d\u043e \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>Web \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 standard, \u043a\u0440\u043e\u043c\u0435 \u043a\u0430\u043a \u0431\u043e\u043b\u0435\u0435 \u0441\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0435 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u043e\u0439 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>Standard \u044d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f, \u043d\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432\u0441\u0451 \u0435\u0449\u0435 \u043d\u0435\u0442. \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0451\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c SQL Server \u2013 128 \u0413\u0411, \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 AlwaysOn \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b. Standard \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f\u0445.<\/p>\n<\/li>\n<li>\n<p>Evaluation \u2014 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f SQL Server, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b Enterprise \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 180 \u0434\u043d\u0435\u0439 (\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438).<\/p>\n<\/li>\n<li>\n<p>Enterprise \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u0442. \u041a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u044f\u043c\u0438 \u0438\u043b\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u044d\u0442\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>SQL Server Developer \u2014 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u044e\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/sql\/sql-server\/editions-and-components-of-sql-server-2022?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/sql\/sql-server\/editions-and-components-of-sql-server-2022?view=sql-server-ver16<\/a><\/p>\n<p><a class=\"anchor\" name=\"docker\" id=\"docker\"><\/a><\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a MS SQL Server \u0447\u0435\u0440\u0435\u0437 Docker<\/h2>\n<pre><code class=\"bash\"># \u0418\u0437\u0432\u043b\u0435\u0447\u044c \u043e\u0431\u0440\u0430\u0437, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 c MS SQL Server \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 1433 \u0438 \u0438\u043c\u0435\u043d\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 mssql1 docker run -e \"ACCEPT_EULA=Y\" -e \"MSSQL_SA_PASSWORD=strongPassword123\" -p 1433:1433 --name mssql1 -d mcr.microsoft.com\/mssql\/server:2022-latest  # \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 docker ps -a  # \u0421\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 sqlcmd \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 Transact-SQL docker exec -it mssql1 \/opt\/mssql-tools\/bin\/sqlcmd -S localhost -U sa -P strongPassword123  # \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0430\u043c\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 docker rm mssql1 -f<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: <\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/sql\/linux\/sql-server-linux-docker-container-deployment?view=sql-server-ver15&amp;pivots=cs1-bash\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/sql\/linux\/sql-server-linux-docker-container-deployment?view=sql-server-ver15&amp;pivots=cs1-bash<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/hub.docker.com\/_\/microsoft-mssql-server\" rel=\"noopener noreferrer nofollow\">https:\/\/hub.docker.com\/_\/microsoft-mssql-server<\/a>  <\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"ubuntu\" id=\"ubuntu\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 MS SQL Server \u043d\u0430 Ubuntu 20.04.6 LTS (Debian, Astra Linux)<\/h2>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: <a href=\"https:\/\/learn.microsoft.com\/ru-ru\/sql\/linux\/quickstart-install-connect-ubuntu?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/sql\/linux\/quickstart-install-connect-ubuntu?view=sql-server-ver16<\/a><\/p>\n<pre><code class=\"bash\">wget -qO- https:\/\/packages.microsoft.com\/keys\/microsoft.asc | sudo tee \/etc\/apt\/trusted.gpg.d\/microsoft.asc sudo add-apt-repository \"$(wget -qO- https:\/\/packages.microsoft.com\/config\/ubuntu\/20.04\/mssql-server-2022.list)\" sudo apt-get update sudo apt-get install -y mssql-server sudo \/opt\/mssql\/bin\/mssql-conf setup systemctl status mssql-server<\/code><\/pre>\n<p><a class=\"anchor\"><\/a><\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0440\u0442\u044b<\/p>\n<pre><code class=\"bash\"># \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e sudo ufw default deny incoming sudo ufw default allow outgoing # \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 sudo ufw allow 1433 # \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c UFW sudo ufw enable  # \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e: # \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u043f\u043e\u0440\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b sudo ufw allow 6000:6007\/tcp sudo ufw allow 6000:6007\/udp<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: <\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/sql\/linux\/quickstart-install-connect-red-hat?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/sql\/linux\/quickstart-install-connect-red-hat?view=sql-server-ver16<\/a><\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"rhel\" id=\"rhel\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 MS SQL Server \u043d\u0430 Oracle Linux Server 8.7 (RedHat (RHEL), CentOS)<\/h2>\n<pre><code class=\"bash\">sudo curl -o \/etc\/yum.repos.d\/mssql-server.repo https:\/\/packages.microsoft.com\/config\/rhel\/8\/mssql-server-2022.repo sudo yum install -y mssql-server sudo \/opt\/mssql\/bin\/mssql-conf setup systemctl status mssql-server<\/code><\/pre>\n<p>\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043e\u0440\u0442\u044b<\/p>\n<pre><code class=\"bash\">sudo firewall-cmd --zone=public --add-port=1433\/tcp --permanent sudo firewall-cmd --reload<\/code><\/pre>\n<p><a class=\"anchor\" name=\"sqlcmd\" id=\"sqlcmd\"><\/a><\/p>\n<h2>\u0421\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u00a0sqlcmd<\/h2>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b <strong>sqlcmd<\/strong> \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 ODBC Driver for SQL Server, \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u043c \u043a\u0430\u043c\u043d\u0435\u043c \u0442\u0443\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 <strong><u>\u0438\u043c\u0435\u043d\u043d\u043e 17 \u0432\u0435\u0440\u0441\u0438\u044f<\/u><\/strong> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Microsoft SQL Server 2022 (RTM-CU4) (KB5026717).<\/p>\n<p>1) \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0437-\u043f\u043e\u0434 Windows 10 \u0438\u0437 Windows Terminal (PowerShell)<\/p>\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/connect\/odbc\/download-odbc-driver-for-sql-server?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">Download ODBC Driver for SQL Server<\/a><\/p>\n<p>2) RHEL 8<\/p>\n<pre><code>sudo curl -o \/etc\/yum.repos.d\/msprod.repo https:\/\/packages.microsoft.com\/config\/rhel\/8\/prod.repo sudo yum remove unixODBC-utf16 unixODBC-utf16-devel sudo yum install -y mssql-tools unixODBC-devel echo 'export PATH=\"$PATH:\/opt\/mssql-tools\/bin\"' >> ~\/.bash_profile echo 'export PATH=\"$PATH:\/opt\/mssql-tools\/bin\"' >> ~\/.bashrc source ~\/.bashrc<\/code><\/pre>\n<p>3) Ubuntu 20.04<\/p>\n<pre><code>sudo apt-get update sudo apt install curl curl https:\/\/packages.microsoft.com\/keys\/microsoft.asc | sudo tee \/etc\/apt\/trusted.gpg.d\/microsoft.asc curl https:\/\/packages.microsoft.com\/config\/ubuntu\/20.04\/prod.list | sudo tee \/etc\/apt\/sources.list.d\/msprod.list sudo apt-get update sudo apt-get install mssql-tools unixodbc-dev sudo apt-get update sudo apt-get install mssql-tools echo 'export PATH=\"$PATH:\/opt\/mssql-tools\/bin\"' >> ~\/.bash_profile echo 'export PATH=\"$PATH:\/opt\/mssql-tools\/bin\"' >> ~\/.bashrc source ~\/.bashrc<\/code><\/pre>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/p>\n<pre><code>sqlcmd -S localhost -U sa -P strongPassword123  # \u0412\u044b\u0445\u043e\u0434 \u0438\u0437 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b sqlcmd QUIT<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/sql\/tools\/sqlcmd\/sqlcmd-utility?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">https:\/\/learn.microsoft.com\/ru-ru\/sql\/tools\/sqlcmd\/sqlcmd-utility?view=sql-server-ver16<\/a><\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"ssms\" id=\"ssms\"><\/a><\/p>\n<h2>Microsoft SQL Server Management Studio (SSMS)<\/h2>\n<p>SQL Server Management Studio (SSMS) \u2014 \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 SQL.<\/p>\n<p><a href=\"https:\/\/learn.microsoft.com\/ru-ru\/sql\/ssms\/download-sql-server-management-studio-ssms?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 SQL Server Management Studio (SSMS)<\/a><\/p>\n<figure class=\"full-width\"><\/figure>\n<p><a class=\"anchor\" name=\"engine\" id=\"engine\"><\/a><\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0441\u043b\u0443\u0436\u0431\u043e\u0439\u00a0 Database Engine<\/h3>\n<pre><code class=\"bash\">#\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u043b\u0443\u0436\u0431\u044b Database Engine sudo systemctl status mssql-server   #\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 Database Engine sudo systemctl stop mssql-server sudo systemctl start mssql-server sudo systemctl restart mssql-server<\/code><\/pre>\n<p><a class=\"anchor\" name=\"sql_info\" id=\"sql_info\"><\/a><\/p>\n<h2>SQL \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/h2>\n<pre><code class=\"sql\">SELECT Name from sys.databases; SELECT @@VERSION as Version SELECT SERVERPROPERTY('ServerName') as 'Container ID' SELECT SERVERPROPERTY('Edition') as Edition SELECT CURRENT_USER;  GO<\/code><\/pre>\n<p><a class=\"anchor\" name=\"fts\" id=\"fts\"><\/a><\/p>\n<h2>Full-Text Search on Linux<\/h2>\n<p>\u041f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 SQL Server. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 .csv \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0411\u0414.<\/p>\n<p>RHEL<\/p>\n<pre><code>sudo yum install -y mssql-server-fts sudo yum check-update sudo yum update mssql-server-fts<\/code><\/pre>\n<p>Ubuntu<\/p>\n<pre><code>sudo apt-get update  sudo apt-get install -y mssql-server-fts<\/code><\/pre>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/linux\/sql-server-linux-setup-full-text-search?view=sql-server-ver16\" rel=\"noopener noreferrer nofollow\">Install SQL Server Full-Text Search on Linux<\/a><\/p>\n<p><a class=\"anchor\" name=\"example\" id=\"example\"><\/a><\/p>\n<h2>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0411\u0414 \u0434\u043b\u044f Linux<\/h2>\n<p>\u042d\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 Microsoft.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438 SQL-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0411\u0414 Microsoft \u043d\u0430 Linux.<\/p>\n<p>\u0412\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0430: <\/p>\n<ol>\n<li>\n<p><a href=\"#fts\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c Full-Text Search<\/a><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c sql-\u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0438\u0436\u0435<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 SQL \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/mobaxterm.mobatek.net\/\" rel=\"noopener noreferrer nofollow\">MobaXTerm<\/a>)<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0433\u0440\u0443\u043f\u043f\u044b<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0438\u0445 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<\/ol>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b Linux (\u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432):<\/p>\n<pre><code class=\"bash\"># \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 TestMe \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f - \u043c\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c: admin # \/home\/admin\/ mkdir TestMe # \u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 ftp \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 MobaXTerm # \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0432 \u0438\u0445 \u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u044f \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f  # \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043d\u0430 root (\u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f) sudo su cd \/var mkdir sqlbackup cd sqlbackup mkdir TestMe # \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043c \u0444\u0430\u0439\u043b\u044b \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e TestMe - cp \/home\/admin\/TestMe\/* \/var\/sqlbackup\/TestMe chown mssql -R sqlbackup\/ chgrp mssql -R sqlbackup\/<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a sql \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 <strong>sqlcmd<\/strong> \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u043e SSH \u0447\u0435\u0440\u0435\u0437 MobaXTerm<\/p>\n<pre><code>sqlcmd -S localhost -U SA -P strongPassword123 -i \/var\/sqlbackup\/TestMe\/ddl.sql<\/code><\/pre>\n<p>\u0421\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 &#8212; AddressType.csv  <\/p>\n<pre><code class=\"scala\">1       Billing {B84F78B1-4EFE-4A0E-8CB7-70E9F112F886}  2008-04-30 00:00:00 2       Home    {41BC2FF6-F0FC-475F-8EB9-CEC0805AA0F2}  2008-04-30 00:00:00 3       Main Office     {8EEEC28C-07A2-4FB9-AD0A-42D4A0BBC575}  2008-04-30 00:00:00 4       Primary {24CB3088-4345-47C4-86C5-17B535133D1E}  2008-04-30 00:00:00 5       Shipping        {B29DA3F8-19A3-47DA-9DAA-15C84F4A83A5}  2008-04-30 00:00:00 6       Archive {A67F238A-5BA2-444B-966C-0467ED9C427F}  2008-04-30 00:00:00<\/code><\/pre>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">\u0424\u0430\u0439\u043b<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">ddl.sql<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u0411\u0414, \u0435\u0441\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430<\/p>\n<p align=\"left\">\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0411\u0414<\/p>\n<p align=\"left\">\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">insert.sql<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u0430\u043d\u043d\u044b\u0435<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">select.sql<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0414\u0435\u043b\u0430\u0435\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">delete.sql<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>ddl.sql<\/p>\n<pre><code class=\"sql\">:setvar SqlSamplesSourceDataPath \"\/var\/sqlbackup\/TestMe\/data\/\" :setvar DatabaseName \"TestMe\"   IF '$(SqlSamplesSourceDataPath)' IS NULL OR '$(SqlSamplesSourceDataPath)' = '' BEGIN         RAISERROR(N'The variable SqlSamplesSourceDataPath must be defined.', 16, 127) WITH NOWAIT         RETURN END;   SET NOCOUNT OFF; GO  PRINT CONVERT(varchar(1000), @@VERSION); GO  PRINT ''; PRINT 'Started - ' + CONVERT(varchar, GETDATE(), 121); GO  USE [master]; GO --<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-378139","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/378139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=378139"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/378139\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=378139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=378139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=378139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}