{"id":203076,"date":"2013-11-21T14:18:02","date_gmt":"2013-11-21T10:18:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=203076"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=203076","title":{"rendered":"<span class=\"post_title\">Generating HTML reports from SQL Server<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0412 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u043c \u043f\u0440\u043e\u0448\u043b\u043e\u043c, \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 HTML \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u043f\u043e \u043f\u0440\u043e\u0434\u0430\u0436\u0430\u043c \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0435\u0441\u044f\u0446. \u0422\u0430\u043a \u0443\u0436 \u0432\u044b\u0448\u043b\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043b\u0438\u0446\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439. <\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0447\u0435\u0442\u0430, \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 <a href=\"http:\/\/www.devart.com\/ru\/dbforge\/sql\/studio\/\">dbForge<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0433\u0440\u0443\u043f\u043f\u044b \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 HTML \u0444\u043e\u0440\u043c\u0430\u0442.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0443 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0447\u0442\u043e, \u043c\u044f\u0433\u043a\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0431\u044b\u043b\u043e \u043d\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c. <\/p>\n<p>  \u0411\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c HTML \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0447\u0435\u0440\u0435\u0437 Database Mail \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0443 \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b <i>sp_send_dbmail<\/i>.<\/p>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u2014 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u043e\u0439 \u0438\u043c\u0435\u044e\u0449\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043d\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435 \u043c\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0418\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0434\u043b\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<pre><code class=\"sql\">DECLARE @object_name SYSNAME       , @object_id INT \t  , @SQL NVARCHAR(MAX)  SELECT @object_name = '[dbo].[Products]'      , @object_id = OBJECT_ID(@object_name)  SELECT @SQL = 'SELECT  \t  [header\/style\/@type] = ''text\/css'' \t, [header\/style] = '' \t\ttable {border-collapse:collapse;}  \t\ttd, table { \t\t\tborder:1px solid silver;  \t\t\tpadding:3px; \t\t} \t\tth, td { \t\t\tvertical-align: top;  \t\t\tfont-family: Tahoma;  \t\t\tfont-size: 8pt;  \t\t\ttext-align: left; \t\t}'' \t, body = ( SELECT * FROM ( \tSELECT tr = ( \t\tSELECT * FROM ( \t\t\tVALUES ' + \t\t\tSTUFF(CAST(( \t\t\t\tSELECT ', (''' + c.name + ''')' \t\t\t\tFROM sys.columns c WITH(NOLOCK) \t\t\t\tWHERE c.[object_id] = @object_id \t\t\t\t\tAND c.system_type_id NOT IN (34, 36, 98, 128, 129, 130, 165, 173, 189, 241) \t\t\t\tORDER BY c.column_id \t\t\t\tFOR XML PATH(''), TYPE) AS NVARCHAR(MAX)), 1, 2, '') + ' \t\t) t (th) \t\tFOR XML PATH('''') \t) \tUNION ALL   \tSELECT ( \t\tSELECT * FROM ( \t\t\tVALUES' + STUFF(CAST(( \t\t\tSELECT ', ' +  \t\t\t\tCASE WHEN c.is_nullable = 1 \t\t\t\t\tTHEN '(ISNULL(' ELSE '(' END + \t\t\t\tCASE WHEN TYPE_NAME(c.system_type_id) NOT IN ('nvarchar', 'nchar', 'varchar', 'char')  \t\t\t\t\tTHEN 'CAST(' + '[' + c.name + '] AS NVARCHAR(MAX))' ELSE '[' + c.name + ']' END + \t\t\t\tCASE WHEN c.is_nullable = 1  \t\t\t\t\tTHEN ',''''))' ELSE ')' END \t\t\tFROM sys.columns c WITH(NOLOCK) \t\t\tWHERE c.[object_id] = @object_id \t\t\t\tAND c.system_type_id NOT IN (34, 36, 98, 128, 129, 130, 165, 173, 189, 241) \t\t\tORDER BY c.column_id \t\t\tFOR XML PATH(''), TYPE) AS NVARCHAR(MAX)), 1, 2, ' ') + ' \t) t (td)  \tFOR XML PATH(''''), TYPE)  \tFROM ' + @object_name + ' ) t FOR XML PATH(''''), ROOT(''table''), TYPE ) FOR XML PATH(''''), ROOT(''html''), TYPE'  PRINT @SQL EXEC sys.sp_executesql @SQL <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c SQL \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 XML:<\/p>\n<pre><code class=\"sql\">SELECT  \t  [header\/style\/@type] = 'text\/css' \t, [header\/style] = 'css style ...' \t, body = ( \t\tSELECT *  \t\tFROM ( \t\t\tSELECT tr = ( \t\t\t\tSELECT *  \t\t\t\tFROM ( \t\t\t\t\tVALUES ('column_name1', 'column_name2', ...) \t\t\t\t) t (th) \t\t\t\tFOR XML PATH('') \t\t\t) \t\t\tUNION ALL  \t\t\tSELECT ( \t\t\t\tSELECT *  \t\t\t\tFROM ( \t\t\t\t\tVALUES ([column_value1], [column_value2], ...)  \t\t\t\t)t (td)  \t\t\t\tFOR XML PATH(''), TYPE \t\t\t)  \t\t\tFROM [table] \t\t) t \t\tFOR XML PATH(''), ROOT('table'), TYPE \t) FOR XML PATH(''), ROOT('html'), TYPE <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u044b, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <i>UNIQUEIDENTIFIER<\/i>) \u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043e\u0442\u0447\u0435\u0442 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f:<\/p>\n<pre><code class=\"sql\">SELECT name  FROM sys.types WHERE user_type_id IN ( \t34, 36, 98,  \t128, 129, 130,  \t165, 173, 189, 241 ) <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e HTML \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u044f\u043b\u0430\u0441\u044c \u043a \u043f\u0438\u0441\u044c\u043c\u0443:<\/p>\n<pre><code class=\"html\">&lt;html&gt;   &lt;header&gt;     &lt;style type=&quot;text\/css&quot;&gt;         ...     &lt;\/style&gt;   &lt;\/header&gt;   &lt;body&gt;     &lt;table&gt;       &lt;tr&gt;         &lt;th&gt;column_name1&lt;\/th&gt;         &lt;th&gt;column_name2&lt;\/th&gt;         ...       &lt;\/tr&gt;       &lt;tr&gt;         &lt;td&gt;column_value1&lt;\/td&gt;         &lt;td&gt;column_value2&lt;\/td&gt;         ...       &lt;\/tr&gt;     &lt;\/table&gt;   &lt;\/body&gt; &lt;\/html&gt; <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u043a\u0430\u0436\u0434\u0443\u044e \u043d\u0435\u0434\u0435\u043b\u044e, \u0432 SQL Agent \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d Job, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b \u043e\u0442\u0447\u0435\u0442\u044b.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0435 \u0437\u0434\u0435\u0441\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447.<\/p>\n<p>  <b>PS:<\/b> \u041c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f VALUES \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 SQL Server 2008, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0434\u043b\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043d\u043e \u0434\u043b\u044f 2005 \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<pre><code class=\"sql\">DECLARE @object_name SYSNAME       , @object_id INT \t  , @SQL NVARCHAR(MAX)  SELECT @object_name = '[dbo].[Products]'      , @object_id = OBJECT_ID(@object_name)  SELECT @SQL = 'SELECT  \t  [header\/style\/@type] = ''text\/css'' \t, [header\/style] = '' \t\ttable {border-collapse:collapse;}  \t\ttd, table { \t\t\tborder:1px solid silver;  \t\t\tpadding:3px; \t\t} \t\tth, td { \t\t\tvertical-align: top;  \t\t\tfont-family: Tahoma;  \t\t\tfont-size: 8pt;  \t\t\ttext-align: left; \t\t}'' \t, body = ( SELECT * FROM ( \tSELECT tr = ( \t\tSELECT * FROM ( \t\t\t' + \t\t\tSTUFF(CAST(( \t\t\t\tSELECT ' UNION ALL SELECT ''' + c.name + '''' \t\t\t\tFROM sys.columns c WITH(NOLOCK) \t\t\t\tWHERE c.[object_id] = @object_id \t\t\t\t\tAND c.system_type_id NOT IN (34, 36, 98, 128, 129, 130, 165, 173, 189, 241) \t\t\t\tORDER BY c.column_id \t\t\t\tFOR XML PATH(''), TYPE) AS NVARCHAR(MAX)), 1, 17, 'SELECT th =') + ' \t\t) t \t\tFOR XML PATH('''') \t) \tUNION ALL   \tSELECT  ( \t\tSELECT * FROM ( \t\t\t' + STUFF(CAST(( \t\t\tSELECT ' UNION ALL SELECT ' +  \t\t\t\tCASE WHEN c.is_nullable = 1 \t\t\t\t\tTHEN 'ISNULL(' ELSE '' END + \t\t\t\tCASE WHEN TYPE_NAME(c.system_type_id) NOT IN ('nvarchar', 'nchar', 'varchar', 'char')  \t\t\t\t\tTHEN 'CAST(' + '[' + c.name + '] AS NVARCHAR(MAX))' ELSE '[' + c.name + ']' END + \t\t\t\tCASE WHEN c.is_nullable = 1  \t\t\t\t\tTHEN ','''')' ELSE '' END \t\t\tFROM sys.columns c WITH(NOLOCK) \t\t\tWHERE c.[object_id] = @object_id \t\t\t\tAND c.system_type_id NOT IN (34, 36, 98, 128, 129, 130, 165, 173, 189, 241) \t\t\tORDER BY c.column_id \t\t\tFOR XML PATH(''), TYPE) AS NVARCHAR(MAX)), 1, 17, 'SELECT td =') + ' \t) t \tFOR XML PATH(''''), TYPE)  \tFROM ' + @object_name + ' ) t FOR XML PATH(''''), ROOT(''table''), TYPE ) FOR XML PATH(''''), ROOT(''html''), TYPE'  PRINT @SQL EXEC sys.sp_executesql @SQL <\/code><\/pre>\n<div class=\"clear\"><\/div>\n<\/p><\/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=\"http:\/\/habrahabr.ru\/post\/203076\/\"> http:\/\/habrahabr.ru\/post\/203076\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0412 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u043c \u043f\u0440\u043e\u0448\u043b\u043e\u043c, \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 HTML \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u043f\u043e \u043f\u0440\u043e\u0434\u0430\u0436\u0430\u043c \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0435\u0441\u044f\u0446. \u0422\u0430\u043a \u0443\u0436 \u0432\u044b\u0448\u043b\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043b\u0438\u0446\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439. <\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0447\u0435\u0442\u0430, \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 <a href=\"http:\/\/www.devart.com\/ru\/dbforge\/sql\/studio\/\">dbForge<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0433\u0440\u0443\u043f\u043f\u044b \u0442\u0430\u0431\u043b\u0438\u0446 \u0432 HTML \u0444\u043e\u0440\u043c\u0430\u0442.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0443 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0447\u0442\u043e, \u043c\u044f\u0433\u043a\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0431\u044b\u043b\u043e \u043d\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u043c. <\/p>\n<p>  \u0411\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c HTML \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0447\u0435\u0440\u0435\u0437 Database Mail \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0443 \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b <i>sp_send_dbmail<\/i>.<\/p>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u2014 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u043e\u0439 \u0438\u043c\u0435\u044e\u0449\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043d\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435 \u043c\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\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-203076","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/203076","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=203076"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/203076\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=203076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=203076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=203076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}