{"id":300743,"date":"2020-03-25T21:00:17","date_gmt":"2020-03-25T21:00:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=300743"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=300743","title":{"rendered":"XSL-\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043d\u0430 MS SQL \u0431\u0435\u0437 CLR"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/487490\/\">\u0418\u043d\u043e\u0433\u0434\u0430 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0438\u0441\u044c\u043c\u0430 \u043f\u0440\u044f\u043c\u043e \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u0411\u0414, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u0438\/\u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043b\u043e\u0433\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u0442\u0434. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0434\u0438\u043a\u043e\u0441\u0442\u044c\u044e, \u0447\u0443\u0434\u043e\u0432\u0438\u0449\u043d\u044b\u043c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u043c, \u043a\u0440\u0438\u0432\u044b\u043c-\u043a\u043e\u0441\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c, \u0438\u0442\u0434 \u2014 \u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a.<\/p>\n<p>  \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0438\u0441\u044c\u043c\u0430 \u043f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c plain-\u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0430 \u0440\u0430\u0441\u0441\u044b\u043b\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0443 \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 xp_sendmail, \u043b\u0438\u0431\u043e (\u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u043e) \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 COM-\u043e\u0431\u044a\u0435\u043a\u0442 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, CDO.Message), \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0438\u0440\u0443\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044f \u0438\u043c \u0447\u0435\u0440\u0435\u0437 SQL-\u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 OLE sp_OAxxxx.<\/p>\n<p>  \u0418 \u0442\u043e, \u0438 \u0434\u0440\u0443\u0433\u043e\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u043a\u0430 \u0432\u0430\u043c \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043f\u043b\u0435\u0439\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u0432\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u043e\u043a\u043e\u043b\u043e\u043d\u0443\u043b\u0435\u0432\u0430\u044f, \u0438 \u043e\u0442\u0447\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043b\u0434\u0441\u043a\u0443\u043b\u044c\u043d\u044b\u043c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0438\u043f\u043b\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 <\/p>\n<p>  <code>+-----------+--------------+--------------+<br \/>  | \u0410\u0411\u0421\u041e\u041b\u042e\u0422\u041d\u041e | \u041d\u0415 \u0412\u0418\u0414\u0418\u0422 \u041f\u0420\u041e | \u0411\u041b\u0415\u041c \u0412 \u0422\u0410\u041a\u041e\u041c |<br \/>  | \u041e\u0424\u041e\u0420\u041c\u041b\u0415\u041d\u0418 | \u0418 \u0421\u041b\u0423\u0416\u0415\u0411\u041d\u041e\u0413\u041e | \u0412\u042b\u0412\u041e\u0414\u0410 &lt;EOT&gt; |<br \/>  +-----------+--------------+--------------+<br \/>  <\/code> <br \/>  \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043d\u0430\u043f\u0440\u044f\u0433\u0430\u0442\u044c, \u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u0432\u043e\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0438\u043b\u0438 \u00ab\u0432\u044b\u043d\u044b\u0440\u0438\u0432\u0430\u0442\u044c\u00bb \u0438\u0437 \u0443\u0440\u043e\u0432\u043d\u044f \u0411\u0414 \u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0447\u0435\u0433\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0433\u043e \u043d\u0443 \u043e\u0447\u0435\u043d\u044c \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f: <br \/>  <a name=\"habracut\"><\/a><br \/>  \u0427\u0430\u0441\u0442\u043e \u043f\u0438\u0441\u044c\u043c\u0430 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 (\u0441\u043a\u0430\u0436\u0435\u043c, \u0435\u0441\u043b\u0438 \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043a\u0443\u0441\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0430\u0443\u0434\u0438\u0442\u0430), \u0438 \u043e\u0442\u0441\u044b\u043b\u0430\u0442\u044c \u0432 HTML, \u0445\u043e\u0442\u044f \u0431\u044b \u0432 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c (\u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c) \u0434\u0438\u0437\u0430\u0439\u043d\u0435 \u2014 \u0438 \u0432\u043e\u0442 \u0442\u0443\u0442 \u0443\u0436\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u0430\u044f \u0440\u0443\u0442\u0438\u043d\u0430 \u2014 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e HTML \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 T-SQL \u043e\u0447\u0435\u043d\u044c \u0443\u0442\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0445 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u2014 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0430\u044f, \u0430 \u0434\u0438\u0437\u0430\u0439\u043d \u2014 \u043e\u0431\u0449\u0438\u0439, \u0438 CSS \u0432 \u043d\u0435\u043c \u2014 \u0440\u0430\u0437\u0432\u0435\u0441\u0438\u0441\u0442\u044b\u0439.<\/p>\n<p>  \u0412 \u043c\u0438\u0440\u0435 \u0443\u0440\u043e\u0432\u043d\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0449\u0435 20 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u0438\u043f\u043e\u043b\u044c XML\/XSL, \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u043e\u0439\u043d\u044b\u0439, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0435\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0435\u043b\u0435 \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u043c\u0435\u0436\u0434\u0443 \u0447\u0442\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0437 MSDN \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430.<\/p>\n<p>  \u041d\u0443 \u0434\u0430 \u043b\u0430\u0434\u043d\u043e \u2014 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432, \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0442\u043e\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0432 XML \u0433\u043e\u0440\u0430\u0437\u0434\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435, \u0438 MS SQL \u043d\u0430\u0442\u0438\u0432\u043d\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 15 \u043b\u0435\u0442.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0445 \u043f\u0438\u0441\u0435\u043c \u0440\u0443\u043a\u043e\u0439 \u043f\u043e\u0434\u0430\u0442\u044c \u2014 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043d\u0430\u0439\u0442\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u0438\u0441\u043e\u0431\u0430\u0447\u0438\u0442\u044c XSL-\u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043a \u044d\u0442\u043e\u043c\u0443 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u0443. <\/p>\n<p>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 MS SQL \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0443\u043c\u0435\u0435\u0442, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0448 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e OLE-\u043a\u043e\u043b\u0435\u0441\u043e.<\/p>\n<p>  \u041f\u043e\u043a\u043e\u043f\u0430\u0432\u0448\u0438\u0441\u044c \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c Microsoft.XMLDOM, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043c\u0435\u0435\u0442 \u0441\u043a\u0440\u0435\u0449\u0438\u0432\u0430\u0442\u044c \u0435\u0436\u0430 \u0438 \u0443\u0436\u0430 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 transformNode, \u0438 \u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u0433\u0440\u0430\u043c\u043e\u0442\u043d\u043e \u0432\u0441\u0435 \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u0438 \u0432\u0441\u0435 \u0437\u0430\u0434\u0435\u0441\u0442\u0440\u043e\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u0435\u0447\u044c \u043f\u0430\u043c\u044f\u0442\u044c\u044e. <\/p>\n<p>  \u041c\u044b \u043d\u0430 \u0432\u0435\u0440\u043d\u043e\u043c \u043f\u0443\u0442\u0438, \u0438 sp_OACreate, sp_OAMethod, sp_OAGet\/SetProperty \u0438 sp_OADestroy \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0433\u0443\u0442, \u043d\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u0434\u0435\u0442\u0430\u043b\u044c \u2014 \u0435\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u0442\u043e \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u0430 \u0435\u0441\u043b\u0438 \u0441\u043a\u0430\u043b\u044f\u0440 \u2014 \u0442\u043e \u0432\u0441\u0435 \u043f\u043b\u043e\u0445\u043e, \u0442.\u043a. \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u0441\u043a\u0430\u043b\u044f\u0440 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u043b\u0438\u043d\u043d\u0435\u0435 \u0447\u0435\u043c \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u0432 8\u043a\u0411. \u0421 \u044d\u0442\u0438\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0448 \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043d\u0430\u0432\u0435\u043a \u0443\u0447\u0435\u0431\u043d\u044b\u043c \u2014 \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0432 4(8) \u0442\u044b\u0441\u044f\u0447 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043d\u0430\u0448 \u0432\u0435\u043a \u2014 \u044d\u0442\u043e \u0441\u043c\u0435\u0445, \u0434\u0430 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e.<\/p>\n<p>  \u041c\u044b \u043f\u0440\u043e\u0448\u043b\u0438 \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u043b\u0430\u0431\u0438\u0440\u0438\u043d\u0442, \u0438 \u0432 \u0448\u0430\u0433\u0435 \u043e\u0442 \u0432\u044b\u0445\u043e\u0434\u0430, \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u0442 \u0441\u0432\u0435\u0442, \u043d\u043e \u0431\u0430\u043c\u0441! \u2014 \u0432\u044b\u0445\u043e\u0434 \u0437\u0430\u043a\u0440\u044b\u0442 \u0440\u0435\u0448\u0435\u0442\u043a\u043e\u0439. \u041d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0437 OLE-\u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u0441\u0442\u0440\u043e\u043a\u0443, \u0434\u043b\u0438\u043d\u043d\u0435\u0435 \u0447\u0435\u043c \u0432 8\u041a. \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0442\u0438\u043f (n)varchar(MAX) \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u0435\u0432\u043d\u044f\u0442\u043d\u043e\u0439 OLE-\u043e\u0448\u0438\u0431\u043a\u0435.<\/p>\n<p>  \u041f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e, \u0447\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0435 \u0441\u043a\u0430\u043b\u044f\u0440, \u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0442.\u043a. \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0434\u043b\u044f SQL \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0438\u0441\u043b\u043e). \u041d\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 transformNode \u043e\u0442\u0434\u0430\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u041e\u0442\u0447\u0430\u0438\u0432\u0448\u0438\u0441\u044c, \u043b\u0435\u0437\u0435\u043c \u0432 MSDN (\u0438\u043b\u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u0442\u0430\u043c \u0432 \u043e\u043d\u043b\u0430\u0439\u043d), \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 15 \u043b\u0435\u0442 XMLDOM \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u2014 MS \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 transformNodeToObject \u2014 \u0411\u0418\u041d\u0413\u041e!!! \u041c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043f\u043e\u0442\u043e\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043d \u0432\u044b\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430!<\/p>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u0442\u043e\u043a\u0430, \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0443, \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0435\u043c\u0443 \u0432\u044b\u043b\u0438\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0432 \u043f\u043e\u0442\u043e\u043a. <\/p>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u2014 \u0432 \u043f\u043e\u0442\u043e\u043a\u0435 \u0443 \u043d\u0430\u0441 \u2014 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442. \u041a\u0430\u043a \u0435\u0433\u043e \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u0432 \u0441\u043a\u0430\u043b\u044f\u0440? \u0422\u043e\u0436\u0435 \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u2014 <s>\u0432\u044b\u0447\u0435\u0440\u043f\u0430\u0442\u044c \u043c\u043e\u0440\u0435 \u043a\u0440\u0443\u0436\u043a\u0430\u043c\u0438<\/s> \u0432\u044b\u0447\u0438\u0442\u0430\u0442\u044c \u0447\u0430\u043d\u043a\u0430\u043c\u0438, \u043d\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u043c\u0438 8\u041a\u0431\u0430\u0439\u0442, \u0438 \u0441\u043a\u043b\u0435\u0438\u0442\u044c \u0438\u0437 \u0447\u0430\u043d\u043a\u043e\u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 varchar(MAX).<\/p>\n<p>  \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0432\u0441\u0435 \u0432\u044b\u0447\u0438\u0442\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u0430) \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u0430 \u0435\u0433\u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u2014 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0437 \u043d\u0435\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u0438 \u0431) \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0447\u0442\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u0430 \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u043e. \u0418\u043d\u0430\u0447\u0435 \u0447\u0438\u0442\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0447\u0435\u0433\u043e.<\/p>\n<p>  \u041d\u0443 \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0443\u0436\u043d\u043e \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u043f\u0440\u0438\u0431\u0440\u0430\u0442\u044c \u0437\u0430 \u0441\u043e\u0431\u043e\u0439. \u0416\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e, \u0431\u044b\u043b\u043e \u0438 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u043e \u2014 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0442\u043e\u0433\u043e, \u0431\u044b\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442, \u0438 \u0435\u0441\u043b\u0438 \u0431\u044b\u043b\u0430, \u0442\u043e \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 \u0444\u0430\u0437\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430.<\/p>\n<p>  \u0412\u043e\u0442 \u0447\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<\/p>\n<pre><code class=\"sql\">CREATE FUNCTION [dbo].[f_Helper_XSLTransform] ( \t@XMLData\tXML, \t@XSLTemplate\tXML ) RETURNS NVARCHAR(MAX) AS BEGIN  \tIF @XMLData IS NULL OR @XSLTemplate IS NULL \t\tRETURN 'XML or XSL data is NULL' \t\t  \tDECLARE\t@OLEActionName\tVARCHAR(128), \t\t@PropOrMethodName\tVARCHAR(128)  \tDECLARE @hr\t\t\t\tINT,  \t\t@dummy\t\t\tINT, \t\t@ObjXML\t\t\tINT,  \t\t@ObjXSL\t\t\tINT, \t\t@ObjStream\t\tINT, \t\t@BuffSize\t\t\tINT  \tDECLARE @Result\t\t\tNVARCHAR(MAX) = N'', \t\t@Chunk\t\t\tNVARCHAR(4000),\t\t-- VVVV should match VVVV \t\t@ChunkCharSize\tINT = 4000,\t\t\t-- ^^^^^^^^^^^^^^^^^^^^^^ \t\t@ResultBuff\t\tNVARCHAR(MAX) = N''\t-- chunk concat buffer  \t-- create XMLDOM object for @XMLData \tSET @OLEActionName \t= 'sp_OACreate' \tSET @PropOrMethodName \t= 'Microsoft.XMLDOM' \t \tEXEC @hr = sp_OACreate @PropOrMethodName, @ObjXML OUT \tIF @hr &lt;&gt; 0  \tGOTO FUN_ERROR  \t-- create XMLDOM object for @XSLData \tEXEC @hr = sp_OACreate @PropOrMethodName, @ObjXSL OUT \tIF @hr &lt;&gt; 0  \t\tGOTO FUN_ERROR  \t-- create ADODB.Stream object as transformation buffer \tSET @PropOrMethodName \t= 'ADODB.Stream'  \tEXEC @hr = sp_OACreate @PropOrMethodName, @ObjStream OUT \tIF @hr &lt;&gt; 0  \t\tGOTO FUN_ERROR  \t-- load XML data \tSET @OLEActionName \t= 'sp_OAMethod' \tSET @PropOrMethodName \t= 'LoadXML'  \tEXEC @hr = sp_OAMethod @ObjXML, @PropOrMethodName, @dummy OUT, @XMLData \tIF @hr &lt;&gt; 0  \t\tGOTO FUN_ERROR  \t-- load XSL data \tEXEC @hr = sp_OAMethod @ObjXSL, @PropOrMethodName, @dummy OUT, @XSLTemplate \tIF @hr &lt;&gt; 0  \t\tGOTO FUN_ERROR  \t-- open the stream \tSET @PropOrMethodName \t= 'Open' \t \tEXEC @hr = sp_OAMethod @ObjStream, @PropOrMethodName, NULL \tIF @hr &lt;&gt; 0  \t\tGOTO FUN_ERROR  \t-- trying to do XSL transformation, using the stream as the receiver to work around 4\/8K limitation \tSET @PropOrMethodName \t= 'TransformNodeToObject'  \tEXEC @hr = sp_OAMethod @ObjXML, @PropOrMethodName, NULL, @ObjXSL, @ObjStream \tIF @hr &lt;&gt; 0  \t\tGOTO FUN_ERROR  \t-- get the size of the stream to read back \tSET @OLEActionName \t= 'sp_OAGetProperty' \tSET @PropOrMethodName \t= 'Size' \t \tEXEC @hr = sp_OAGetProperty @ObjStream, @PropOrMethodName, @BuffSize OUT \tIF @hr &lt;&gt; 0  \t\tGOTO FUN_ERROR  \t-- re-position the stream to the head.. \tSET @OLEActionName \t= 'sp_OASetProperty' \tSET @PropOrMethodName \t= 'Position'  \tEXEC @hr = sp_OASetProperty @ObjStream, 'Position', 0\t-- offset = 0 \tIF @hr &lt;&gt; 0  \t\tGOTO FUN_ERROR  \t-- ..and then read chunk by chunk \tSET @OLEActionName \t= 'sp_OAMethod' \tSET @PropOrMethodName \t= 'ReadText'  \tWHILE @BuffSize &gt; @ChunkCharSize \tBEGIN \t\t-- read chunk \t\tEXEC @hr = sp_OAMethod @ObjStream, @PropOrMethodName, @Chunk OUT, @ChunkCharSize \t\tIF @hr &lt;&gt; 0  \t\t\tGOTO FUN_ERROR \t \t\t-- append it to the accumulated buffer contents.. \t\tSET @ResultBuff += @Chunk \t\t-- ..and correct the char counter by the # of chars retrieved \t\tSET @BuffSize -= @ChunkCharSize \tEND  \t-- read the last chunk \tEXEC @hr = sp_OAMethod @ObjStream, @PropOrMethodName, @Chunk OUT \tIF @hr &lt;&gt; 0  \t\tGOTO FUN_ERROR  \t-- append the last chunk to the buffer \tSET @ResultBuff += @Chunk  \t-- close the stream \tSET @PropOrMethodName = 'Close' \tEXEC @hr = sp_OAMethod @ObjStream, @PropOrMethodName, NULL \tIF @hr &lt;&gt; 0  \t\tGOTO FUN_ERROR  \t-- everything is ok, copying buffer to result \tSET @Result = @ResultBuff \t \t-- resulting doc is in @Result, cleaning up and exiting.. \tGOTO OLE_RELEASE  FUN_ERROR:  \tSET @Result = '#### Error ' + CONVERT(VARCHAR, CONVERT(VARBINARY(4), @hr)) + ', Action ' + @OLEActionName + ', Method\/Property ' + @PropOrMethodName + ' ####' \t-- fall through OLE release  OLE_RELEASE:  \t-- destroying XML.. \tSET @OLEActionName \t= 'sp_OADestroy' \tSET @PropOrMethodName \t= 'Microsoft.XMLDOM' \tIF ISNULL(@ObjXML, 0) &lt;&gt; 0 \tBEGIN \t\tEXEC @hr = sp_OADestroy @ObjXML \t\tIF @hr &lt;&gt; 0  \t\t\tGOTO OLE_RELEASE_ERROR \tEND  \t-- ..and XSL objects \tIF ISNULL(@ObjXSL, 0) &lt;&gt; 0 \tBEGIN\t \t\tEXEC @hr = sp_OADestroy @ObjXSL \t\tIF @hr &lt;&gt; 0  \t\t\tGOTO OLE_RELEASE_ERROR \tEND\t   \t-- and the stream obj \tSET @PropOrMethodName \t= 'ADODB.Stream' \tIF ISNULL(@ObjStream, 0) &lt;&gt; 0 \tBEGIN\t \t\tEXEC @hr = sp_OADestroy @ObjStream \t\tIF @hr &lt;&gt; 0  \t\t\tGOTO OLE_RELEASE_ERROR \tEND\t   \t-- exiting with returning the resulting document \tRETURN @Result  OLE_RELEASE_ERROR:  \t-- OLE release error, exiting with error info \tRETURN '#### Error ' + CONVERT(VARCHAR, CONVERT(VARBINARY(4), @hr)) + ', Action ' + @OLEActionName + ', Method\/Property ' + @PropOrMethodName + ' ####'  END <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u0441\u044e \u043a\u043e\u043b\u0431\u0430\u0441\u0443:<\/p>\n<p>  \u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<pre><code class=\"sql\">declare @xml xml = convert(xml, '&lt;root&gt;&lt;item id=&quot;1&quot; name=&quot;john&quot;\/&gt;&lt;item id=&quot;2&quot; name=&quot;bob&quot;\/&gt;&lt;\/root&gt;') <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d:<\/p>\n<pre><code class=\"sql\">declare @templatetext varchar(max) = '&lt;?xml version=''1.0'' encoding=''UTF-8''?&gt; \t\t\t\t\t\t&lt;xsl:stylesheet xmlns:xsl=&quot;http:\/\/www.w3.org\/1999\/XSL\/Transform&quot; version=&quot;1.0&quot;&gt; \t\t\t\t\t\t&lt;xsl:template match = ''item''&gt; \t\t\t\t\t\t&lt;tr&gt;&lt;td&gt;&lt;xsl:value-of select = ''@id'' \/&gt;&lt;\/td&gt;&lt;td&gt;&lt;xsl:value-of select = ''@name'' \/&gt;&lt;\/td&gt;&lt;\/tr&gt; \t\t\t\t\t\t&lt;\/xsl:template&gt; \t\t\t\t\t\t&lt;xsl:template match = ''\/''&gt; \t\t\t\t\t\t\t&lt;HTML&gt; \t\t\t\t\t\t\t  &lt;BODY&gt; \t\t\t\t\t\t\t\t&lt;TABLE&gt; \t\t\t\t\t\t\t\t  &lt;TR&gt;&lt;TD colspan=''2''&gt;Item List&lt;\/TD&gt;&lt;\/TR&gt; \t\t\t\t\t\t\t\t  &lt;xsl:apply-templates select = ''root'' \/&gt; \t\t\t\t\t\t\t\t&lt;\/TABLE&gt; \t\t\t\t\t\t\t  &lt;\/BODY&gt; \t\t\t\t\t\t\t&lt;\/HTML&gt; \t\t\t\t\t\t  &lt;\/xsl:template&gt; \t\t\t\t\t\t&lt;\/xsl:stylesheet&gt;' <\/code><\/pre>\n<p>  \u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d \u0438\u0437 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 XML, \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"sql\">declare @xsl xml = convert(xml, @templatetext)  select dbo.f_Helper_XSLTransform(@xml, @xsl) <\/code><\/pre>\n<p>  \u0418 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435:<\/p>\n<pre><code class=\"xml\">&lt;HTML&gt;&lt;BODY&gt;&lt;TABLE&gt;&lt;TR&gt;&lt;TD colspan=&quot;2&quot;&gt;Item List&lt;\/TD&gt;&lt;\/TR&gt;&lt;tr&gt;&lt;td&gt;1&lt;\/td&gt;&lt;td&gt;john&lt;\/td&gt;&lt;\/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;\/td&gt;&lt;td&gt;bob&lt;\/td&gt;&lt;\/tr&gt;&lt;\/TABLE&gt;&lt;\/BODY&gt;&lt;\/HTML&gt;<\/code><\/pre>\n<p>  \u041f\u0440\u043e \u0442\u043e, \u043a\u0430\u043a \u0432\u0441\u0435 \u044d\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0447\u0442\u043e\u0439 (\u0438 \u0434\u0430\u0436\u0435 \u0441 \u0430\u0442\u0442\u0430\u0447\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u2014 \u043f\u0440\u0438\u0447\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u2014 \u0433\u0440\u044f\u0437\u043d\u044b\u043c \u0445\u0430\u043a\u043e\u043c), \u043c\u043e\u0433\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u043e\u0441\u0442, \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e<\/div>\n<p> \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\/post\/487490\/\"> https:\/\/habr.com\/ru\/post\/487490\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/487490\/\">\u0418\u043d\u043e\u0433\u0434\u0430 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0438\u0441\u044c\u043c\u0430 \u043f\u0440\u044f\u043c\u043e \u0438\u0437\u043d\u0443\u0442\u0440\u0438 \u0411\u0414, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u0438\/\u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u043b\u043e\u0433\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u0442\u0434. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0434\u0438\u043a\u043e\u0441\u0442\u044c\u044e, \u0447\u0443\u0434\u043e\u0432\u0438\u0449\u043d\u044b\u043c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u043c, \u043a\u0440\u0438\u0432\u044b\u043c-\u043a\u043e\u0441\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c, \u0438\u0442\u0434 \u2014 \u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a.<\/p>\n<p>  \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0438\u0441\u044c\u043c\u0430 \u043f\u0440\u0438 \u0442\u0430\u043a\u043e\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c plain-\u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0430 \u0440\u0430\u0441\u0441\u044b\u043b\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0443 \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 xp_sendmail, \u043b\u0438\u0431\u043e (\u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u043e) \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 COM-\u043e\u0431\u044a\u0435\u043a\u0442 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, CDO.Message), \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0438\u0440\u0443\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044f \u0438\u043c \u0447\u0435\u0440\u0435\u0437 SQL-\u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 OLE sp_OAxxxx.<\/p>\n<p>  \u0418 \u0442\u043e, \u0438 \u0434\u0440\u0443\u0433\u043e\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u043a\u0430 \u0432\u0430\u043c \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043f\u043b\u0435\u0439\u043d\u0442\u0435\u043a\u0441\u0442\u0430, \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u043d\u043e\u0441\u0442\u044c \u0432\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u043e\u043a\u043e\u043b\u043e\u043d\u0443\u043b\u0435\u0432\u0430\u044f, \u0438 \u043e\u0442\u0447\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043b\u0434\u0441\u043a\u0443\u043b\u044c\u043d\u044b\u043c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u0438\u043f\u043b\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 <\/p>\n<p>  <code>+-----------+--------------+--------------+<br \/>  | \u0410\u0411\u0421\u041e\u041b\u042e\u0422\u041d\u041e | \u041d\u0415 \u0412\u0418\u0414\u0418\u0422 \u041f\u0420\u041e | \u0411\u041b\u0415\u041c \u0412 \u0422\u0410\u041a\u041e\u041c |<br \/>  | \u041e\u0424\u041e\u0420\u041c\u041b\u0415\u041d\u0418 | \u0418 \u0421\u041b\u0423\u0416\u0415\u0411\u041d\u041e\u0413\u041e | \u0412\u042b\u0412\u041e\u0414\u0410 &lt;EOT&gt; |<br \/>  +-----------+--------------+--------------+<br \/>  <\/code> <br \/>  \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043d\u0430\u043f\u0440\u044f\u0433\u0430\u0442\u044c, \u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u0432\u043e\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0438\u043b\u0438 \u00ab\u0432\u044b\u043d\u044b\u0440\u0438\u0432\u0430\u0442\u044c\u00bb \u0438\u0437 \u0443\u0440\u043e\u0432\u043d\u044f \u0411\u0414 \u043d\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0447\u0435\u0433\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0433\u043e \u043d\u0443 \u043e\u0447\u0435\u043d\u044c \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f:   <\/p>\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-300743","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300743","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=300743"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300743\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}