{"id":348543,"date":"2023-06-08T21:01:24","date_gmt":"2023-06-08T21:01:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=348543"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=348543","title":{"rendered":"<span>\u041a\u043b\u0430\u0441\u0442\u0435\u0440 HA \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 AlwaysON MS SQL Server 2022 Linux \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Pacemaker \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0418\u0411 1\u0421<\/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<p>\u0412 \u0441\u0435\u0442\u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0430\u043d\u0443\u0430\u043b\u043e\u0432 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0445 \u0433\u0440\u0443\u043f\u043f  \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 AlwaysON Microsoft SQL Server \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c Windows Server  Failover Cluster. \u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b Microsoft SQL Server  \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u044b \u043d\u0430 Linux, \u0430 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b  \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 AlwaysON? \u0412 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0435 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u0432\u043d\u044f\u0442\u043d\u044b\u0445  \u043c\u0430\u043d\u0443\u0430\u043b\u043e\u0432, \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d\u043d\u044b\u0445 \u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443. \u0420\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0433\u0430\u0439\u0434. \u0421\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443,  \u0433\u0430\u0439\u0434 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0438 \u0440\u0430\u0437\u0436\u0451\u0432\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0445  \u0432\u0435\u0449\u0435\u0439 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0430\u0442\u044c \u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043e\u0434\u043d\u0430\u043a\u043e, \u043a\u0430\u043a  \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u043b\u044e\u0434\u0435\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u0435\u0449\u0451  \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043a\u0443\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u044d\u0442\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u043e \u043d\u0440\u0430\u0432\u0443. \u0422\u0443\u0442 \u043c\u044b  \u0437\u0430\u0442\u0440\u043e\u043d\u0435\u043c \u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b  \u0434\u043b\u044f \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f Microsoft SQL  Server \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u2014 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0431\u0430\u0437 1\u0421.\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0434\u0430\u043d\u043d\u0430\u044f  \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f, \u043d\u043e \u0432\u0430\u0436\u043d\u0430 \u043a \u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0438\u044e.  <\/p>\n<p>\u041e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u044b 1\u0421, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c 24\/7, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0432\u0430\u0436\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u0435\u0431\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f. \u0414\u0430\u043d\u043d\u0430\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043d\u0443\u0436\u043d\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0441\u0431\u043e\u044f\u043c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043e\u0432, \u043d\u043e \u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u043d\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u043d\u044b\u0445 \u0431\u0435\u0437 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0430 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u043e\u0439. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u044f \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0435\u0431\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u043d\u0435 \u0441\u043f\u0435\u0448\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u043c SQL \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0440\u0435\u0433\u043b\u0430\u043c\u0435\u043d\u0442\u044b \u0443 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u0439 \u0435\u0441\u0442\u044c,&nbsp;\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u043e \u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u043d\u0438\u0445, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441 1\u0421-\u043d\u0438\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c, \u0442\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438. \u041d\u0443 \u0438 \u043a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043e\u043d\u0438 \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0431\u0430\u0437\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u043c. \u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437 \u0438 \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u0434\u0438\u043b\u0435\u043c\u043c\u0443 \u043c\u044b \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c SQL \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u043b\u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u044b 1\u0421 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c\u0438, \u0430 \u0431\u043e\u043d\u0443\u0441\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u043a \u043e\u0442\u043a\u0430\u0437\u0430\u043c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u044b \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b Microsoft SQL Server.  <\/p>\n<p>\u041e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0433\u0440\u0443\u043f\u043f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 Always On Microsoft SQL Server \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0432\u044f\u0437\u043a\u0438 Pacemaker \u0438 Corosync.<\/p>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0435\u0441\u0442\u044c Pacemaker \u0438 Corosync &#8212; \u0432\u0437\u044f\u0442\u043e <a href=\"https:\/\/xakep.ru\/2019\/01\/24\/corosync-pacemaker\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>. \u0412\u0441\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u043d\u0435 \u043d\u0435\u0447\u0435\u0433\u043e.<\/p>\n<p>Corosync \u2014 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u0438\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. Corosync \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 (\u043d\u043e\u0434) \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p> \u043e\u043f\u043e\u0432\u0435\u0449\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e \u0441\u043c\u0435\u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043d\u043e\u0434\u044b \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435;<\/p>\n<\/li>\n<li>\n<p> \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c \u043d\u0430 \u0432\u0441\u0435\u0445 \u043d\u043e\u0434\u0430\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0431\u0449\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445, \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0432 \u0431\u0430\u0437\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>Pacemaker \u2014 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u044b \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043d\u043e\u0434. \u0412\u043e\u0442 \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430:\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u044c \u0441\u0431\u043e\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043d\u043e\u0434 \u0438 \u0441\u043b\u0443\u0436\u0431;<\/p>\n<ul>\n<li>\n<p>\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f: \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0431\u044b\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u044c, \u043a\u0430\u043a \u0441\u0442\u0440\u0430\u0448\u043d\u044b\u0439 \u0441\u043e\u043d;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0438\u043f\u043e\u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432: \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043c\u043e\u0436\u043d\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 STONITH (Shoot-The-Other-Node-In-The-Head), \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u043c\u0435\u0440\u0448\u0430\u044f \u043d\u043e\u0434\u0430 \u0438\u0437\u043e\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u043d\u0435\u0439 \u043d\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442, \u043f\u043e\u043a\u0430 \u043d\u043e\u0434\u0430 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u0441\u043d\u043e\u0432\u0430 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u0432\u043e\u0440\u0443\u043c\u043d\u044b\u0435 \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u043b\u044e\u0431\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430;<br \/> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u0443\u044e \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e;<\/p>\n<\/li>\n<li>\n<p>\u043c\u043e\u0436\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433 \u043d\u0430 \u0432\u0441\u0435 \u0443\u0437\u043b\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u2014 \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e;<\/p>\n<\/li>\n<li>\n<p>\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0445 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0443\u0437\u043b\u0435;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432: \u043a\u043b\u043e\u043d\u044b (\u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0441\u0443\u0440\u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0443\u0437\u043b\u043e\u0432) \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f (master\/slave \u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435) \u2014 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0421\u0423\u0411\u0414 (MySQL, MariaDB, PostgreSQL, Oracle, MSSQL);<\/p>\n<\/li>\n<li>\n<p>\u0438\u043c\u0435\u0435\u0442 \u0435\u0434\u0438\u043d\u0443\u044e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 CRM \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u043c\u0435\u0435\u043c, \u0442\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u041e\u0421 Debian 11 \u0438\u0437 netinstall \u043e\u0431\u0440\u0430\u0437\u0430 (\u0432\u044b\u0431\u0438\u0440\u0430\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0435\u0440 ssh \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b).<\/p>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435:<\/p>\n<ul>\n<li>\n<p>10.10.2.228\u043f\u0435\u0440\u0432\u044b\u0439 \u0443\u0437\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>mssql-test-1<\/strong>;<\/p>\n<\/li>\n<li>\n<p>10.10.2.229\u0432\u0442\u043e\u0440\u043e\u0439 \u0443\u0437\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>mssql-test-2<\/strong>;<\/p>\n<\/li>\n<li>\n<p>10.10.2.240\u0442\u0440\u0435\u0442\u0438\u0439 \u0443\u0437\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>mssql-test-3<\/strong>;<\/p>\n<\/li>\n<li>\n<p>10.10.2.18\u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 <strong>ag1<\/strong> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>list-ag1<\/strong>;<\/p>\n<\/li>\n<li>\n<p>10.10.2.19\u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 <strong>ag2<\/strong> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>list-ag2<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0434\u0435\u044e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0438\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043d\u0438\u0436\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8a5\/d8b\/d5a\/8a5d8bd5a2d90e35eba898f028e818bb.png\" width=\"762\" height=\"464\"><\/figure>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u043d\u0438\u043c \u0441\u0445\u0435\u043c\u0443. \u0420\u0435\u0441\u0443\u0440\u0441 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044f <strong>list-ag1<\/strong> \u0436\u0451\u0441\u0442\u043a\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 <strong>ag1<\/strong>, \u0434\u0432\u0430 \u044d\u0442\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0437\u043b\u0430\u0445. \u0415\u0441\u043b\u0438 \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <strong>ag1<\/strong> \u0443\u0437\u0435\u043b MASTER &#8212; \u044d\u0442\u043e <strong>mssql-test-1<\/strong>, \u0442\u043e \u0438 \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <strong>list-ag1<\/strong> \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 MASTER \u0443\u0437\u043b\u043e\u043c \u0431\u0443\u0434\u0435\u0442 <strong>mssql-test-1<\/strong>. \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <strong>ag1<\/strong> \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 MASTER \u0443\u0437\u0435\u043b, <strong>list-ag1<\/strong> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u043e\u043c. \u0420\u0435\u0441\u0443\u0440\u0441 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044f <strong>list-ag2<\/strong> \u0442\u0430\u043a\u0436\u0435 \u0436\u0451\u0441\u0442\u043a\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 <strong>ag2<\/strong>. \u0422\u0440\u0435\u0442\u0438\u0439 \u0443\u0437\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 <strong>mssql-test-3<\/strong> \u0441\u043e \u0441\u043b\u043e\u0432 Microsoft \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 Microsoft SQL, \u043d\u0430 \u043d\u0451\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0432\u044b\u043f\u0443\u0441\u043a Express, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0435\u043c\u0443 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0433\u0440\u0443\u043f\u043f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 <strong>ag1<\/strong> \u0438 <strong>ag2<\/strong>. \u0422\u0430\u043a \u044d\u0442\u043e \u0438\u043b\u0438 \u043d\u0435\u0442, \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0430\u043c\u0438, \u0443 \u043c\u0435\u043d\u044f \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u0434\u043d\u044f\u0442\u044b \u0442\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0441 \u0432\u044b\u043f\u0443\u0441\u043a\u043e\u043c Microsoft SQL Server Evaluation Edition. \u0411\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0433\u0440\u0443\u043f\u043f\u0430\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u0442 \u0443\u0437\u0435\u043b (\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 \u0441\u0435\u0440\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c). \u0423\u0437\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 <strong>mssql-test-3<\/strong> \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c MASTER \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432: <strong>list-ag1, list-ag2, ag1, ag2<\/strong>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0430\u043c\u044b\u0439 \u043d\u0438\u0437\u043a\u0438\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043d\u0430 <strong>mssql-test-3<\/strong>.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <strong>mssql-test-1.stonish<\/strong> \u0438 <strong>mssql-test-2.stonish<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0438\u043c\u0451\u043d\u043d\u043e\u0433\u043e \u0438\u043c \u0443\u0437\u043b\u0430. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u043d\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c MASTER \u043d\u0430 \u0442\u043e\u043c \u0443\u0437\u043b\u0435, \u0434\u043b\u044f \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d\u0438 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 STONISH \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u0433\u0430\u0439\u0434\u0430. \u0420\u0435\u0441\u0443\u0440\u0441\u044b stonish \u043c\u044b \u0442\u043e\u0436\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e\u0438\u043c\u0451\u043d\u043d\u044b\u0445 \u0438\u043c \u0443\u0437\u043b\u0430\u0445.<\/p>\n<p>\u0412\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0436\u0443 \u043f\u043e\u0434 root. \u041d\u0435 \u0432\u0438\u0436\u0443 \u0432 \u044d\u0442\u043e\u043c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043b\u043e\u0445\u043e\u0433\u043e \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u0441\u0442\u0435\u043d\u0434\u0435. \u0424\u0430\u0435\u0440\u0432\u043e\u043b \u0442\u043e\u0436\u0435 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e, \u043d\u0435 \u0432\u0438\u0436\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u044d\u0442\u043e\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0410\u0434\u0435\u043f\u0442\u044b &#171;\u0441\u0443\u043f\u0435\u0440-\u0441\u0435\u043a\u0443\u0440\u043d\u043e\u0441\u0442\u0438&#187; \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438\u0437\u0432\u0438\u043d\u044f\u0439\u0442\u0435. \u0412\u0441\u0451 \u0443\u043c\u0435\u044e, \u043d\u043e \u043b\u0438\u0448\u043d\u0438\u0439 \u0440\u0430\u0437 \u043d\u0435 \u0445\u043e\u0447\u0443 \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c.<\/p>\n<hr>\n<h3>1. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Microsoft SQL Server 2022<\/h3>\n<p>\u0412\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0443\u0437\u043b\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b:<\/p>\n<pre><code class=\"bash\"># apt update # apt -y install gnupg2 curl wget<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 GPG Microsoft:<\/p>\n<pre><code class=\"bash\"># wget -O- https:\/\/packages.microsoft.com\/keys\/microsoft.asc | tee \/etc\/apt\/trusted.gpg.d\/microsoft-archive-keyring.asc<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 Microsoft SQL Server 2022, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f Ubuntu 20.04:<\/p>\n<pre><code class=\"bash\"># curl https:\/\/packages.microsoft.com\/config\/ubuntu\/20.04\/mssql-server-2022.list | tee \/etc\/apt\/sources.list.d\/mssql-server-2022.list<\/code><\/pre>\n<p>\u041e\u043f\u044f\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0430\u043c SQL \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre><code class=\"bash\"># apt update # apt install -y mssql-server<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 Microsoft SQL Server:<\/p>\n<pre><code class=\"bash\"># \/opt\/mssql\/bin\/mssql-conf setup<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0442\u043e\u0440\u0430 &#8212; \u0432\u044b\u0431\u043e\u0440 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0438 SQL Server \u0438\u043b\u0438 &#171;\u0432\u044b\u043f\u0443\u0441\u043a\u0430&#187; &#8212; \u043a\u0430\u043a \u0438\u0445 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0430\u043c Microsoft:<\/p>\n<pre><code class=\"bash\">  1) Evaluation (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439, \u0431\u0435\u0437 \u043f\u0440\u0430\u0432 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438, 180-\u0434\u043d\u0435\u0432\u043d\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435)   2) Developer (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439, \u0431\u0435\u0437 \u043f\u0440\u0430\u0432 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438)   3) Express (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f)   4) Web (\u043f\u043b\u0430\u0442\u043d\u044b\u0439)   5) Standard (\u043f\u043b\u0430\u0442\u043d\u044b\u0439)   6) Enterprise (\u043f\u043b\u0430\u0442\u043d\u044b\u0439) - CPU core utilization restricted to 20 physical\/40 hyperthreaded   7) Enterprise Core (\u043f\u043b\u0430\u0442\u043d\u044b\u0439) - CPU core utilization up to Operating System Maximum   8) \u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044f, \u043a\u0443\u043f\u043b\u0435\u043d\u043d\u0430\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u043d\u0430\u043b \u0440\u043e\u0437\u043d\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0430\u0436, \u0438 \u043a\u043b\u044e\u0447 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430.   9) Standard (Billed through Azure) - Use pay-as-you-go billing through Azure.  10) Enterprise Core (Billed through Azure) - Use pay-as-you-go billing through Azure.<\/code><\/pre>\n<p>\u041d\u0430\u0434\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u043e, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e (\u043a\u0440\u043e\u043c\u0435 8 \u043f\u0443\u043d\u043a\u0442\u0430). \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u0435\u043d\u0434\u0430 \u043d\u0430\u043c \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b 1 \u0438\u043b\u0438 2 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432. \u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0439 6 \u0438 7 \u0432\u044b\u043f\u0443\u0441\u043a\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 36 \u044f\u0434\u0440\u0430\u043c\u0438 \u0438 72 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0442\u043e \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0439\u0442\u0435 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044e Enterprise Core.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0432\u044b\u043f\u0443\u0441\u043a\u043e\u0432, \u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0441\u044f, \u0432\u0445\u043e\u0434\u0438\u0442 \u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u043f\u0443\u0441\u043a \u0432 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u043c\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f Microsoft Software Assurance.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u0438 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u044f\u0437\u044b\u043a \u0434\u043b\u044f SQL Server.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0432\u0430\u0436\u0434\u044b \u0432\u0432\u043e\u0434\u0438\u043c \u043f\u0430\u0440\u043e\u043b\u044c SA.<\/p>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d. \u041c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c:<\/p>\n<pre><code class=\"bash\"># systemctl status mssql-server.service<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c SQL Server Agent, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0441\u0430\u043c\u043e\u0433\u043e SQL \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a: \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0411\u0414. \u0425\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 crontab, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0435\u0433\u043e SQL \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c sqlcmd \u0438 \u0441\u043d\u044f\u0442\u044c \u044d\u0442\u0443 \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0441 SQl agent. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0447\u0442\u0451\u0442\u0435 2-\u0439 \u043f\u0443\u043d\u043a\u0442 (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044e \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u0435\u043d\u0434\u0430). \u0410 \u043f\u043e\u043a\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c SQL Server Agent, \u0442.\u043a. \u043e\u043d \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f AlwaysON:<\/p>\n<pre><code class=\"bash\"># \/opt\/mssql\/bin\/mssql-conf set sqlagent.enabled true<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043b\u0443\u0436\u0431\u0443 SQL \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># systemctl restart mssql-server.service<\/code><\/pre>\n<p>\u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Full-text Search, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \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:<\/p>\n<pre><code class=\"bash\"># apt -y install mssql-server-fts<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 SQL \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 (\u0442\u043e\u0436\u0435 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e) \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440 Microsoft ODBC \u0438 mssql-tools. \u041f\u0430\u043a\u0435\u0442 mssql-tools \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 sqlcmd, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c SQL \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043d\u043e \u043e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0435\u0437 ODBC \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code class=\"bash\"># curl https:\/\/packages.microsoft.com\/config\/debian\/11\/prod.list &gt; \/etc\/apt\/sources.list.d\/mssql-release.list<\/code><\/pre>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c:<\/p>\n<pre><code class=\"bash\"># apt update # ACCEPT_EULA=Y apt install -y msodbcsql18 mssql-tools18<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0443\u0442\u044c \u0434\u043e \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u043e\u0432 mssql-tools \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e PATH. \u0423 \u043c\u0435\u043d\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0443\u0442\u0435\u0439 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>PATH<\/code> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 <code>\/etc\/bash.bashrc<\/code>. \u0423 \u0412\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 <code>~\/.bashrc<\/code>, \u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u043d\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 Debian \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Ubuntu. \u041a\u0442\u043e-\u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442 \u044d\u0442\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432 <code>\/etc\/environment<\/code> \u0438\u043b\u0438 \u0432 <code>~\/.profile<\/code> \u0438\u043b\u0438 <code>\/etc\/profile.d\/<\/code>.<\/p>\n<pre><code class=\"bash\"># echo 'export PATH=\"$PATH:\/opt\/mssql-tools18\/bin\"' &gt;&gt; \/etc\/bash.bashrc # source \/etc\/bash.bashrc<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043a\u0442\u043e \u043d\u0435 \u043f\u043e\u043d\u044f\u043b, \u0437\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0430\u0434\u043e, \u0442\u043e \u044d\u0442\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0441\u044c \u0432 \u043b\u044e\u0431\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c:  <\/p>\n<pre><code class=\"bash\"># sqlcmd<\/code><\/pre>\n<p>\u0410 \u0435\u0441\u043b\u0438 \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0443\u0442\u044c <code>\/opt\/mssql-tools18\/bin<\/code> \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>PATH<\/code>, \u0442\u043e \u0432\u0430\u043c \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c sqlcmd \u043f\u043e \u043f\u043e\u043b\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\"># \/opt\/mssql-tools18\/bin\/sqlcmd<\/code><\/pre>\n<h3>2. \u0422\u044e\u043d\u0438\u043d\u0433 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0412\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0430 \u0443\u0437\u043b\u0430\u0445 mssql-test-1 \u0438 mssql-test-2. \u041d\u0438\u0447\u0435\u0433\u043e \u0442\u044e\u043d\u0438\u043d\u0433\u043e\u0432\u0430\u0442\u044c \u043d\u0430 mssql-test-3 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d, \u0442\u043e mssql-test-3 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0441\u043b\u0430\u0431\u0435\u043d\u044c\u043a\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u043e\u0439.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 Linux, \u0442\u043e, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0432\u0430\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u043f\u0443\u043d\u043a\u0442\u0435. \u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u044f\u043c \u0441\u043c\u0435\u043b\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0443\u043d\u043a\u0442 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u044d\u0442\u043e\u0442 \u043f\u0443\u043d\u043a\u0442 \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0441\u043e\u0432\u0435\u0442\u044b \u043f\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b Microsoft SQL Server \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u0431\u0430\u0437\u0430\u043c\u0438 1\u0421.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0434\u043e \u0441\u043d\u044f\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u041e\u0421, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0435\u0441\u0442\u044c. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0435 \u043e\u0442 \u0441\u0430\u043c\u0438\u0445 Microsoft \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f: (soft 16000), (hard 32727).<\/p>\n<p>\u041f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a \u0432\u0438\u0434\u0443 \u0444\u0430\u0439\u043b <code>\/etc\/security\/limits.d\/99-mssql-server.conf<\/code>:<\/p>\n<pre><code class=\"bash\">mssql soft stack 8192 root soft stack 8192 mssql hard nofile 32727 mssql soft nofile 16000<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 Microsoft SQL \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 BIOS \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0441\u043d\u044f\u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043d\u0435 \u043c\u0435\u0448\u0430\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0443 \u0438 \u043f\u0430\u043c\u044f\u0442\u0438 \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u043e\u0442\u0430\u0445. \u041d\u0435\u043f\u043b\u043e\u0445\u043e \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e <a href=\"https:\/\/static.selectel.ru\/docs\/kak-uvelichit-skorost-raboty-1C-s-pomoshhyu-nastroek-BIOS.pdf\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a> \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 BIOS \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 Supermicro (\u043a\u0441\u0442\u0430\u0442\u0438, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441\u0430\u043c\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 BIOS).<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u0430\u043c\u043e\u0439 \u041e\u0421. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b tuned.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0435\u0451:<\/p>\n<pre><code class=\"bash\"># apt update # apt install -y tuned tuned-utils tuned-utils-systemtap<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f (\u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0431\u0443\u0434\u0435\u0442 balanced):<\/p>\n<pre><code class=\"bash\"># tuned-adm active<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438:<\/p>\n<pre><code># tuned-adm list<\/code><\/pre>\n<p>\u0418 \u0442\u0443\u0442 \u0440\u0430\u0434\u0443\u0435\u043c\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u043c\u0435\u0435\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u044c &#8216;mssql&#8217;. \u041f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e Microsoft \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u043b\u0441\u044f \u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412\u043e\u043e\u0431\u0449\u0435, \u0432 \u0442\u044f\u0436\u0435\u043b\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445 \u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b \u043f\u0440\u043e\u0444\u0438\u043b\u044c &#8216;throughput-performance&#8217; \u0438 \u0434\u0430\u0436\u0435 \u0441\u043e\u043c\u043d\u0435\u0432\u0430\u043b\u0441\u044f, \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043e\u0442 Microsoft, \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 <code>\/usr\/lib\/tuned\/mssql\/tuned.conf<\/code> \u0438 \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044c &#8216;throughput-performance&#8217;, \u0430 \u0443\u0436\u0435 \u043f\u043e\u0432\u0435\u0440\u0445 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f mssql.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0441\u043c\u0435\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u044c &#8216;mssql&#8217;:<\/p>\n<pre><code class=\"bash\"># tuned-adm profile mssql<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0443\u0437\u043b\u044b \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 tuned:<\/p>\n<pre><code class=\"bash\"># reboot<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043d\u044e\u0430\u043d\u0441\u044b \u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u0443\u044e \u0438\u043c\u0435\u043d\u043d\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 SQL \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. Microsoft \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 XFS, \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f EXT4 \u0438 \u044d\u0442\u043e \u0432\u0441\u0451. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u0438\u0442 BTRFS \u0438\u043b\u0438 ZFS, \u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0433\u043e\u0440\u0447\u0438\u0442\u044c\u0441\u044f. \u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c tempdb \u043d\u0430 RAM \u0434\u0438\u0441\u043a\u0435, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 TMPFS. \u041d\u043e \u0435\u0441\u043b\u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u044f\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u041e\u0417\u0423 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f tempdb, \u0442\u043e \u0432\u044b\u0445\u043e\u0434 \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u0435\u0441\u0442\u044c. \u0421\u043e\u0437\u0434\u0430\u0451\u043c RAM \u0434\u0438\u0441\u043a \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 TMPFS, \u043d\u0430 \u043d\u0451\u043c \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u043e\u0431\u0440\u0430\u0437\u0430 \u0434\u0438\u0441\u043a\u0430 <code>.img<\/code> \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 dd, \u0441\u043e\u0437\u0434\u0430\u0451\u043c loopback \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043e\u0431\u0440\u0430\u0437\u0430, \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 XFS \u043d\u0430 loopback \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435, \u043d\u0443 \u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u0443\u0434\u0430 \u0445\u043e\u0442\u0438\u043c. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/microsoft\/mssql-docker\/issues\/110#issuecomment-310969848\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>\u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0439 \u044d\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0432\u0438\u0434\u0435 systemd \u044e\u043d\u0438\u0442\u0430 \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0430 \u0441\u043b\u0443\u0436\u0431\u0443 mssql \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043e\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u044e\u043d\u0438\u0442\u0430. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043d\u0430\u043c \u0442\u0430\u043a\u0438 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u0441\u0442\u044b\u043b\u0435\u0439 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c tempdb \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>\u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0413\u0438\u043b\u0435\u0432\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 tempdb \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u043d\u0430 noRAID NVMe \u043f\u043e \u0442\u0438\u043f\u0443 \u0441\u0443\u043f\u0435\u0440\u0431\u044b\u0441\u0442\u0440\u044b\u0445 Samsung 970\/980\/990. \u0427\u0442\u043e \u043d\u0435 \u043b\u0438\u0448\u0435\u043d\u043e \u0441\u043c\u044b\u0441\u043b\u0430, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0448\u0438\u043d\u0430 PCI-e 4-\u0433\u043e \u043d\u0443 \u0438\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b 3-\u0433\u043e \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u044d\u0442\u0438\u0445 SSD.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0440\u0435\u0448\u0438\u0442\u0435 \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 (\u0430 \u043e\u043d \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u0441\u044f) \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 tempdb \u043d\u0430 NVMe SSD, \u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0442\u0430\u043a.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u043e\u0447\u043a\u0443 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\"># mkdir -p \/database\/tempdb<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043d\u0430 NVMe:<\/p>\n<pre><code class=\"bash\"># mkfs.xfs \/dev\/nvme0n1 -K -f -L tempdb<\/code><\/pre>\n<p>\u0412\u044b\u044f\u0441\u043d\u044f\u0435\u043c ID \u043d\u0430\u0448\u0435\u0433\u043e NVMe:<\/p>\n<pre><code class=\"bash\"># blkid \/dev\/nvme0n1 \/dev\/nvme0n1: LABEL=\"tempdb\" UUID=\"db0a867d-7bc6-4129-a1a6-c419b1534c9b\" BLOCK_SIZE=\"512\" TYPE=\"xfs\"<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0432 <code>\/etc\/fstab<\/code>:<\/p>\n<pre><code class=\"bash\">UUID=\"db0a867d-7bc6-4129-a1a6-c419b1534c9b\" \/database\/tempdb xfs rw,attr2,noatime 0 0<\/code><\/pre>\n<p>\u041c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c:<\/p>\n<pre><code class=\"bash\"># mount -a<\/code><\/pre>\n<p>\u041c\u0435\u043d\u044f\u0435\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438:<\/p>\n<pre><code class=\"bash\"># chown -R mssql: \/database\/tempdb<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b \u0438 \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0438\u0441\u043a\u043e\u0432 \u0438\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432, \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u0445 \u0411\u0414 \u0438 \u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432. \u0424\u0430\u0439\u043b\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u043b\u044f \u043d\u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441 \u0442\u0435\u043c\u0438 \u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0435 \u0442\u043e\u0436\u0435. \u0412\u043e\u043e\u0431\u0449\u0435, \u0431\u0430\u0437\u044b \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 SAS SSD \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u0445 RAID5, \u0430 \u043b\u0443\u0447\u0448\u0435 RAID10 \u043d\u0430 \u0434\u0438\u0441\u043a\u0430\u0445 \u0442\u0438\u043f\u0430 WD SS20 \u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445. \u0422\u0430\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u043a\u043e\u043b\u043e 2000\u041c\u0411\/c, \u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0438 \u0442\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435. \u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 DWPD, \u0443 WD SS20 \u044d\u0442\u043e\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0434\u043e\u0445\u043e\u0434\u0438\u0442 \u0434\u043e 10 \u0435\u0434\u0438\u043d\u0438\u0446. \u0414\u0438\u0441\u043a \u0438\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f tempdb \u043f\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c Microsoft \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432 2 \u0440\u0430\u0437\u0430 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0434\u0438\u0441\u043a\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0411\u0414. \u0412 \u0441\u0435\u0442\u0438 \u043f\u043e\u043b\u043d\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0433\u0434\u0435 \u0431\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043e\u043f\u044b\u0442 \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0447\u0442\u043e \u0447\u0435\u043c \u0431\u044b\u0441\u0442\u0440\u0435\u0435 tempdb, \u0442\u0435\u043c \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 SQL. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u0412\u044b \u0434\u0435\u0440\u0436\u0438\u0442\u0435 \u0431\u0430\u0437\u0443 \u043d\u0430 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0445 HDD \u0434\u0438\u0441\u043a\u0430\u0445, \u0442\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c tempdb \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0430\u044e\u0449\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u0441\u0435 \u0431\u0430\u0437\u044b, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 <code>\/var\/opt\/mssql\/data<\/code>. \u0422\u0430\u043c \u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0438 \u0431\u044d\u043a\u0430\u043f\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u0430\u0437 (.mdf), \u0436\u0443\u0440\u043d\u0430\u043b\u043e\u0432 (.ldf) \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0445 \u043a\u043e\u043f\u0438\u0439 (.bak) \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434:<\/p>\n<pre><code class=\"bash\"># \/opt\/mssql\/bin\/mssql-conf set filelocation.defaultdatadir \/database\/local # \/opt\/mssql\/bin\/mssql-conf set filelocation.defaultlogdir \/database\/local # \/opt\/mssql\/bin\/mssql-conf set filelocation.defaultbackupdir \/database\/backups<\/code><\/pre>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0438\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 &#8216;mssql:&#8217;<\/p>\n<p>\u0410 \u0432\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\"># \/opt\/mssql\/bin\/mssql-conf list | more<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u043d\u0435\u0441\u0435\u043d\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0442\u0443\u0442:<\/p>\n<pre><code class=\"bash\"># cat \/var\/opt\/mssql\/mssql.conf<\/code><\/pre>\n<p>\u0410 \u0432\u043e\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0431\u0430\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f tempdb \u043d\u0430 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0434\u0438\u0441\u043a. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c tempdb \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c SQL \u0441\u043a\u0440\u0438\u043f\u0442. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441.\u0417\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u044f\u043c \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u0442.\u043a. \u043d\u0435 \u0437\u0440\u044f \u0436\u0435 \u043c\u044b \u0441\u0442\u0430\u0432\u0438\u043b\u0438 mssql-tools (\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c -C (trust the server certificate) \u0438\u043d\u0430\u0447\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0430\u043c\u043e\u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430).\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 -Q \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0432\u044b\u0439\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e, \u0442\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 -q.<\/p>\n<p>\u041d\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f &#8212; \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0451 \u0432\u0430\u0436\u043d\u043e\u0435, \u0447\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f tempdb. \u0425\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c tempdb (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044d\u0442\u043e \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e). \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0443 \u043d\u0430\u0441 NVMe-\u0434\u0438\u0441\u043a \u043e\u0431\u044a\u0451\u043c\u043e\u043c 1\u0422\u0411, 8 \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0430\u0437 \u0438 1 \u0444\u0430\u0439\u043b \u0436\u0443\u0440\u043d\u0430\u043b\u0430. \u041c\u044b \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u0441\u0435\u0431\u0435, \u0447\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0440\u043e\u0441 \u0434\u043e 100\u0413\u0411.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0430\u0432\u0442\u043e\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430. \u0425\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0448\u0430\u0433 \u0430\u0432\u0442\u043e\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043f\u043e\u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0442\u043e\u0431\u044b \u0444\u0430\u0439\u043b\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u043b\u0438\u0441\u044c \u0440\u0435\u0436\u0435, \u0442.\u043a. \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u0432\u0442\u043e\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u0411\u0414 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f. \u041b\u043e\u0433\u0438\u0447\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0431\u0430\u0437\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043d\u0438\u043c\u0438 \u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0440\u043e\u0434\u0443, \u043f\u0440\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c \u0448\u0430\u0433\u0435 64\u041c\u0411 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0447\u0430\u0441\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u043b\u0435\u043a\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 tempdb. \u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u0448\u0430\u0433, \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043d\u043e \u044d\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435\u0435 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0437\u043e\u043b.<\/p>\n<p>\u0418\u0442\u043e\u0433\u043e:<\/p>\n<ul>\n<li>\n<p>\u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b tempdb \u0432 <code>\/database\/tempdb<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 tempdb \u0431\u0443\u0434\u0435\u0442 10\u0413\u0411 (SIZE=10GB);<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0440\u043e\u0433 \u0430\u0432\u0442\u043e\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d 1\u0413\u0411 (FILEGROWTH=1GB);<\/p>\n<\/li>\n<li>\n<p>\u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d 100\u0413\u0411 (MAXSIZE=100GB).<\/p>\n<\/li>\n<\/ul>\n<p>\u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c:<\/p>\n<pre><code class=\"bash\"># sqlcmd -o \/tmp\/tempdb.sql -C -S localhost -Usa -Q \"SELECT 'ALTER DATABASE tempdb MODIFY FILE (NAME='+[name]+', SIZE=10GB, MAXSIZE=100GB , FILEGROWTH=1GB, FILENAME='+[physical_name]+')' FROM sys.master_files WHERE database_id = DB_ID(N'tempdb');\"<\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b \u043e\u0447\u0435\u043d\u044c \u0441\u044b\u0440\u043e\u0439 SQL \u0441\u043a\u0440\u0438\u043f\u0442. \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0438\u0437 \u043d\u0435\u0433\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0438 \u043f\u0440\u043e\u0447\u0438\u0439 \u043c\u0443\u0441\u043e\u0440 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c GO \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<pre><code class=\"bash\"># sed -i -e 's\/^[ \\t]*\/\/g' -e 's\/[ \\t]*$\/\/g' -e 's\/^[-]*\/\/g' -e '\/^$\/d' -e '$d' -i -e '\/[)]*$\/ a GO' \/tmp\/tempdb.sql<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 &#8216;USE master&#8217;, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 &#8216;GO&#8217;:<\/p>\n<pre><code class=\"bash\"># sed -i '1i USE master\\nGO' \/tmp\/tempdb.sql<\/code><\/pre>\n<p>\u042d\u043a\u0440\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u043f\u0443\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443 &#8216;\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043e\u043a\u043e\u043b\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 &#171;\/&#187;&#8216;:<\/p>\n<pre><code class=\"bash\"># sed -i -e 's\/FILENAME=\/FILENAME='\"'\"'\/g' \/tmp\/tempdb.sql # sed -i -e 's\/df\/df'\"'\"'\/g' \/tmp\/tempdb.sql<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u043e\u0432\u044b\u0439 \u043f\u0443\u0442\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u0442\u044c tempdb:<\/p>\n<pre><code class=\"bash\"># export TEMPDBPATH=\"\/database\/tempdb\"<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0432 \u043d\u0430\u0448\u0435\u043c SQL \u0441\u043a\u0440\u0438\u043f\u0442\u0435 \u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0442\u0430\u0440\u044b\u0439 \u043f\u0443\u0442\u044c \u043d\u0430 \u043d\u043e\u0432\u044b\u0439:<\/p>\n<pre><code class=\"bash\"># sed -i -e \"s|\/var\/opt\/mssql\/data|$TEMPDBPATH|g\" \/tmp\/tempdb.sql<\/code><\/pre>\n<p><strong>\u041f\u043e\u043c\u0435\u0442\u043a\u0430 \u0434\u043b\u044f&nbsp;\u0433\u0443\u0440\u0443 awk \u0438 sed.<\/strong> \u0423\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e&nbsp;\u043c\u043e\u0436\u043d\u043e \u0441&nbsp;\u043c\u0435\u043d\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u043c\u0430\u043d\u0434 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u043f\u043e&nbsp;\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043d\u043e&nbsp;\u043c\u043d\u0435 \u043b\u0435\u043d\u044c&nbsp;\u0431\u044b\u043b\u043e \u0434\u043e\u043b\u0433\u043e \u0441\u0438\u0434\u0435\u0442\u044c. \u0415\u0441\u043b\u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u0442\u0435 \u0432&nbsp;\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0451 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442, \u0442\u043e \u0447\u0435\u0441\u0442\u044c \u0432\u0430\u043c \u0438 \u0445\u0432\u0430\u043b\u0430.<\/p>\n<p>\u0414\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\"># cat \/tmp\/tempdb.sql USE master GO ALTER DATABASE tempdb MODIFY FILE (NAME=tempdev, SIZE=10GB, MAXSIZE=100GB , FILEGROWTH=1GB, FILENAME='\/database\/tempdb\/tempdb.mdf') GO ALTER DATABASE tempdb MODIFY FILE (NAME=templog, SIZE=10GB, MAXSIZE=100GB , FILEGROWTH=1GB, FILENAME='\/database\/tempdb\/templog.ldf') GO ALTER DATABASE tempdb MODIFY FILE (NAME=tempdev2, SIZE=10GB, MAXSIZE=100GB , FILEGROWTH=1GB, FILENAME='\/database\/tempdb\/tempdb2.ndf') GO ALTER DATABASE tempdb MODIFY FILE (NAME=tempdev3, SIZE=10GB, MAXSIZE=100GB , FILEGROWTH=1GB, FILENAME='\/database\/tempdb\/tempdb3.ndf') GO ALTER DATABASE tempdb MODIFY FILE (NAME=tempdev4, SIZE=10GB, MAXSIZE=100GB , FILEGROWTH=1GB, FILENAME='\/database\/tempdb\/tempdb4.ndf') GO ALTER DATABASE tempdb MODIFY FILE (NAME=tempdev5, SIZE=10GB, MAXSIZE=100GB , FILEGROWTH=1GB, FILENAME='\/database\/tempdb\/tempdb5.ndf') GO ALTER DATABASE tempdb MODIFY FILE (NAME=tempdev6, SIZE=10GB, MAXSIZE=100GB , FILEGROWTH=1GB, FILENAME='\/database\/tempdb\/tempdb6.ndf') GO ALTER DATABASE tempdb MODIFY FILE (NAME=tempdev7, SIZE=10GB, MAXSIZE=100GB , FILEGROWTH=1GB, FILENAME='\/database\/tempdb\/tempdb7.ndf') GO ALTER DATABASE tempdb MODIFY FILE (NAME=tempdev8, SIZE=10GB, MAXSIZE=100GB , FILEGROWTH=1GB, FILENAME='\/database\/tempdb\/tempdb8.ndf') GO<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<pre><code class=\"bash\"># sqlcmd -i \/tmp\/tempdb.sql -C -S localhost -Usa<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0438 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0430 <code>templog.ldf<\/code> \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0432\u044b\u0439, \u043f\u0438\u0448\u0435\u0442: &#171;\u0424\u0430\u0439\u043b &#171;tempdev&#187; \u0431\u044b\u043b \u0438\u0437\u043c\u0435\u043d\u0451\u043d \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435. \u0414\u0430\u043d\u043d\u044b\u0439 \u043d\u043e\u0432\u044b\u0439 \u043f\u0443\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u044d\u0442\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445&#187;. \u0418 \u0434\u0443\u043c\u0430\u0435\u0442. \u041d\u0435 \u043f\u0430\u043d\u0438\u043a\u0443\u0435\u043c, \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c. \u0422\u0430\u043a \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c. \u0416\u0434\u0430\u0442\u044c \u043c\u0438\u043d\u0443\u0442 5.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u043b\u0443\u0436\u0431\u0443:<\/p>\n<pre><code class=\"bash\"># systemctl restart mssql-server.service<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b tempdb, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e:<\/p>\n<pre><code class=\"bash\"># rm -rf \/var\/opt\/mssql\/data\/temp*<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<pre><code class=\"bash\"># rm -rf \/tmp\/tempdb.sql<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c tempdb \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0431\u044b\u0441\u0442\u0440\u043e\u043c NVMe-\u0434\u0438\u0441\u043a\u0435.<\/p>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c, \u0442\u043e \u044d\u0442\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0431\u0443\u0434\u0443\u0442 <strong>&#8216;max\/min server memory&#8217;<\/strong> \u0438 <strong>&#8216;max degree of parallelism&#8217;<\/strong>. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<p><strong>&#8216;max\/min server memory&#8217;<\/strong> \u2014 \u044d\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c\u043e\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c Microsoft SQL Server. \u0422\u0443\u0442 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e, \u0435\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e SQL, \u0442\u043e \u043c\u044b \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u043b\u044f \u041e\u0421 Windows 6\u201310\u0413\u0411 \u041e\u0417\u0423, \u0430 \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0442\u0434\u0430\u0451\u043c Microsoft SQL Server. \u0415\u0441\u043b\u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u0430 \u0440\u043e\u043b\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 1\u0421-\u041f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u0435 \u0438\u043b\u0438 \u0435\u0449\u0451 \u0447\u0435\u0433\u043e \u0445\u0443\u0436\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u043e\u0432, \u0442\u043e \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438, \u0432\u0440\u043e\u0434\u0435 \u0434\u0430\u0436\u0435 \u0433\u0434\u0435-\u0442\u043e \u0435\u0441\u0442\u044c \u0444\u043e\u0440\u043c\u0443\u043b\u0430 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e.\u041d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043f\u0440\u043e Linux, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u043f\u043e \u0441\u043e\u0441\u0435\u0434\u0441\u0442\u0432\u0443 \u043d\u0430 \u044d\u0442\u043e\u0439 \u0436\u0435 \u041e\u0421 \u043d\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 1\u0421, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e, \u0442. \u043a. Linux-\u0432\u0435\u0440\u0441\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 1\u0421 \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Microsoft SQL (\u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0435\u0447\u0430\u043b\u044c\u043d\u043e). \u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u043d\u0430 \u0442\u043e\u0439 \u0436\u0435 \u041e\u0421 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0435\u0449\u0451 \u043c\u0435\u043d\u0435\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e. \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e Linux \u0431\u0435\u0437 \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430 \u043a\u0443\u0434\u0430 \u043c\u0435\u043d\u0435\u0435 \u043f\u0440\u043e\u0436\u043e\u0440\u043b\u0438\u0432, \u043d\u0435\u0436\u0435\u043b\u0438 Windows Server, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0430\u043c\u043e\u0439 \u041e\u0421 4\u0413\u0411, \u0430 \u0432\u0441\u0451 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043c\u0435\u043b\u043e \u043e\u0442\u0434\u0430\u0451\u043c Microsoft SQL. \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u044b \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u043c, \u0438\u0431\u043e \u043d\u0435 \u0432\u0438\u0434\u0438\u043c \u0441\u043c\u044b\u0441\u043b\u0430, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435. \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c <strong>&#8216;max server memory&#8217;<\/strong> \u043b\u0435\u0433\u043a\u043e \u0438\u0437 SSMS, \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0432\u0448\u0438\u0441\u044c \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u044f\u043c \u0441\u0438\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"sql\">sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'max server memory', 4096; GO RECONFIGURE; GO<\/code><\/pre>\n<p>\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442\u0430\u0445.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c SQL \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c:<\/p>\n<pre><code class=\"sql\">SELECT c.value, c.value_in_use FROM sys.configurations c WHERE c.[name] = 'max server memory (MB)' GO<\/code><\/pre>\n<p><strong>&#8216;max degree of parallelism&#8217;<\/strong> \u2014 \u044d\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u0438\u0437\u043c\u0430. \u0412\u043e\u043e\u0431\u0449\u0435 1\u0421 \u0432 \u043e\u0431\u0449\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 &#8216;1&#8217;, \u0441 \u044d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f <a href=\"https:\/\/its.1c.ru\/db\/metod8dev\/content\/5945\/hdoc\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>, \u043d\u043e \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0443\u0442\u0451\u043c \u043c\u044b \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043c\u043d\u043e\u0433\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 (\u0431\u044b\u0441\u0442\u0440\u044b\u0445) \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8216;1&#8217; \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u0438 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442 \u0432\u0430\u0448\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0435\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u00ab\u0436\u0438\u0440\u043d\u044b\u0435\u00bb, \u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0431\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e. \u041f\u043e\u0434\u0431\u0438\u0440\u0430\u0435\u043c \u0435\u0433\u043e \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u0438. \u041d\u0430 \u043e\u0434\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 \u0434\u0432\u0443\u043c\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430\u043c\u0438 E5-2697 v4 \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u0430 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0431\u0430\u0437\u0430, \u043d\u0430\u043c\u0438 \u0431\u044b\u043b\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8217;10&#8217;, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0438\u0437 SSMS, \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0432\u0448\u0438\u0441\u044c \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u0440\u044f\u043c \u0441\u0438\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435, \u0442\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"sql\">EXEC sp_configure 'show advanced options', 1; GO RECONFIGURE WITH OVERRIDE; GO EXEC sp_configure 'max degree of parallelism', 16; GO RECONFIGURE WITH OVERRIDE; GO<\/code><\/pre>\n<h3>3. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u043e\u0431\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443 \u0444\u0430\u0439\u043b <code>\/etc\/hosts<\/code> \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code>127.0.0.1localhost 10.10.2.228mssql-test-1 10.10.2.229mssql-test-2 10.10.2.240mssql-test-3 10.10.2.18list-ag1 10.10.2.19list-ag2<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0438 \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f (High-Availability and Disaster Recovery) \u043d\u0430 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435 Microsoft SQL Server \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># \/opt\/mssql\/bin\/mssql-conf set hadr.hadrenabled 1 # systemctl restart mssql-server.service<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># apt update # apt install -y pacemaker pacemaker-cli-utils crmsh resource-agents fence-agents csync2 python3-azure pcs<\/code><\/pre>\n<p>\u0417\u0430\u0434\u0430\u0435\u043c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u0430\u0432\u0430\u0442\u0435\u043b\u044e hacluster \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445:<\/p>\n<pre><code class=\"bash\"># passwd hacluster<\/code><\/pre>\n<p>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u044e\u0447 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 corosync \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># corosync-keygen<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0438 \u0442\u0440\u0435\u0442\u0438\u0439 \u0443\u0437\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># scp \/etc\/corosync\/authkey root@mssql-test-2:\/etc\/corosync # scp \/etc\/corosync\/authkey root@mssql-test-3:\/etc\/corosync<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u043a\u0432\u043e\u0440\u0443\u043c\u0435. \u041a\u0432\u043e\u0440\u0443\u043c &#8212; \u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.<br \/>\u041a\u0432\u043e\u0440\u0443\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"n &gt; N\/2\" alt=\"n &gt; N\/2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/87a\/4d5\/ec5\/87a4d5ec545f8e33af79aac1eea4e438.svg\" width=\"74\" height=\"22\"><\/p>\n<p>\u0433\u0434\u0435 <strong>n<\/strong> \u2013 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432, <strong>N<\/strong> \u2013 \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u0437\u043b\u043e\u0432 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.\u041f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u043a\u0432\u043e\u0440\u0443\u043c\u0430 \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 \u0431\u044b\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0435 (\u0430 \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u043e) \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u044b \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0415\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 3 \u0443\u0437\u043b\u0430 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u0432\u044b\u0448\u0435\u043b \u0438\u0437 \u0441\u0442\u0440\u043e\u044f, \u0442\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438\u043c\u0435\u0435\u0442 \u043a\u0432\u043e\u0440\u0443\u043c. \u0410 \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u0434\u0432\u0430 \u0443\u0437\u043b\u0430, \u043a\u0430\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0442\u043e \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u0441\u0442\u0440\u043e\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043d\u044b\u0445 \u0443\u0437\u043b\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u044b\u043c \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435 \u043e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0443\u0437\u043b\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u042d\u0442\u043e\u0433\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u043a\u0432\u043e\u0440\u0443\u043c\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u044b. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 \u0443\u0437\u043b\u043e\u0432, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u0432\u043e\u0440\u0443\u043c\u0430. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\"># crm configure property no-quorum-policy=ignore<\/code><\/pre>\n<p>\u041d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0442\u0440\u0435\u0442\u0438\u0439 \u0443\u0437\u0435\u043b, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0441 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c Microsoft SQL \u044d\u0442\u043e\u0442 \u0443\u0437\u0435\u043b \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u0432 \u0440\u043e\u043b\u0438 &#171;\u0433\u043e\u043b\u043e\u0441\u0443\u044e\u0449\u0435\u0433\u043e&#187;.\u0412\u043e\u0442 \u043c\u044b \u0438 \u043f\u043e\u0448\u043b\u0438 \u0432\u0442\u043e\u0440\u044b\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u043f\u0443\u0442\u0451\u043c.<\/p>\n<p>\u041f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a \u0432\u0438\u0434\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 <code>\/etc\/corosync\/corosync.conf<\/code> \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\">totem {     version: 2     cluster_name: mssql-test-cluster     transport: udpu     crypto_cipher: none     crypto_hash: none } logging {     fileline: off     to_stderr: yes     to_logfile: yes     logfile: \/var\/log\/corosync\/corosync.log     to_syslog: yes     debug: off     logger_subsys {         subsys: QUORUM         debug: off     } } quorum {     provider: corosync_votequorum } nodelist {     node {         name: mssql-test-1         nodeid: 1         ring0_addr: 10.10.2.228     }     node {         name: mssql-test-2         nodeid: 2         ring0_addr: 10.10.2.229     }     node {         name: mssql-test-3         nodeid: 3         ring0_addr: 10.10.2.240     } }<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0438 \u0442\u0440\u0435\u0442\u0438\u0439 \u0443\u0437\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># scp \/etc\/corosync\/corosync.conf root@mssql-test-2:\/etc\/corosync # scp \/etc\/corosync\/corosync.conf root@mssql-test-3:\/etc\/corosync<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c pacemaker \u0438 corosync \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># systemctl restart pacemaker corosync<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># crm status<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/91d\/58e\/cd0\/91d58ecd0130f2645e0e1dd349ab9cc8.png\" width=\"651\" height=\"232\"><\/figure>\n<h3>4. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0433\u0440\u0443\u043f\u043f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 mssql-server-ha \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># apt install -y mssql-server-ha<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f pacemaker \u043a\u0430\u043a \u0438\u043c\u044f \u0432\u0445\u043e\u0434\u0430 Microsoft SQL. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0443\u0437\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c SQL \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"sql\">USE [master] GO CREATE LOGIN [pacemakerLogin] with PASSWORD= N'ComplexP@$$w0rd!'; ALTER SERVER ROLE [sysadmin] ADD MEMBER [pacemakerLogin]; GO<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 pacemaker \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u044d\u043a\u0437\u0435\u043f\u043b\u044f\u0440\u0443 Microsoft SQL:<\/p>\n<pre><code class=\"bash\"># echo 'pacemakerLogin' &gt;&gt; \/var\/opt\/mssql\/secrets\/passwd # echo 'ComplexP@$$w0rd!' &gt;&gt; \/var\/opt\/mssql\/secrets\/passwd # chown root:root \/var\/opt\/mssql\/secrets\/passwd # chmod 400 \/var\/opt\/mssql\/secrets\/passwd<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 AlwaysOn_health extended event session (\u0441\u0435\u0430\u043d\u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439). \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c SQL \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"sql\">ALTER EVENT SESSION AlwaysOn_health ON SERVER WITH (STARTUP_STATE=ON); GO<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u0430\u0441\u0442\u0435\u0440-\u043a\u043b\u044e\u0447, \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u0438 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0430 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"sql\">CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Parol@123'; GO CREATE CERTIFICATE sqllinuxdb_certificate WITH SUBJECT = 'sqllinuxdb_certificate'; GO BACKUP CERTIFICATE sqllinuxdb_certificate      TO FILE = '\/var\/opt\/mssql\/data\/sqllinuxdb_certificate_certificate.cer'      WITH PRIVATE KEY (              FILE = '\/var\/opt\/mssql\/data\/sqllinuxdb_certificate_certificate.pvk',              ENCRYPTION BY PASSWORD = 'Parol@123'      );<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 &#8216;\/var\/opt\/mssql\/data&#8217; \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<p><code>sqllinuxdb_certificate_certificate.cer<\/code><\/p>\n<p><code>sqllinuxdb_certificate_certificate.pvk<\/code><\/p>\n<p>\u041d\u0430\u043c \u043d\u0430\u0434\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0438 \u0442\u0440\u0435\u0442\u0438\u0439 \u0443\u0437\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># scp \/var\/opt\/mssql\/data\/sqllinuxdb_certificate_*.* root@mssql-test-2:\/var\/opt\/mssql\/data # scp \/var\/opt\/mssql\/data\/sqllinuxdb_certificate_*.* root@mssql-test-3:\/var\/opt\/mssql\/data<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u0435\u043d\u044f\u0435\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0438 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># chown mssql: \/var\/opt\/mssql\/data\/sqllinuxdb_certificate_*.*<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0438 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u0434\u043d\u044f\u0435\u043c SQL \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"sql\">CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Parol@123'; GO CREATE CERTIFICATE sqllinuxdb_certificate      FROM FILE = '\/var\/opt\/mssql\/data\/sqllinuxdb_certificate_certificate.cer'      WITH PRIVATE KEY (              FILE = '\/var\/opt\/mssql\/data\/sqllinuxdb_certificate_certificate.pvk',              DECRYPTION BY PASSWORD = 'Parol@123'      );<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0442\u043e\u0447\u043a\u0438 \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e\u0433\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 &#8212; HADR (High availability disaster recovery) endpoints. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"sql\">CREATE ENDPOINT [Hadr_endpoint]       AS TCP (LISTENER_PORT = 5022)       FOR DATABASE_MIRRORING (           ROLE = ALL,           AUTHENTICATION = CERTIFICATE sqllinuxdb_certificate,           ENCRYPTION = REQUIRED ALGORITHM AES       ); ALTER ENDPOINT [Hadr_endpoint] STATE = STARTED;<\/code><\/pre>\n<h3>5. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 AlwaysON<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 AlwaysON (ag1), \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0440\u0430\u0437\u0443 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u043e\u0438\u0445 \u0447\u043b\u0435\u043d\u043e\u0432 \u0433\u0440\u0443\u043f\u043f\u044b. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<pre><code class=\"sql\">CREATE AVAILABILITY GROUP [ag1]       WITH (CLUSTER_TYPE = EXTERNAL)       FOR REPLICA ON       N'mssql-test-1' WITH (          ENDPOINT_URL = N'tcp:\/\/mssql-test-1:5022',          AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,          FAILOVER_MODE = EXTERNAL,          SEEDING_MODE = AUTOMATIC       ),       N'mssql-test-2' WITH (           ENDPOINT_URL = N'tcp:\/\/mssql-test-2:5022',           AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,          FAILOVER_MODE = EXTERNAL,          SEEDING_MODE = AUTOMATIC       ),       N'mssql-test-3' WITH (           ENDPOINT_URL = N'tcp:\/\/mssql-test-3:5022',           AVAILABILITY_MODE = CONFIGURATION_ONLY         );    ALTER AVAILABILITY GROUP [ag1] GRANT CREATE ANY DATABASE;<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0439 \u0443\u0437\u0435\u043b \u043a \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 (ag1) \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0411\u0414. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u044b:<\/p>\n<pre><code class=\"sql\">ALTER AVAILABILITY GROUP [ag1] JOIN WITH (CLUSTER_TYPE = EXTERNAL); ALTER AVAILABILITY GROUP [ag1] GRANT CREATE ANY DATABASE;<\/code><\/pre>\n<p>\u0410 \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<pre><code class=\"sql\">ALTER AVAILABILITY GROUP [ag1] JOIN WITH (CLUSTER_TYPE = EXTERNAL);<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 AlwaysON (ag2), \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0440\u0430\u0437\u0443 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u043e\u0438\u0445 \u0447\u043b\u0435\u043d\u043e\u0432 \u0433\u0440\u0443\u043f\u043f\u044b. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<pre><code class=\"sql\">CREATE AVAILABILITY GROUP [ag2]       WITH (CLUSTER_TYPE = EXTERNAL)       FOR REPLICA ON       N'mssql-test-2' WITH (          ENDPOINT_URL = N'tcp:\/\/mssql-test-2:5022',          AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,          FAILOVER_MODE = EXTERNAL,          SEEDING_MODE = AUTOMATIC       ),       N'mssql-test-1' WITH (           ENDPOINT_URL = N'tcp:\/\/mssql-test-1:5022',           AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,          FAILOVER_MODE = EXTERNAL,          SEEDING_MODE = AUTOMATIC       ),       N'mssql-test-3' WITH (           ENDPOINT_URL = N'tcp:\/\/mssql-test-3:5022',           AVAILABILITY_MODE = CONFIGURATION_ONLY         );    ALTER AVAILABILITY GROUP [ag2] GRANT CREATE ANY DATABASE;<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0443\u0437\u0435\u043b \u043a \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 (ag2) \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0411\u0414. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u044b:<\/p>\n<pre><code class=\"sql\">ALTER AVAILABILITY GROUP [ag2] JOIN WITH (CLUSTER_TYPE = EXTERNAL); ALTER AVAILABILITY GROUP [ag2] GRANT CREATE ANY DATABASE;<\/code><\/pre>\n<p>\u0410 \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0439 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<pre><code class=\"sql\">ALTER AVAILABILITY GROUP [ag2] JOIN WITH (CLUSTER_TYPE = EXTERNAL);<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ag1 \u0438 ag2 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a, \u043a\u0430\u043a \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c92\/5aa\/b86\/c925aab86e5b6f749f180ae753fddcd3.png\" width=\"818\" height=\"231\"><\/figure>\n<h3>6. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0438\u043b\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0438\u0437 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0438 \u0411\u0414 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041c\u043e\u0434\u0435\u043b\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u043d\u0430\u044f \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0411\u0414 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0411\u0414 \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432 &#171;\u041f\u043e\u043b\u043d\u0430\u044f&#187;. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u044d\u043a\u0430\u043f \u0431\u0430\u0437\u044b. \u041d\u0435 \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 (\u0445\u043e\u0442\u044f \u0438 \u0434\u043b\u044f \u043d\u0435\u0451 \u0442\u043e\u0436\u0435), \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u0435\u0437 \u0431\u044d\u043a\u0430\u043f\u0430 \u043e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u0441\u044f \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c SQL \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430<\/p>\n<pre><code class=\"sql\">backup database test-db-1 to disk='test-db-1'<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0411\u0414 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ag1, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 SQL \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"sql\">ALTER AVAILABILITY GROUP [AG1] ADD Database [test-db-1];<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0434\u0435\u043b\u044b\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u0442\u0435\u0436\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438 \u0434\u043b\u044f \u0411\u0414 test-db-2. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0411\u0414 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ag2, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 SQL \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0443\u0437\u043b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"sql\">ALTER AVAILABILITY GROUP [AG2] ADD Database [test-db-2];<\/code><\/pre>\n<h3>7. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0433\u0440\u0443\u043f\u043f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0432 Pacemaker<\/h3>\n<p>\u041f\u0435\u0440\u0435\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c STONITH, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0437\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c:<\/p>\n<pre><code class=\"bash\"># crm configure property stonith-enabled=false<\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u044d\u0442\u0438\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0412\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u043d\u0438 \u0442\u0430\u043a: <code>warning: Blind faith: not fencing unseen nodes<\/code> \u041a\u043b\u0430\u0441\u0442\u0435\u0440 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0435\u0442 \u043d\u0430\u0441, \u0447\u0442\u043e \u043c\u044b \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043e\u0433\u0440\u0430\u0436\u0434\u0430\u0435\u043c \u043e\u0442\u043a\u0430\u0437\u0430\u0432\u0448\u0438\u0435 \u0443\u0437\u043b\u044b. \u041c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043c STONITH \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ag1 \u0432 pacemaker. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c:<\/p>\n<pre><code class=\"bash\"># crm  configure   primitive ag1_cluster \\ ocf:mssql:ag \\ params ag_name=\"ag1\" \\ meta failure-timeout=60s \\ op start timeout=60s \\ op stop timeout=60s \\ op promote timeout=60s \\ op demote timeout=10s \\ op monitor timeout=60s interval=10s \\ op monitor timeout=60s on-fail=demote interval=11s role=\"Master\" \\ op monitor timeout=60s interval=12s role=\"Slave\" \\ op notify timeout=60s   ms ms-ag1 ag1_cluster \\ meta master-max=\"1\" master-node-max=\"1\" clone-max=\"3\" \\ clone-node-max=\"1\" notify=\"true\"   commit  quit<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 ms-ag1 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c:<\/p>\n<pre><code class=\"bash\"># crm resource status ms-ag1 resource ms-ag1 is running on: mssql-test-1 Master resource ms-ag1 is running on: mssql-test-2 resource ms-ag1 is running on: mssql-test-3<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ag2 \u0432 pacemaker. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c:<\/p>\n<pre><code class=\"bash\"># crm  configure   primitive ag2_cluster \\ ocf:mssql:ag \\ params ag_name=\"ag2\" \\ meta failure-timeout=60s \\ op start timeout=60s \\ op stop timeout=60s \\ op promote timeout=60s \\ op demote timeout=10s \\ op monitor timeout=60s interval=10s \\ op monitor timeout=60s on-fail=demote interval=11s role=\"Master\" \\ op monitor timeout=60s interval=12s role=\"Slave\" \\ op notify timeout=60s   ms ms-ag2 ag2_cluster \\ meta master-max=\"1\" master-node-max=\"1\" clone-max=\"3\" \\ clone-node-max=\"1\" notify=\"true\"   commit  quit<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 ms-ag2 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c:<\/p>\n<pre><code class=\"bash\"># crm resource status ms-ag2 resource ms-ag2 is running on: mssql-test-1 resource ms-ag2 is running on: mssql-test-2 Master resource ms-ag2 is running on: mssql-test-3<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># crm status<\/code><\/pre>\n<h3>8. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0433\u0440\u0443\u043f\u043f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ag1 \u0432 pacemaker, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f:<\/p>\n<pre><code class=\"bash\"># crm configure primitive list-ag1 \\ ocf:heartbeat:IPaddr2 \\ params ip=10.10.2.18<\/code><\/pre>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ag1 \u0432 \u0441\u0430\u043c\u043e\u043c SQL, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u0437\u043b\u0435:<\/p>\n<pre><code class=\"sql\">ALTER AVAILABILITY GROUP [ag1] ADD LISTENER N'list-ag1' ( WITH IP ((N'10.10.2.18', N'255.255.255.0')), PORT=1433); GO<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ag2 \u0432 pacemaker, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f:<\/p>\n<pre><code class=\"bash\"># crm configure primitive list-ag2 \\ ocf:heartbeat:IPaddr2 \\ params ip=10.10.2.19<\/code><\/pre>\n<p>\u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ag1 \u0432 \u0441\u0430\u043c\u043e\u043c SQL, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u0443\u0437\u043b\u0435:<\/p>\n<pre><code class=\"sql\">ALTER AVAILABILITY GROUP [ag2] ADD LISTENER N'list-ag2' ( WITH IP ((N'10.10.2.19', N'255.255.255.0')), PORT=1433); GO<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a \u0433\u0440\u0443\u043f\u043f\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043f\u043e IP \u0430\u0434\u0440\u0435\u0441\u0443 \u0438\u043b\u0438 \u0438\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044f, \u0435\u0441\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 A \u0437\u0430\u043f\u0438\u0441\u044c \u0432 DNS \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u044f.<\/p>\n<h3>9. \u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0433\u0440\u0443\u043f\u043f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u0438 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0447\u0442\u043e\u0431\u044b \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ag1 \u0438 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044f list-ag1 pacemaker \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b ms-ag1 \u0438 list-ag1, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0443\u0437\u0435\u043b. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c:<\/p>\n<pre><code class=\"bash\"># crm configure colocation ag1-with-listener INFINITY: list-ag1 ms-ag1:Master<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 IP \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0443\u0437\u043b\u043e\u043c \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0442\u043a\u0430\u0437\u0430 \u0433\u0440\u0443\u043f\u043f\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ag1 \u043f\u0435\u0440\u0435\u0448\u043b\u0430 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u043d\u0430 \u043d\u043e\u0432\u043e\u043c \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c:<\/p>\n<pre><code class=\"bash\"># crm configure order ag1-before-listener Mandatory: ms-ag1:promote list-ag1:start<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 MASTER \u043d\u0430 \u0442\u0440\u0435\u0442\u0438\u0439 \u0443\u0437\u0435\u043b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u0432 \u0441\u0430\u043c\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e:<\/p>\n<pre><code class=\"bash\"># crm_simulate -sL | grep \"ms-ag1\" | grep \"alloc\" pcmk__clone_allocate: ms-ag1 allocation score on mssql-test-1: INFINITY pcmk__clone_allocate: ms-ag1 allocation score on mssql-test-2: 0 pcmk__clone_allocate: ms-ag1 allocation score on mssql-test-3: 0<\/code><\/pre>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0443 \u0443\u0437\u043b\u0430 mssql-test-1, \u0442.\u043a. \u0440\u0430\u0432\u0435\u043d \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438, \u0430 \u0432\u043e\u0442 \u0434\u0432\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0437\u043b\u0430 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0432\u043d\u044b\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e \u043f\u0440\u0438 \u0432\u044b\u0445\u043e\u0434\u0435 \u0438\u0437 \u0441\u0442\u0440\u043e\u044f mssql-test-1, \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043d\u0430\u043e\u0431\u0443\u043c \u0432\u044b\u0431\u0435\u0440\u0435\u0442 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0436\u0438\u0432\u044b\u0445 \u0443\u0437\u043b\u043e\u0432, \u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0440\u043e\u043b\u044c MASTER. \u041d\u043e \u043d\u0430 mssql-test-3 \u043d\u0435\u0442 \u0431\u0430\u0437\u044b, \u0437\u043d\u0430\u0447\u0438\u0442 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u0442\u0443\u0434\u0430 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0434\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0434\u043d\u0438\u043c\u0435\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 mssql-test-2 \u0432\u044b\u0448\u0435 \u043d\u0443\u043b\u044f:<\/p>\n<pre><code class=\"bash\"># crm configure location loc-ag1 ms-ag1 100: mssql-test-2<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0437\u0430\u043d\u043e\u0432\u043e:<\/p>\n<pre><code class=\"bash\"># crm_simulate -sL | grep \"ms-ag1\" | grep \"alloc\" pcmk__clone_allocate: ms-ag1 allocation score on mssql-test-1: INFINITY pcmk__clone_allocate: ms-ag1 allocation score on mssql-test-2: 100 pcmk__clone_allocate: ms-ag1 allocation score on mssql-test-3: 0<\/code><\/pre>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0432\u0441\u0435 \u044d\u0442\u043e \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 2224 (HTTPS) \u043d\u0430 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u0430\u0445 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0414\u043b\u044f \u0432\u0445\u043e\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c &#171;hacluster&#187;, \u0430 \u043f\u0430\u0440\u043e\u043b\u044c \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u0432\u044b\u0448\u0435. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0432\u0441\u0435 \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a42\/8e5\/5f6\/a428e55f6e64e65ab3cbed972e4ce648.png\" width=\"1175\" height=\"468\"><\/figure>\n<p>\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ag2 \u0438 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044f list-ag2. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c:<\/p>\n<pre><code class=\"bash\"># crm configure colocation ag2-with-listener INFINITY: list-ag2 ms-ag2:Master<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 IP \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0443\u0437\u043b\u043e\u043c \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043e\u0442\u043a\u0430\u0437\u0430 \u0433\u0440\u0443\u043f\u043f\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ag2 \u043f\u0435\u0440\u0435\u0448\u043b\u0430 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u043d\u0430 \u043d\u043e\u0432\u043e\u043c \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c:<\/p>\n<pre><code class=\"bash\"># crm configure order ag2-before-listener Mandatory: ms-ag2:promote list-ag2:start<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 MASTER \u043d\u0430 \u0442\u0440\u0435\u0442\u0438\u0439 \u0443\u0437\u0435\u043b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u0432 \u0441\u0430\u043c\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u0414\u0435\u043b\u0430\u0435\u043c \u0432\u0441\u0435 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u0434\u043b\u044f ms-ag1, \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0434\u043b\u044f mssql-test-1:<\/p>\n<pre><code class=\"bash\"># crm configure location loc-ag2 ms-ag2 100: mssql-test-1<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<pre><code class=\"bash\"># crm status<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/234\/71e\/adb\/23471eadb59f412af245b361ed74a303.png\" width=\"645\" height=\"345\"><\/figure>\n<h3>10. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0442\u043a\u0430\u0437\u0430<\/h3>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0442\u0438\u043f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 AlwaysON \u0432\u043d\u0435\u0448\u043d\u0438\u0439, \u043c\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0442\u043a\u0430\u0437\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 SSMS \u0438\u043b\u0438 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0442\u043a\u0430\u0437\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 pacemaker. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 ms-ag1 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u0443\u0437\u0435\u043b mssql-test-2, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0437\u0430\u043d\u044f\u043b \u043c\u0435\u0441\u0442\u043e MASTER, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c:<\/p>\n<pre><code class=\"bash\"># crm resource move ms-ag1 mssql-test-2<\/code><\/pre>\n<p>\u0412\u044b\u0436\u0438\u0434\u0430\u0435\u043c \u043c\u0438\u043d\u0443\u0442\u043a\u0443 (\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u0435) \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<pre><code class=\"bash\"># crm status<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a6c\/00a\/dc2\/a6c00adc2e85f61c9634d3f39ee6aba4.png\" width=\"676\" height=\"348\"><\/figure>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 SSMS:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/402\/d66\/1fb\/402d661fbc700660fb07f9bd27d7abeb.png\" width=\"817\" height=\"236\"><\/figure>\n<p>\u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441 ms-ag1 \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u043d\u0430 mssql-test-2, \u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0438\u043c \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u0438 \u0440\u0435\u0441\u0443\u0440\u0441 list-ag1 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0440\u0430\u043d\u0435\u0435 \u043c\u044b \u0438\u0445 \u0441\u0432\u044f\u0437\u0430\u043b\u0438 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c. \u042d\u0442\u043e \u0431\u044b\u043b\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0442\u043a\u0430\u0437\u0430, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u0430\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e:<\/p>\n<pre><code class=\"bash\"># crm resource move ms-ag1 mssql-test-1<\/code><\/pre>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043e\u0436\u0434\u0451\u043c, \u043f\u043e\u043a\u0430 \u043f\u0440\u043e\u0439\u0434\u0443\u0442 \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435 \u0440\u0443\u0447\u043d\u0430\u044f, \u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f (\u0430\u0432\u0430\u0440\u0438\u0439\u043d\u0430\u044f) \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0442\u043a\u0430\u0437\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043a\u043b\u044e\u0447\u0438\u043c \u0432\u0442\u043e\u0440\u043e\u0439 \u0443\u0437\u0435\u043b \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\"># shutdown -h now<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u043e\u0431\u043e\u0436\u0434\u0430\u0432 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c:<\/p>\n<pre><code class=\"bash\"># crm status<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/177\/825\/468\/17782546846bd83700aeb92c54598207.png\" width=\"640\" height=\"393\"><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0432\u0441\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0448\u0442\u0430\u0442\u043d\u043e. \u0420\u043e\u043b\u044c \u043c\u0430\u0441\u0442\u0435\u0440\u0430 \u043f\u0435\u0440\u0435\u0448\u043b\u0430 \u0443\u0437\u043b\u0443 mssql-test-1.<\/p>\n<h3>11. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 fencing (STONISH)<\/h3>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 STONITH, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p>STONITH (Shoot The Other Node In The Head) \u043c\u0435\u0442\u043e\u0434 \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u043e\u0442\u043a\u0430\u0437\u0430\u0432\u0448\u0435\u0433\u043e \u0443\u0437\u043b\u0430. STONITH \u0438\u0437\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u0438\u0441\u043f\u0440\u0430\u0432\u043d\u044b\u0435 \u0443\u0437\u043b\u044b, \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044f \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u044f \u043d\u0435\u0438\u0441\u043f\u0440\u0430\u0432\u043d\u044b\u0439 \u0443\u0437\u0435\u043b, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u043b \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u0412\u043e\u0442 <a href=\"https:\/\/habr.com\/ru\/articles\/200348\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a> \u043e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435, \u0433\u0434\u0435 \u0434\u0430\u0436\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a &#171;\u041a\u0430\u043a \u0434\u043e\u0431\u0438\u0442\u044c \u043b\u0435\u0436\u0430\u0447\u0435\u0433\u043e&#187; \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0438 \u0441 \u044e\u043c\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0441\u0443\u0442\u044c STONITH.<\/p>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0444\u0435\u043d\u0441\u0438\u043d\u0433, \u0432 \u043e\u0431\u0449\u0435\u043c-\u0442\u043e, \u0438 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u043d \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u0445, \u0443\u0437\u043b\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u043d\u043e\u043f\u043e\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u0431\u0449\u0438\u0439 \u0440\u0435\u0441\u0443\u0440\u0441. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ISCSI. \u0422\u0430\u043a\u0436\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043e \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0445 \u043a\u0430\u043c\u043d\u044f\u0445. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432\u043e\u0442 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0442\u043a\u0430\u0437\u0430, \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0432 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 SLAVE \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u041e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043b\u0443\u0436\u0431\u0443 mssql, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b, \u0443\u0437\u0435\u043b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432 \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u0430\u0439\u043c\u0430\u0443\u0442 \u0444\u0435\u043d\u0441\u0438\u043d\u0433\u0430 \u0438 \u0443\u0437\u0435\u043b \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u043e\u0438\u0442 \u043b\u0438\u0431\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0430, \u043b\u0438\u0431\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0433\u0440\u0430\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u0433\u043b\u0430\u043c\u0435\u043d\u0442\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0442 \u0441 \u0443\u0437\u043b\u043e\u043c. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0433\u0430\u0439\u0434\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 STONISH \u0441\u043a\u043e\u0440\u0435\u0435 \u0438\u043c\u0435\u0435\u0442 \u0446\u0435\u043b\u044c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u043d\u0435\u0436\u0435\u043b\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0444\u0435\u043d\u0441\u0438\u043d\u0433\u0430 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\"># crm ra list stonith<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u0435\u0441\u0442\u044c \u0438 IPMI \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043f\u0440\u043e\u043f\u0440\u0438\u0435\u0442\u0430\u0440\u043d\u044b\u043c\u0438 \u0432\u0435\u0431-\u043c\u043e\u0440\u0434\u0430\u043c\u0438 \u0431\u0440\u0435\u043d\u0434\u043e\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a: ilo, imm, drac, \u0438 \u043f\u0440\u043e\u0447\u0438\u0435. \u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 API \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u043e\u0432 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a: pve, xenapi, vbox, azure, vmware, libvirt, docker \u0438 \u0442.\u0434. \u041c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0434\u043e\u0431\u0438\u0442\u044c \u0443\u0437\u0435\u043b, \u043e\u0442\u0434\u0430\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0418\u0411\u041f, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d, \u0435\u0441\u043b\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e\u0442 \u0418\u0411\u041f \u0435\u0441\u0442\u044c \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445, \u043d\u043e \u043d\u0430 \u043a\u0440\u0430\u0439\u043d\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0434\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 NUT, \u0430 \u0442\u043e\u0442 &#171;\u043f\u043e\u0433\u0430\u0441\u0438\u0442&#187; \u0418\u0411\u041f \u043e\u0442\u043a\u0430\u0437\u0430\u0432\u0448\u0435\u0433\u043e \u0443\u0437\u043b\u0430.<\/p>\n<p>\u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0437\u043b\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438 XCP-NG (\u0421\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 Citrix XenServer), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 XenAPI \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u0430\u0448\u0438\u043d\u0430\u043c\u0438. \u0412 \u0441\u043f\u0438\u0441\u043a\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043e\u043d \u0437\u043d\u0430\u0447\u0438\u0442\u0441\u044f \u043a\u0430\u043a &#8216;fence_xenapi&#8217;.<\/p>\n<p>\u041e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430:<\/p>\n<pre><code class=\"bash\"># crm ra info stonith:fence_xenapi<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 &#8216;q&#8217;.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441 stonish \u0434\u043b\u044f mssql-test-1:<\/p>\n<pre><code class=\"bash\"># crm configure primitive mssql-test-1.stonish stonith:fence_xenapi \\ params \\ username=\"root\" \\ password=\"\u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c\" \\ session_url=\"http:\/\/IP \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430\" \\ plug=\"8d5140e9-9a20-f2a0-e712-1dee4fbdf067\" \\ pcmk_host_list=mssql-test-1<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441 stonish \u0434\u043b\u044f mssql-test-2:<\/p>\n<pre><code class=\"bash\"># crm configure primitive mssql-test-2.stonish stonith:fence_xenapi \\ params \\ username=\"root\" \\ password=\"\u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c\" \\ session_url=\"http:\/\/IP \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0430\" \\ plug=\"8d5140e9-9a20-f2a0-e712-1dee4fbdf067\" \\ pcmk_host_list=mssql-test-2<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 stonish \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0437\u043b\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u0445 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u0442\u0435\u0445 \u0443\u0437\u043b\u0430\u0445, \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b.<\/p>\n<pre><code class=\"bash\"># pcs constraint location mssql-test-1.stonish avoids mssql-test-1=INFINITY # pcs constraint location mssql-test-2.stonish avoids mssql-test-2=INFINITY<\/code><\/pre>\n<p>\u041d\u0443 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c STONISH:<\/p>\n<pre><code class=\"bash\"># crm configure property cluster-recheck-interval=2min # crm configure property start-failure-is-fatal=true # crm configure property stonith-timeout=60 # crm configure property stonith-action=reboot # crm configure property concurrent-fencing=true # crm configure property stonith-enabled=true<\/code><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0441\u0443\u0440\u0441  STONISH \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0430\u0434\u043e:<\/p>\n<pre><code class=\"bash\"># stonith_admin -t 20 --reboot mssql-test-2<\/code><\/pre>\n<p>\u0418 \u0435\u0441\u043b\u0438 \u043d\u0430 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0435\u0441\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0437\u043b\u043e\u043c mssql-test-2, \u0442\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0443\u0439\u0434\u0435\u0442 \u0432 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443.<\/p>\n<p>\u0412\u043e\u0442 \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0438 \u0432\u0441\u0435 \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 AlwaysON.<\/p>\n<\/p>\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\/740732\/\"> https:\/\/habr.com\/ru\/articles\/740732\/<\/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<p>\u0412 \u0441\u0435\u0442\u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043c\u0430\u043d\u0443\u0430\u043b\u043e\u0432 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0445 \u0433\u0440\u0443\u043f\u043f  \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 AlwaysON Microsoft SQL Server \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c Windows Server  Failover Cluster. \u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b Microsoft SQL Server  \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u044b \u043d\u0430 Linux, \u0430 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b  \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 AlwaysON? \u0412 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0435 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u0432\u043d\u044f\u0442\u043d\u044b\u0445  \u043c\u0430\u043d\u0443\u0430\u043b\u043e\u0432, \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d\u043d\u044b\u0445 \u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u043f\u0440\u043e\u0441\u0443. \u0420\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0433\u0430\u0439\u0434. \u0421\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0436\u0443,  \u0433\u0430\u0439\u0434 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0438 \u0440\u0430\u0437\u0436\u0451\u0432\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0445  \u0432\u0435\u0449\u0435\u0439 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0430\u0442\u044c \u043e\u043f\u044b\u0442\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043e\u0434\u043d\u0430\u043a\u043e, \u043a\u0430\u043a  \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430, \u043b\u044e\u0434\u0435\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u0435\u0449\u0451  \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043a\u0443\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u044d\u0442\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u043e \u043d\u0440\u0430\u0432\u0443. \u0422\u0443\u0442 \u043c\u044b  \u0437\u0430\u0442\u0440\u043e\u043d\u0435\u043c \u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b  \u0434\u043b\u044f \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043a\u043b\u0430\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f Microsoft SQL  Server \u0432 \u0420\u043e\u0441\u0441\u0438\u0438 \u2014 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0431\u0430\u0437 1\u0421.\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0434\u0430\u043d\u043d\u0430\u044f  \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f, \u043d\u043e \u0432\u0430\u0436\u043d\u0430 \u043a \u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0438\u044e.  <\/p>\n<p>\u041e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u044b 1\u0421, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c 24\/7, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0432\u0430\u0436\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u0435\u0431\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f. \u0414\u0430\u043d\u043d\u0430\u044f \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u043d\u0443\u0436\u043d\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0441\u0431\u043e\u044f\u043c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043e\u0432, \u043d\u043e \u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u043d\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u043d\u044b\u0445 \u0431\u0435\u0437 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0430 \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u043e\u0439. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u044f \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0441\u0435\u0431\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u043d\u0435 \u0441\u043f\u0435\u0448\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435\u043c SQL \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0422\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0440\u0435\u0433\u043b\u0430\u043c\u0435\u043d\u0442\u044b \u0443 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u0439 \u0435\u0441\u0442\u044c,&nbsp;\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u043e \u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f, \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u043d\u0438\u0445, \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441 1\u0421-\u043d\u0438\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c, \u0442\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438. \u041d\u0443 \u0438 \u043a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u043e\u043d\u0438 \u043d\u0435 \u0441\u043c\u043e\u0433\u0443\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u0431\u0430\u0437\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u043c. \u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437 \u0438 \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u0434\u0438\u043b\u0435\u043c\u043c\u0443 \u043c\u044b \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c SQL \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u043b\u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u044b 1\u0421 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430\u043c\u0438, \u0430 \u0431\u043e\u043d\u0443\u0441\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u044b \u043a \u043e\u0442\u043a\u0430\u0437\u0430\u043c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0437\u0432\u0451\u0440\u043d\u0443\u0442\u044b \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b Microsoft SQL Server.  <\/p>\n<p>\u041e\u0442\u043a\u0430\u0437\u043e\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u043e\u0441\u0442\u044c \u0433\u0440\u0443\u043f\u043f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 Always On Microsoft SQL Server \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0432\u044f\u0437\u043a\u0438 Pacemaker \u0438 Corosync.<\/p>\n<p>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0435\u0441\u0442\u044c Pacemaker \u0438 Corosync &#8212; \u0432\u0437\u044f\u0442\u043e <a href=\"https:\/\/xakep.ru\/2019\/01\/24\/corosync-pacemaker\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>. \u0412\u0441\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u043d\u0435 \u043d\u0435\u0447\u0435\u0433\u043e.<\/p>\n<p>Corosync \u2014 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0445 \u0438\u043b\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. Corosync \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 (\u043d\u043e\u0434) \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439;<\/p>\n<\/li>\n<li>\n<p> \u043e\u043f\u043e\u0432\u0435\u0449\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e \u0441\u043c\u0435\u043d\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043d\u043e\u0434\u044b \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435;<\/p>\n<\/li>\n<li>\n<p> \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c \u043d\u0430 \u0432\u0441\u0435\u0445 \u043d\u043e\u0434\u0430\u0445;<\/p>\n<\/li>\n<li>\n<p>\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0431\u0449\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445, \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0432 \u0431\u0430\u0437\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>Pacemaker \u2014 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u044b \u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043d\u043e\u0434. \u0412\u043e\u0442 \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430:\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u044c \u0441\u0431\u043e\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043d\u043e\u0434 \u0438 \u0441\u043b\u0443\u0436\u0431;<\/p>\n<ul>\n<li>\n<p>\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f: \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0431\u044b\u0442\u044c \u043e\u0431\u0449\u0438\u0439 \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u044c, \u043a\u0430\u043a \u0441\u0442\u0440\u0430\u0448\u043d\u044b\u0439 \u0441\u043e\u043d;<\/p>\n<\/li>\n<li>\n<p>\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u0438\u043f\u043e\u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432: \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u044b, \u043c\u043e\u0436\u043d\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 STONITH (Shoot-The-Other-Node-In-The-Head), \u0442\u043e \u0435\u0441\u0442\u044c \u0443\u043c\u0435\u0440\u0448\u0430\u044f \u043d\u043e\u0434\u0430 \u0438\u0437\u043e\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a \u043d\u0435\u0439 \u043d\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442, \u043f\u043e\u043a\u0430 \u043d\u043e\u0434\u0430 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u0441\u043d\u043e\u0432\u0430 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u0432\u043e\u0440\u0443\u043c\u043d\u044b\u0435 \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b \u043b\u044e\u0431\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430;<br \/> \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u0443\u044e \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e;<\/p>\n<\/li>\n<li>\n<p>\u043c\u043e\u0436\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433 \u043d\u0430 \u0432\u0441\u0435 \u0443\u0437\u043b\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u2014 \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e;<\/p>\n<\/li>\n<li>\n<p>\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0445 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0443\u0437\u043b\u0435;<\/p>\n<\/li>\n<li>\n<p>\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432: \u043a\u043b\u043e\u043d\u044b (\u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0441\u0443\u0440\u0441 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u043d\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435 \u0443\u0437\u043b\u043e\u0432) \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f (master\/slave \u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435) \u2014 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0421\u0423\u0411\u0414 (MySQL, MariaDB, PostgreSQL, Oracle, MSSQL);<\/p>\n<\/li>\n<li>\n<p>\u0438\u043c\u0435\u0435\u0442 \u0435\u0434\u0438\u043d\u0443\u044e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u0443\u044e \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 CRM \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u043c\u0435\u0435\u043c, \u0442\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u041e\u0421 Debian 11 \u0438\u0437 netinstall \u043e\u0431\u0440\u0430\u0437\u0430 (\u0432\u044b\u0431\u0438\u0440\u0430\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0435\u0440 ssh \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b).<\/p>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435:<\/p>\n<ul>\n<li>\n<p>10.10.2.228\u043f\u0435\u0440\u0432\u044b\u0439 \u0443\u0437\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>mssql-test-1<\/strong>;<\/p>\n<\/li>\n<li>\n<p>10.10.2.229\u0432\u0442\u043e\u0440\u043e\u0439 \u0443\u0437\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>mssql-test-2<\/strong>;<\/p>\n<\/li>\n<li>\n<p>10.10.2.240\u0442\u0440\u0435\u0442\u0438\u0439 \u0443\u0437\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>mssql-test-3<\/strong>;<\/p>\n<\/li>\n<li>\n<p>10.10.2.18\u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 <strong>ag1<\/strong> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>list-ag1<\/strong>;<\/p>\n<\/li>\n<li>\n<p>10.10.2.19\u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 <strong>ag2<\/strong> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>list-ag2<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0418\u0434\u0435\u044e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0438\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043d\u0438\u0436\u0435:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u044f\u0441\u043d\u0438\u043c \u0441\u0445\u0435\u043c\u0443. \u0420\u0435\u0441\u0443\u0440\u0441 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044f <strong>list-ag1<\/strong> \u0436\u0451\u0441\u0442\u043a\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 <strong>ag1<\/strong>, \u0434\u0432\u0430 \u044d\u0442\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0437\u043b\u0430\u0445. \u0415\u0441\u043b\u0438 \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <strong>ag1<\/strong> \u0443\u0437\u0435\u043b MASTER &#8212; \u044d\u0442\u043e <strong>mssql-test-1<\/strong>, \u0442\u043e \u0438 \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <strong>list-ag1<\/strong> \u0432 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 MASTER \u0443\u0437\u043b\u043e\u043c \u0431\u0443\u0434\u0435\u0442 <strong>mssql-test-1<\/strong>. \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <strong>ag1<\/strong> \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 MASTER \u0443\u0437\u0435\u043b, <strong>list-ag1<\/strong> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u043e\u043c. \u0420\u0435\u0441\u0443\u0440\u0441 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0442\u0435\u043b\u044f <strong>list-ag2<\/strong> \u0442\u0430\u043a\u0436\u0435 \u0436\u0451\u0441\u0442\u043a\u043e \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 <strong>ag2<\/strong>. \u0422\u0440\u0435\u0442\u0438\u0439 \u0443\u0437\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 <strong>mssql-test-3<\/strong> \u0441\u043e \u0441\u043b\u043e\u0432 Microsoft \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 Microsoft SQL, \u043d\u0430 \u043d\u0451\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0432\u044b\u043f\u0443\u0441\u043a Express, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0435\u043c\u0443 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0433\u0440\u0443\u043f\u043f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 <strong>ag1<\/strong> \u0438 <strong>ag2<\/strong>. \u0422\u0430\u043a \u044d\u0442\u043e \u0438\u043b\u0438 \u043d\u0435\u0442, \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0430\u043c\u0438, \u0443 \u043c\u0435\u043d\u044f \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 \u043f\u043e\u0434\u043d\u044f\u0442\u044b \u0442\u0440\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0441 \u0432\u044b\u043f\u0443\u0441\u043a\u043e\u043c Microsoft SQL Server Evaluation Edition. \u0411\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0433\u0440\u0443\u043f\u043f\u0430\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u044d\u0442\u043e\u0442 \u0443\u0437\u0435\u043b (\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 \u0441\u0435\u0440\u044b\u043c \u0446\u0432\u0435\u0442\u043e\u043c). \u0423\u0437\u0435\u043b \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 <strong>mssql-test-3<\/strong> \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c MASTER \u0434\u043b\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432: <strong>list-ag1, list-ag2, ag1, ag2<\/strong>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0430\u043c\u044b\u0439 \u043d\u0438\u0437\u043a\u0438\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043d\u0430 <strong>mssql-test-3<\/strong>.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <strong>mssql-test-1.stonish<\/strong> \u0438 <strong>mssql-test-2.stonish<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0438\u043c\u0451\u043d\u043d\u043e\u0433\u043e \u0438\u043c \u0443\u0437\u043b\u0430. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u043d\u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c MASTER \u043d\u0430 \u0442\u043e\u043c \u0443\u0437\u043b\u0435, \u0434\u043b\u044f \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d\u0438 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 STONISH \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u0433\u0430\u0439\u0434\u0430. \u0420\u0435\u0441\u0443\u0440\u0441\u044b stonish \u043c\u044b \u0442\u043e\u0436\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043c \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u043e\u0434\u043d\u043e\u0438\u043c\u0451\u043d\u043d\u044b\u0445 \u0438\u043c \u0443\u0437\u043b\u0430\u0445.<\/p>\n<p>\u0412\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0436\u0443 \u043f\u043e\u0434 root. \u041d\u0435 \u0432\u0438\u0436\u0443 \u0432 \u044d\u0442\u043e\u043c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u043b\u043e\u0445\u043e\u0433\u043e \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u0441\u0442\u0435\u043d\u0434\u0435. \u0424\u0430\u0435\u0440\u0432\u043e\u043b \u0442\u043e\u0436\u0435 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e, \u043d\u0435 \u0432\u0438\u0436\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u044d\u0442\u043e\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0410\u0434\u0435\u043f\u0442\u044b &#171;\u0441\u0443\u043f\u0435\u0440-\u0441\u0435\u043a\u0443\u0440\u043d\u043e\u0441\u0442\u0438&#187; \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438\u0437\u0432\u0438\u043d\u044f\u0439\u0442\u0435. \u0412\u0441\u0451 \u0443\u043c\u0435\u044e, \u043d\u043e \u043b\u0438\u0448\u043d\u0438\u0439 \u0440\u0430\u0437 \u043d\u0435 \u0445\u043e\u0447\u0443 \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c.<\/p>\n<hr>\n<h3>1. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Microsoft SQL Server 2022<\/h3>\n<p>\u0412\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0443\u0437\u043b\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b:<\/p>\n<pre><code class=\"bash\"># apt update # apt -y install gnupg2 curl wget<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447 GPG Microsoft:<\/p>\n<pre><code class=\"bash\"># wget -O- https:\/\/packages.microsoft.com\/keys\/microsoft.asc | tee \/etc\/apt\/trusted.gpg.d\/microsoft-archive-keyring.asc<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 Microsoft SQL Server 2022, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f Ubuntu 20.04:<\/p>\n<pre><code class=\"bash\"># curl https:\/\/packages.microsoft.com\/config\/ubuntu\/20.04\/mssql-server-2022.list | tee \/etc\/apt\/sources.list.d\/mssql-server-2022.list<\/code><\/pre>\n<p>\u041e\u043f\u044f\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0430\u043c SQL \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre><code class=\"bash\"># apt update # apt install -y mssql-server<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 Microsoft SQL Server:<\/p>\n<pre><code class=\"bash\"># \/opt\/mssql\/bin\/mssql-conf setup<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0432\u044b\u0439 \u0438 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0442\u043e\u0440\u0430 &#8212; \u0432\u044b\u0431\u043e\u0440 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u0438 SQL Server \u0438\u043b\u0438 &#171;\u0432\u044b\u043f\u0443\u0441\u043a\u0430&#187; &#8212; \u043a\u0430\u043a \u0438\u0445 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0430\u043c Microsoft:<\/p>\n<pre><code class=\"bash\">  1) Evaluation (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439, \u0431\u0435\u0437 \u043f\u0440\u0430\u0432 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438, 180-\u0434\u043d\u0435\u0432\u043d\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435)   2) Developer (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439, \u0431\u0435\u0437 \u043f\u0440\u0430\u0432 \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438)   3) Express (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f)   4) Web (\u043f\u043b\u0430\u0442\u043d\u044b\u0439)   5) Standard (\u043f\u043b\u0430\u0442\u043d\u044b\u0439)   6) Enterprise (\u043f\u043b\u0430\u0442\u043d\u044b\u0439) - CPU core utilization restricted to 20 physical\/40 hyperthreaded   7) Enterprise Core (\u043f\u043b\u0430\u0442\u043d\u044b\u0439) - CPU core utilization up to Operating System Maximum   8) \u0423 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044f, \u043a\u0443\u043f\u043b\u0435\u043d\u043d\u0430\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u043d\u0430\u043b \u0440\u043e\u0437\u043d\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0430\u0436, \u0438 \u043a\u043b\u044e\u0447 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0434\u043b\u044f \u0432\u0432\u043e\u0434\u0430.   9) Standard (Billed through Azure) - Use pay-as-you-go billing through Azure.  10) Enterprise Core (Billed through Azure) - Use pay-as-you-go billing through Azure.<\/code><\/pre>\n<p>\u041d\u0430\u0434\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0447\u0438\u0441\u043b\u043e, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e (\u043a\u0440\u043e\u043c\u0435 8 \u043f\u0443\u043d\u043a\u0442\u0430). \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u0435\u043d\u0434\u0430 \u043d\u0430\u043c \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b 1 \u0438\u043b\u0438 2 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432. \u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0439 6 \u0438 7 \u0432\u044b\u043f\u0443\u0441\u043a\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441 36 \u044f\u0434\u0440\u0430\u043c\u0438 \u0438 72 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u0442\u043e \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0439\u0442\u0435 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044e Enterprise Core.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0432\u044b\u043f\u0443\u0441\u043a\u043e\u0432, \u0442\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0441\u044f, \u0432\u0445\u043e\u0434\u0438\u0442 \u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u043f\u0443\u0441\u043a \u0432 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u043c\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f Microsoft Software Assurance.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u0438 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0438.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u044f\u0437\u044b\u043a \u0434\u043b\u044f SQL Server.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0432\u0430\u0436\u0434\u044b \u0432\u0432\u043e\u0434\u0438\u043c \u043f\u0430\u0440\u043e\u043b\u044c SA.<\/p>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d. \u041c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c:<\/p>\n<pre><code class=\"bash\"># systemctl status mssql-server.service<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c SQL Server Agent, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u043d\u0438\u0439 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0441\u0430\u043c\u043e\u0433\u043e SQL \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a: \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0411\u0414. \u0425\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 crontab, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0435\u0433\u043e SQL \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c sqlcmd \u0438 \u0441\u043d\u044f\u0442\u044c \u044d\u0442\u0443 \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0441 SQl agent. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0447\u0442\u0451\u0442\u0435 2-\u0439 \u043f\u0443\u043d\u043a\u0442 (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044e \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u0442\u0435\u043d\u0434\u0430). \u0410 \u043f\u043e\u043a\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c SQL Server Agent, \u0442.\u043a. \u043e\u043d \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f AlwaysON:<\/p>\n<pre><code class=\"bash\"># \/opt\/mssql\/bin\/mssql-conf set sqlagent.enabled true<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043b\u0443\u0436\u0431\u0443 SQL \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\"># systemctl restart mssql-server.service<\/code><\/pre>\n<p>\u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Full-text Search, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \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:<\/p>\n<pre><code class=\"bash\"># apt -y install mssql-server-fts<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 SQL \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 (\u0442\u043e\u0436\u0435 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e) \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0434\u0440\u0430\u0439\u0432\u0435\u0440 Microsoft ODBC \u0438 mssql-tools. \u041f\u0430\u043a\u0435\u0442 mssql-tools \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 sqlcmd, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c SQL \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043d\u043e \u043e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0435\u0437 ODBC \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code class=\"bash\">#<\/code><\/pre>\n<\/hr>\n<\/ul>\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-348543","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/348543","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=348543"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/348543\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=348543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=348543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=348543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}