{"id":280738,"date":"2016-11-10T13:25:04","date_gmt":"2016-11-10T10:25:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=280738"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=280738","title":{"rendered":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0445 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0432 MS SQL Server"},"content":{"rendered":"<h3>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0427\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445, \u0432\u043e\u0437\u043d\u0438\u043a\u0448\u0438\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041f\u0440\u0438\u0447\u0435\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u0432\u043e\u0435\u043c \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 2 \u0442\u0438\u043f\u0430:<br \/>  1) \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442. \u0435. \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<br \/>  2) \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442. \u0435. \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (\u0431\u043e\u043b\u0435\u0435 1 \u0447\u0430\u0441\u0430) \u043f\u043e\u0441\u043b\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043c\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e Database Mail.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0432 HTML-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043f\u043e \u043f\u043e\u0447\u0442\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c.<\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>1) \u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c <a href=\"https:\/\/msdn.microsoft.com\/ru-ru\/library\/ms186358(v=sql.120).aspx\">Database Mail<\/a><br \/>  2) \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u0435\u0439:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">USE [\u0418\u041c\u042f_\u0411\u0410\u0417\u042b_\u0414\u0410\u041d\u041d\u042b\u0425] GO  SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE TABLE [srv].[Recipient](     [Recipient_GUID] [uniqueidentifier] ROWGUIDCOL  NOT NULL,     [Recipient_Name] [nvarchar](255) NOT NULL,  --\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f     [Recipient_Code] [nvarchar](10) NOT NULL,   --\u043a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f     [IsDeleted] [bit] NOT NULL,                 --\u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044c \u0438\u043b\u0438 \u043d\u0435\u0442)     [InsertUTCDate] [datetime] NOT NULL,  CONSTRAINT [PK_Recipient] PRIMARY KEY CLUSTERED  (     [Recipient_GUID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],  CONSTRAINT [AK_Recipient_Code] UNIQUE NONCLUSTERED  (     [Recipient_Code] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],  CONSTRAINT [AK_Recipient_Name] UNIQUE NONCLUSTERED  (     [Recipient_Name] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]  GO  ALTER TABLE [srv].[Recipient] ADD  CONSTRAINT [DF_Recipient_Recipient_GUID]  DEFAULT (newsequentialid()) FOR [Recipient_GUID] GO  ALTER TABLE [srv].[Recipient] ADD  CONSTRAINT [DF_Recipient_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted] GO  ALTER TABLE [srv].[Recipient] ADD  CONSTRAINT [DF_Recipient_InsertUTCDate]  DEFAULT (getutcdate()) FOR [InsertUTCDate] GO<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>3) \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u043b\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u0435\u0439:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">USE [\u0418\u041c\u042f_\u0411\u0410\u0417\u042b_\u0414\u0410\u041d\u041d\u042b\u0425] GO  SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE TABLE [srv].[Address](     [Address_GUID] [uniqueidentifier] ROWGUIDCOL  NOT NULL,     [Recipient_GUID] [uniqueidentifier] NOT NULL,   --\u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044c     [Address] [nvarchar](255) NOT NULL,             --\u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0430\u0434\u0440\u0435\u0441     [IsDeleted] [bit] NOT NULL,                     --\u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u0434\u0440\u0435\u0441 \u0438\u043b\u0438 \u043d\u0435\u0442)     [InsertUTCDate] [datetime] NOT NULL,  CONSTRAINT [PK_Address] PRIMARY KEY CLUSTERED  (     [Address_GUID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],  CONSTRAINT [AK_Address] UNIQUE NONCLUSTERED  (     [Recipient_GUID] ASC,     [Address] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]  GO  ALTER TABLE [srv].[Address] ADD  CONSTRAINT [DF_Address_Address_GUID]  DEFAULT (newsequentialid()) FOR [Address_GUID] GO  ALTER TABLE [srv].[Address] ADD  CONSTRAINT [DF_Address_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted] GO  ALTER TABLE [srv].[Address] ADD  CONSTRAINT [DF_Address_InsertUTCDate]  DEFAULT (getutcdate()) FOR [InsertUTCDate] GO<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>4) \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u043b\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">USE [\u0418\u041c\u042f_\u0411\u0410\u0417\u042b_\u0414\u0410\u041d\u041d\u042b\u0425] GO  SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE TABLE [srv].[ErrorInfo](     [ErrorInfo_GUID] [uniqueidentifier] NOT NULL,     [ERROR_TITLE] [nvarchar](max) NULL,             --\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a     [ERROR_PRED_MESSAGE] [nvarchar](max) NULL,      --\u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f     [ERROR_NUMBER] [nvarchar](max) NULL,            --\u043a\u043e\u0434 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f (\u043e\u0448\u0438\u0431\u043a\u0438)     [ERROR_MESSAGE] [nvarchar](max) NULL,           --\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435     [ERROR_LINE] [nvarchar](max) NULL,              --\u043d\u043e\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438     [ERROR_PROCEDURE] [nvarchar](max) NULL,         --\u0445\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430     [ERROR_POST_MESSAGE] [nvarchar](max) NULL,      --\u043f\u043e\u044f\u0441\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f     [RECIPIENTS] [nvarchar](max) NULL,              --\u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 ';'     [InsertDate] [datetime] NOT NULL,     [StartDate] [datetime] NOT NULL,                --\u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430     [FinishDate] [datetime] NOT NULL,               --\u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f     [Count] [int] NOT NULL,                         --\u043a\u043e\u043b-\u0432\u043e \u0440\u0430\u0437     [UpdateDate] [datetime] NOT NULL,     [IsRealTime] [bit] NOT NULL,                    --\u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438     [InsertUTCDate] [datetime] NULL,  CONSTRAINT [PK_ErrorInfo] PRIMARY KEY CLUSTERED  (     [ErrorInfo_GUID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]  GO  ALTER TABLE [srv].[ErrorInfo] ADD  CONSTRAINT [DF_ErrorInfo_ErrorInfo_GUID]  DEFAULT (newid()) FOR [ErrorInfo_GUID] GO  ALTER TABLE [srv].[ErrorInfo] ADD  CONSTRAINT [DF_ErrorInfo_InsertDate]  DEFAULT (getdate()) FOR [InsertDate] GO  ALTER TABLE [srv].[ErrorInfo] ADD  CONSTRAINT [DF_ErrorInfo_StartDate]  DEFAULT (getdate()) FOR [StartDate] GO  ALTER TABLE [srv].[ErrorInfo] ADD  CONSTRAINT [DF_ErrorInfo_FinishDate]  DEFAULT (getdate()) FOR [FinishDate] GO  ALTER TABLE [srv].[ErrorInfo] ADD  CONSTRAINT [DF_ErrorInfo_Count]  DEFAULT ((1)) FOR [Count] GO  ALTER TABLE [srv].[ErrorInfo] ADD  CONSTRAINT [DF__ErrorInfo__Updat__5FFEE747]  DEFAULT (getdate()) FOR [UpdateDate] GO  ALTER TABLE [srv].[ErrorInfo] ADD  CONSTRAINT [DF_ErrorInfo_IsRealTime]  DEFAULT ((0)) FOR [IsRealTime] GO  ALTER TABLE [srv].[ErrorInfo] ADD  CONSTRAINT [DF_ErrorInfo_InsertUTCDate]  DEFAULT (getutcdate()) FOR [InsertUTCDate] GO<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>5) \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0430\u0440\u0445\u0438\u0432\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">USE [\u0418\u041c\u042f_\u0411\u0410\u0417\u042b_\u0414\u0410\u041d\u041d\u042b\u0425] GO  SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE TABLE [srv].[ErrorInfoArchive](     [ErrorInfo_GUID] [uniqueidentifier] ROWGUIDCOL  NOT NULL,     [ERROR_TITLE] [nvarchar](max) NULL,     [ERROR_PRED_MESSAGE] [nvarchar](max) NULL,     [ERROR_NUMBER] [nvarchar](max) NULL,     [ERROR_MESSAGE] [nvarchar](max) NULL,     [ERROR_LINE] [nvarchar](max) NULL,     [ERROR_PROCEDURE] [nvarchar](max) NULL,     [ERROR_POST_MESSAGE] [nvarchar](max) NULL,     [RECIPIENTS] [nvarchar](max) NULL,     [InsertDate] [datetime] NOT NULL,     [StartDate] [datetime] NOT NULL,     [FinishDate] [datetime] NOT NULL,     [Count] [int] NOT NULL,     [UpdateDate] [datetime] NOT NULL,     [IsRealTime] [bit] NOT NULL,     [InsertUTCDate] [datetime] NULL,  CONSTRAINT [PK_ArchiveErrorInfo] PRIMARY KEY CLUSTERED  (     [ErrorInfo_GUID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]  GO  ALTER TABLE [srv].[ErrorInfoArchive] ADD  CONSTRAINT [DF_ErrorInfoArchive_ErrorInfo_GUID]  DEFAULT (newsequentialid()) FOR [ErrorInfo_GUID] GO  ALTER TABLE [srv].[ErrorInfoArchive] ADD  CONSTRAINT [DF_ArchiveErrorInfo_InsertDate]  DEFAULT (getdate()) FOR [InsertDate] GO  ALTER TABLE [srv].[ErrorInfoArchive] ADD  CONSTRAINT [DF_ErrorInfoArchive_StartDate]  DEFAULT (getdate()) FOR [StartDate] GO  ALTER TABLE [srv].[ErrorInfoArchive] ADD  CONSTRAINT [DF_ErrorInfoArchive_FinishDate]  DEFAULT (getdate()) FOR [FinishDate] GO  ALTER TABLE [srv].[ErrorInfoArchive] ADD  CONSTRAINT [DF_ErrorInfoArchive_Count]  DEFAULT ((1)) FOR [Count] GO  ALTER TABLE [srv].[ErrorInfoArchive] ADD  CONSTRAINT [DF_ErrorInfoArchive_UpdateDate]  DEFAULT (getdate()) FOR [UpdateDate] GO  ALTER TABLE [srv].[ErrorInfoArchive] ADD  CONSTRAINT [DF_ErrorInfoArchive_IsRealTime]  DEFAULT ((0)) FOR [IsRealTime] GO  ALTER TABLE [srv].[ErrorInfoArchive] ADD  CONSTRAINT [DF_ErrorInfoArchive_InsertUTCDate]  DEFAULT (getutcdate()) FOR [InsertUTCDate] GO<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u042d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0438. \u041d\u043e \u0442\u0430\u043a\u0436\u0435 \u0434\u0430\u043d\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043d\u0443\u0436\u043d\u043e \u0447\u0438\u0441\u0442\u0438\u0442\u044c \u043e\u0442 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0430\u0440\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0430\u0440\u0435\u0435 \u043c\u0435\u0441\u044f\u0446\u0430).<\/p>\n<p>  <\/p>\n<p>6) \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0445\u0440\u0430\u043d\u0438\u043c\u0443\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">USE [\u0418\u041c\u042f_\u0411\u0410\u0417\u042b_\u0414\u0410\u041d\u041d\u042b\u0425] GO  SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE PROCEDURE [srv].[ErrorInfoIncUpd]     @ERROR_TITLE            nvarchar(max),     @ERROR_PRED_MESSAGE     nvarchar(max),     @ERROR_NUMBER           nvarchar(max),     @ERROR_MESSAGE          nvarchar(max),     @ERROR_LINE             nvarchar(max),     @ERROR_PROCEDURE        nvarchar(max),     @ERROR_POST_MESSAGE     nvarchar(max),     @RECIPIENTS             nvarchar(max),     @StartDate              datetime=null,     @FinishDate             datetime=null,     @IsRealTime             bit = 0 AS BEGIN     \/*         \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u043f\u043e\u0447\u0442\u0435         \u0435\u0441\u043b\u0438 \u0443\u0436\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0435\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u043e\u043c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u0435\u043b\u0435\u043c         , \u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0434\u0430\u0442\u0430 \u043e\u0448\u0438\u0431\u043a\u0438, \u0434\u0430\u0442\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0448\u0438\u0431\u043e\u043a     *\/     SET NOCOUNT ON;      declare @ErrorInfo_GUID uniqueidentifier;      select top 1     @ErrorInfo_GUID=ErrorInfo_GUID     from srv.ErrorInfo     where (ERROR_TITLE=@ERROR_TITLE or @ERROR_TITLE is null)     and RECIPIENTS=@RECIPIENTS     and (ERROR_MESSAGE=@ERROR_MESSAGE or @ERROR_MESSAGE is null)     and (ERROR_PRED_MESSAGE=@ERROR_PRED_MESSAGE or @ERROR_PRED_MESSAGE is null)     and (ERROR_POST_MESSAGE=@ERROR_POST_MESSAGE or @ERROR_POST_MESSAGE is null)     and (IsRealTime=@IsRealTime or @IsRealTime is null);      if(@ErrorInfo_GUID is null)     begin         insert into srv.ErrorInfo                     (                         ERROR_TITLE                              ,ERROR_PRED_MESSAGE                          ,ERROR_NUMBER                                ,ERROR_MESSAGE                               ,ERROR_LINE                                  ,ERROR_PROCEDURE                             ,ERROR_POST_MESSAGE                          ,RECIPIENTS                         ,IsRealTime                         ,StartDate                         ,FinishDate                              )         select                     @ERROR_TITLE                             ,@ERROR_PRED_MESSAGE                         ,@ERROR_NUMBER                           ,@ERROR_MESSAGE                          ,@ERROR_LINE                                 ,@ERROR_PROCEDURE                        ,@ERROR_POST_MESSAGE                         ,@RECIPIENTS                     ,@IsRealTime                     ,isnull(@StartDate, getdate())                     ,isnull(@FinishDate,getdate())           end     else     begin         update srv.ErrorInfo         set FinishDate=getdate(),         [Count]=[Count]+1,         UpdateDate=getdate()         where ErrorInfo_GUID=@ErrorInfo_GUID;     end END  GO<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>7) \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0445\u0440\u0430\u043d\u0438\u043c\u0443\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u0437 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043f\u043e \u043a\u043e\u0434\u0443 \u0438\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">USE [\u0418\u041c\u042f_\u0411\u0410\u0417\u042b_\u0414\u0410\u041d\u041d\u042b\u0425] GO  SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE PROCEDURE [srv].[GetRecipients] @Recipient_Name nvarchar(255)=NULL, @Recipient_Code nvarchar(10)=NULL, @Recipients nvarchar(max) out \/*     \u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 *\/ AS BEGIN     SET NOCOUNT ON;     set @Recipients='';      select @Recipients=@Recipients+d.[Address]+';'     from srv.Recipient as r     inner join srv.[Address] as d on r.Recipient_GUID=d.Recipient_GUID     where (r.Recipient_Name=@Recipient_Name or @Recipient_Name IS NULL)     and  (r.Recipient_Code=@Recipient_Code or @Recipient_Code IS NULL)     and r.IsDeleted=0     and d.IsDeleted=0;     --order by r.InsertUTCDate desc, d.InsertUTCDate desc;      if(len(@Recipients)&gt;0) set @Recipients=substring(@Recipients,1,len(@Recipients)-1); END  GO<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>8) \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0442\u043e\u0439 \u0438 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">USE [\u0418\u041c\u042f_\u0411\u0410\u0417\u042b_\u0414\u0410\u041d\u041d\u042b\u0425] GO  SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE FUNCTION [rep].[GetDateFormat]  (     @dt datetime, -- \u0432\u0445\u043e\u0434\u043d\u0430\u044f \u0434\u0430\u0442\u0430     @format int=0 -- \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 ) RETURNS nvarchar(255) AS \/*     \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0430\u0442\u0443 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0443 \u0438 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0434\u0430\u0442\u0435     \u041f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0443\u043b\u0438:     \u0444\u043e\u0440\u043c\u0430\u0442  \u0432\u0445\u043e\u0434\u043d\u0430\u044f \u0434\u0430\u0442\u0430    \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442     0       17.4.2014       &quot;17.04.2014&quot;     1       17.4.2014       &quot;04.2014&quot;     1       8.11.2014       &quot;11.2014&quot;     2       17.04.2014      &quot;2014&quot; *\/ BEGIN     DECLARE @res nvarchar(255);     DECLARE @day int=DAY(@dt);     DECLARE @month int=MONTH(@dt);     DECLARE @year int=YEAR(@dt);      if(@format=0)     begin         set @res=IIF(@day&lt;10,'0'+cast(@day as nvarchar(1)), cast(@day as nvarchar(2)))+'.';         set @res=@res+IIF(@month&lt;10,'0'+cast(@month as nvarchar(1)), cast(@month as nvarchar(2)))+'.';         set @res=@res+cast(@year as nvarchar(255));     end     else if(@format=1)     begin         set @res=IIF(@month&lt;10,'0'+cast(@month as nvarchar(1)), cast(@month as nvarchar(2)))+'.';         set @res=@res+cast(@year as nvarchar(255));     end     else if(@format=2)     begin         set @res=cast(@year as nvarchar(255));     end      RETURN @res;  END  GO  USE [\u0418\u041c\u042f_\u0411\u0410\u0417\u042b_\u0414\u0410\u041d\u041d\u042b\u0425] GO  SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE FUNCTION [rep].[GetTimeFormat]  (     @dt datetime, -- \u0432\u0445\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f     @format int=0 -- \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 ) RETURNS nvarchar(255) AS \/*     \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0443 \u0438 \u0432\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438     \u041f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0443\u043b\u0438:     \u0444\u043e\u0440\u043c\u0430\u0442  \u0432\u0445\u043e\u0434\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f   \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442     0       17:04           &quot;17:04:00&quot;     1       17:04           &quot;17:04&quot;     1       8:04            &quot;08:04&quot;     2       17:04           &quot;17&quot; *\/ BEGIN     DECLARE @res nvarchar(255);     DECLARE @hour int=DATEPART(HOUR, @dt);     DECLARE @min int=DATEPART(MINUTE, @dt);     DECLARE @sec int=DATEPART(SECOND, @dt);      if(@format=0)     begin         set @res=IIF(@hour&lt;10,'0'+cast(@hour as nvarchar(1)), cast(@hour as nvarchar(2)))+':';         set @res=@res+IIF(@min&lt;10,'0'+cast(@min as nvarchar(1)), cast(@min as nvarchar(2)))+':';         set @res=@res+IIF(@sec&lt;10,'0'+cast(@sec as nvarchar(1)), cast(@sec as nvarchar(2)));     end     else if(@format=1)     begin         set @res=IIF(@hour&lt;10,'0'+cast(@hour as nvarchar(1)), cast(@hour as nvarchar(2)))+':';         set @res=@res+IIF(@min&lt;10,'0'+cast(@min as nvarchar(1)), cast(@min as nvarchar(2)));     end     else if(@format=2)     begin         set @res=IIF(@hour&lt;10,'0'+cast(@hour as nvarchar(1)), cast(@hour as nvarchar(2)));     end      RETURN @res;  END  GO<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>9) \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0445\u0440\u0430\u043d\u0438\u043c\u0443\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 HTML-\u043e\u0442\u0447\u0435\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">USE [\u0418\u041c\u042f_\u0411\u0410\u0417\u042b_\u0414\u0410\u041d\u041d\u042b\u0425] GO  SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE PROCEDURE [srv].[GetHTMLTable]     @recipients nvarchar(max)     ,@dt        datetime -- \u043f\u043e \u043a\u0430\u043a\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0447\u0438\u0442\u0430\u0442\u044c AS BEGIN     \/*         \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 HTML-\u043a\u043e\u0434 \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b     *\/     SET NOCOUNT ON;      declare @body nvarchar(max);     declare @tbl table(ID int identity(1,1)                       ,[ERROR_TITLE]        nvarchar(max)                       ,[ERROR_PRED_MESSAGE] nvarchar(max)                       ,[ERROR_NUMBER]       nvarchar(max)                       ,[ERROR_MESSAGE]      nvarchar(max)                       ,[ERROR_LINE]         nvarchar(max)                       ,[ERROR_PROCEDURE]    nvarchar(max)                       ,[ERROR_POST_MESSAGE] nvarchar(max)                       ,[InsertDate]         datetime                       ,[StartDate]          datetime                       ,[FinishDate]         datetime                       ,[Count]              int                       );     declare     @ID                     int     ,@ERROR_TITLE           nvarchar(max)     ,@ERROR_PRED_MESSAGE    nvarchar(max)     ,@ERROR_NUMBER          nvarchar(max)     ,@ERROR_MESSAGE         nvarchar(max)     ,@ERROR_LINE            nvarchar(max)     ,@ERROR_PROCEDURE       nvarchar(max)     ,@ERROR_POST_MESSAGE    nvarchar(max)     ,@InsertDate            datetime     ,@StartDate             datetime     ,@FinishDate            datetime     ,@Count                 int      insert into @tbl(                 [ERROR_TITLE]                        ,[ERROR_PRED_MESSAGE]                  ,[ERROR_NUMBER]                      ,[ERROR_MESSAGE]                         ,[ERROR_LINE]                            ,[ERROR_PROCEDURE]                   ,[ERROR_POST_MESSAGE]                    ,[InsertDate]                 ,[StartDate]                 ,[FinishDate]                 ,[Count]     )     select top 100                 [ERROR_TITLE]                        ,[ERROR_PRED_MESSAGE]                  ,[ERROR_NUMBER]                      ,[ERROR_MESSAGE]                         ,[ERROR_LINE]                            ,[ERROR_PROCEDURE]                   ,[ERROR_POST_MESSAGE]                    ,[InsertDate]                 ,[StartDate]                 ,[FinishDate]                 ,[Count]     from [srv].[ErrorInfo]     where ([RECIPIENTS]=@recipients) or (@recipients IS NULL)     and InsertDate&lt;=@dt     --order by InsertDate asc;      set @body='&lt;TABLE BORDER=5&gt;';      set @body=@body+'&lt;TR&gt;';      set @body=@body+'&lt;TD&gt;';     set @body=@body+'\u2116 \u043f\/\u043f';     set @body=@body+'&lt;\/TD&gt;';      set @body=@body+'&lt;TD&gt;';     set @body=@body+'\u0414\u0410\u0422\u0410';     set @body=@body+'&lt;\/TD&gt;';      set @body=@body+'&lt;TD&gt;';     set @body=@body+'\u041e\u0428\u0418\u0411\u041a\u0410';     set @body=@body+'&lt;\/TD&gt;';      set @body=@body+'&lt;TD&gt;';     set @body=@body+'\u041e\u041f\u0418\u0421\u0410\u041d\u0418\u0415';     set @body=@body+'&lt;\/TD&gt;';      set @body=@body+'&lt;TD&gt;';     set @body=@body+'\u041a\u041e\u0414 \u041e\u0428\u0418\u0411\u041a\u0418';     set @body=@body+'&lt;\/TD&gt;';      set @body=@body+'&lt;TD&gt;';     set @body=@body+'\u0421\u041e\u041e\u0411\u0429\u0415\u041d\u0418\u0415';     set @body=@body+'&lt;\/TD&gt;';      set @body=@body+'&lt;TD&gt;';     set @body=@body+'\u041d\u0410\u0427\u0410\u041b\u041e';     set @body=@body+'&lt;\/TD&gt;';      set @body=@body+'&lt;TD&gt;';     set @body=@body+'\u041e\u041a\u041e\u041d\u0427\u0410\u041d\u0418\u0415';     set @body=@body+'&lt;\/TD&gt;';      set @body=@body+'&lt;TD&gt;';     set @body=@body+'\u041a\u041e\u041b\u0418\u0427\u0415\u0421\u0422\u0412\u041e';     set @body=@body+'&lt;\/TD&gt;';      set @body=@body+'&lt;TD&gt;';     set @body=@body+'\u041d\u041e\u041c\u0415\u0420 \u0421\u0422\u0420\u041e\u041a\u0418';     set @body=@body+'&lt;\/TD&gt;';      set @body=@body+'&lt;TD&gt;';     set @body=@body+'\u041f\u0420\u041e\u0426\u0415\u0414\u0423\u0420\u0410';     set @body=@body+'&lt;\/TD&gt;';      set @body=@body+'&lt;TD&gt;';     set @body=@body+'\u041f\u0420\u0418\u041c\u0415\u0427\u0410\u041d\u0418\u0415';     set @body=@body+'&lt;\/TD&gt;';      set @body=@body+'&lt;\/TR&gt;';      while((select top 1 1 from @tbl)&gt;0)     begin         set @body=@body+'&lt;TR&gt;';          select top 1         @ID                 =[ID]         ,@ERROR_TITLE       =[ERROR_TITLE]               ,@ERROR_PRED_MESSAGE=[ERROR_PRED_MESSAGE]         ,@ERROR_NUMBER      =[ERROR_NUMBER]              ,@ERROR_MESSAGE     =[ERROR_MESSAGE]             ,@ERROR_LINE        =[ERROR_LINE]                ,@ERROR_PROCEDURE   =[ERROR_PROCEDURE]           ,@ERROR_POST_MESSAGE=[ERROR_POST_MESSAGE]         ,@InsertDate        =[InsertDate]         ,@StartDate         =[StartDate]         ,@FinishDate        =[FinishDate]         ,@Count             =[Count]             from @tbl                 order by InsertDate asc;          set @body=@body+'&lt;TD&gt;';         set @body=@body+cast(@ID as nvarchar(max));         set @body=@body+'&lt;\/TD&gt;';          set @body=@body+'&lt;TD&gt;';         set @body=@body+rep.GetDateFormat(@InsertDate, default)+' '+rep.GetTimeFormat(@InsertDate, default);--cast(@InsertDate as nvarchar(max));         set @body=@body+'&lt;\/TD&gt;';          set @body=@body+'&lt;TD&gt;';         set @body=@body+isnull(@ERROR_TITLE,'');         set @body=@body+'&lt;\/TD&gt;';          set @body=@body+'&lt;TD&gt;';         set @body=@body+isnull(@ERROR_PRED_MESSAGE,'');         set @body=@body+'&lt;\/TD&gt;';          set @body=@body+'&lt;TD&gt;';         set @body=@body+isnull(@ERROR_NUMBER,'');         set @body=@body+'&lt;\/TD&gt;';          set @body=@body+'&lt;TD&gt;';         set @body=@body+isnull(@ERROR_MESSAGE,'');         set @body=@body+'&lt;\/TD&gt;';          set @body=@body+'&lt;TD&gt;';         set @body=@body+rep.GetDateFormat(@StartDate, default)+' '+rep.GetTimeFormat(@StartDate, default);--cast(@StartDate as nvarchar(max));         set @body=@body+'&lt;\/TD&gt;';          set @body=@body+'&lt;TD&gt;';         set @body=@body+rep.GetDateFormat(@FinishDate, default)+' '+rep.GetTimeFormat(@FinishDate, default);--cast(@FinishDate as nvarchar(max));         set @body=@body+'&lt;\/TD&gt;';          set @body=@body+'&lt;TD&gt;';         set @body=@body+cast(@Count as nvarchar(max));         set @body=@body+'&lt;\/TD&gt;';          set @body=@body+'&lt;TD&gt;';         set @body=@body+isnull(@ERROR_LINE,'');         set @body=@body+'&lt;\/TD&gt;';          set @body=@body+'&lt;TD&gt;';         set @body=@body+isnull(@ERROR_PROCEDURE,'');         set @body=@body+'&lt;\/TD&gt;';          set @body=@body+'&lt;TD&gt;';         set @body=@body+isnull(@ERROR_POST_MESSAGE,'');         set @body=@body+'&lt;\/TD&gt;';          delete from @tbl         where ID=@ID;          set @body=@body+'&lt;\/TR&gt;';     end      set @body=@body+'&lt;\/TABLE&gt;';      select @body; END  GO<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>10) \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0445\u0440\u0430\u043d\u0438\u043c\u0443\u044e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">USE [\u0418\u041c\u042f_\u0411\u0410\u0417\u042b_\u0414\u0410\u041d\u041d\u042b\u0425] GO  SET ANSI_NULLS ON GO  SET QUOTED_IDENTIFIER ON GO  CREATE PROCEDURE [srv].[RunErrorInfoProc]     @IsRealTime bit =0  -- \u0440\u0435\u0436\u0438\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 (1-\u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438) AS BEGIN     \/*         \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0440\u0435\u0436\u0438\u043c\u043e\u043c     *\/     SET NOCOUNT ON;     declare @dt datetime=getdate();      declare @tbl table(Recipients nvarchar(max));     declare @recipients nvarchar(max);     declare @recipient nvarchar(255);     declare @result nvarchar(max)='';     declare @recp nvarchar(max);     declare @ind int;     declare @recipients_key nvarchar(max);       --\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f      insert into @tbl(Recipients)      select [RECIPIENTS]      from srv.ErrorInfo      where InsertDate&lt;=@dt and IsRealTime=@IsRealTime      group by [RECIPIENTS];       declare @rec_body table(Body nvarchar(max));      declare @body nvarchar(max);       declare @query nvarchar(max);       --\u043f\u0440\u043e\u0431\u0435\u0433\u0430\u0435\u043c \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e      while((select top 1 1 from @tbl)&gt;0)      begin         --\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u0435\u0439         select top (1)         @recipients=Recipients         from @tbl;          set @recipients_key=@recipients;         set @result='';          --\u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f         while(len(@recipients)&gt;0)         begin             set @ind=CHARINDEX(';', @recipients);             if(@ind&gt;0)             begin                 set @recipient=substring(@recipients,1, @ind-1);                 set @recipients=substring(@recipients,@ind+1,len(@recipients)-@ind);             end             else             begin                 set @recipient=@recipients;                 set @recipients='';             end;              --\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f             exec [srv].[GetRecipients]             @Recipient_Code=@recipient,             @Recipients=@recp out;              if(len(@recp)=0)             begin                 exec [srv].[GetRecipients]                 @Recipient_Name=@recipient,                 @Recipients=@recp out;                  if(len(@recp)=0) set @recp=@recipient;             end              --\u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c ';'             set @result=@result+@recp+';';         end          set @result=substring(@result,1,len(@result)-1);         set @recipients=@result;          --\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c HTML-\u043e\u0442\u0447\u0435\u0442 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0434\u0430\u0442\u043e\u0439         insert into @rec_body(Body)         exec srv.GetHTMLTable @recipients=@recipients_key, @dt=@dt;          --\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c HTML-\u043e\u0442\u0447\u0435\u0442         select top (1)         @body=Body         from @rec_body;           --\u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430          EXEC msdb.dbo.sp_send_dbmail         -- \u0421\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0445 \u0440\u0430\u0441\u0441\u044b\u043b\u043e\u043a             @profile_name = 'ALARM',         -- \u0410\u0434\u0440\u0435\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f             @recipients = @recipients,         -- \u0422\u0435\u043a\u0441\u0442 \u043f\u0438\u0441\u044c\u043c\u0430             @body = @body,         -- \u0422\u0435\u043c\u0430             @subject = N'\u0418\u041d\u0424\u041e\u0420\u041c\u0410\u0426\u0418\u042f \u041f\u041e \u041e\u0428\u0418\u0411\u041a\u0410\u041c \u0412\u042b\u041f\u041e\u041b\u041d\u0415\u041d\u0418\u042f',             @body_format='HTML'--,         -- \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043a \u043f\u0438\u0441\u044c\u043c\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u0430             --@query = @query--'SELECT TOP 10 name FROM sys.objects';          delete from @tbl         where Recipients=@recipients_key;          delete from @rec_body;      end      --\u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0432 \u0430\u0440\u0445\u0438\u0432 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f     INSERT INTO [srv].[ErrorInfoArchive]            ([ErrorInfo_GUID]            ,[ERROR_TITLE]            ,[ERROR_PRED_MESSAGE]            ,[ERROR_NUMBER]            ,[ERROR_MESSAGE]            ,[ERROR_LINE]            ,[ERROR_PROCEDURE]            ,[ERROR_POST_MESSAGE]            ,[RECIPIENTS]            ,[StartDate]            ,[FinishDate]            ,[Count]     ,IsRealTime            )      SELECT            [ErrorInfo_GUID]            ,[ERROR_TITLE]            ,[ERROR_PRED_MESSAGE]            ,[ERROR_NUMBER]            ,[ERROR_MESSAGE]            ,[ERROR_LINE]            ,[ERROR_PROCEDURE]            ,[ERROR_POST_MESSAGE]            ,[RECIPIENTS]            ,[StartDate]            ,[FinishDate]            ,[Count]     ,IsRealTime      FROM [srv].[ErrorInfo]      where IsRealTime=@IsRealTime      and InsertDate&lt;=@dt      --order by InsertDate;      --\u0443\u0434\u0430\u043b\u044f\u0435\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439     delete from [srv].[ErrorInfo]     where IsRealTime=@IsRealTime     and InsertDate&lt;=@dt; END  GO<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0431\u0435\u0440\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438\u0437 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438 \u043e\u0431\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u0442 \u0435\u0433\u043e \u0432 HTML-\u043e\u0442\u0447\u0435\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u043e \u0438\u0445 \u043a\u043e\u0434\u0443 \u0438\u043b\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c\u0443 \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0438\u0437 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432. \u0418\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u044d\u0442\u0438 \u0430\u0434\u0440\u0435\u0441\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435. \u0418 \u0442\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f. \u0417\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 <a href=\"https:\/\/msdn.microsoft.com\/ru-ru\/library\/ms190307(v=sql.110).aspx\">msdb.dbo.sp_send_dbmail<\/a><\/p>\n<p>  <\/p>\n<p>11) \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0432\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0432 \u0410\u0433\u0435\u043d\u0442\u0435 (\u043f\u0435\u0440\u0432\u043e\u0435-\u0434\u043b\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435-1 \u0440\u0430\u0437 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443), \u0432\u0442\u043e\u0440\u043e\u0435-\u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 (\u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435-1 \u0440\u0430\u0437 \u0432 \u0447\u0430\u0441)). \u0412 \u043a\u043e\u0434 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"sql\">EXECUTE [\u0418\u041c\u042f_\u0411\u0410\u0417\u042b_\u0414\u0410\u041d\u041d\u042b\u0425].[srv].[RunErrorInfoProc]     @IsRealTime=0; --0 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0438 1 \u0434\u043b\u044f \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043e\u0448\u0438\u0431\u043a\u0438:<\/p>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">begin try                 exec [\u0418\u041c\u042f_\u0411\u0410\u0417\u042b_\u0414\u0410\u041d\u041d\u042b\u0425].[srv].[KillFullOldConnect]; end try begin catch     declare @str_mess nvarchar(max)=ERROR_MESSAGE(),             @str_num  nvarchar(max)=cast(ERROR_NUMBER() as nvarchar(max)),             @str_line nvarchar(max)=cast(ERROR_LINE()   as nvarchar(max)),             @str_proc nvarchar(max)=ERROR_PROCEDURE(),             @str_title nvarchar(max)='\u0423\u0414\u0410\u041b\u0415\u041d\u0418\u0415 \u0417\u0410\u0412\u0418\u0421\u0428\u0418\u0425 \u041f\u0420\u041e\u0426\u0415\u0421\u0421\u041e\u0412 \u041d\u0410 \u0421\u0415\u0420\u0412\u0415\u0420\u0415 '+@@servername,             @str_pred_mess nvarchar(max)='\u041d\u0410 '+@@servername+' \u0421\u0415\u0420\u0412\u0415\u0420\u0415 \u0412\u041e\u0417\u041d\u0418\u041a\u041b\u0410 \u041e\u0428\u0418\u0411\u041a\u0410 \u0423\u0414\u0410\u041b\u0415\u041d\u0418\u042f \u0417\u0410\u0412\u0418\u0421\u0428\u0418\u0425 \u041f\u0420\u041e\u0426\u0415\u0421\u0421\u041e\u0412';      exec [\u0418\u041c\u042f_\u0411\u0410\u0417\u042b_\u0414\u0410\u041d\u041d\u042b\u0425].srv.ErrorInfoIncUpd          @ERROR_TITLE           = @str_title,          @ERROR_PRED_MESSAGE    = @str_pred_mess,          @ERROR_NUMBER          = @str_num,          @ERROR_MESSAGE         = @str_mess,          @ERROR_LINE            = @str_line,          @ERROR_PROCEDURE       = @str_proc,          @ERROR_POST_MESSAGE    = NULL,          @RECIPIENTS            = '\u041f\u041e\u041b\u0423\u0427\u0410\u0422\u0415\u041b\u042c1;\u041f\u041e\u041b\u0423\u0427\u0410\u0422\u0415\u041b\u042c2;';       declare @err int=@@error;      raiserror(@str_mess,16,1); end catch<\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0445\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 <a href=\"https:\/\/habrahabr.ru\/post\/314632\/\">srv.KillFullOldConnect<\/a><\/p>\n<p>  <\/p>\n<h3>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h3>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u044b\u043b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e Database Mail, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0432 HTML-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043f\u043e \u043f\u043e\u0447\u0442\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0442\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043d\u0430\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0421\u0423\u0411\u0414 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0447\u0442\u043e \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043e\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432.<\/p>\n<p>  <\/p>\n<h3>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438:<\/h3>\n<p>  <\/p>\n<p>\u00bb <a href=\"https:\/\/msdn.microsoft.com\/ru-ru\/library\/ms190307(v=sql.110).aspx\">sp_send_dbmail<\/a><br \/>  \u00bb <a href=\"https:\/\/msdn.microsoft.com\/ru-ru\/library\/ms186358(v=sql.120).aspx\">Database Mail<\/a><br \/>  \u00bb <a href=\"https:\/\/habrahabr.ru\/post\/314632\/\">srv.KillFullOldConnect<\/a><\/p>\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:\/\/habrahabr.ru\/post\/314622\/\"> https:\/\/habrahabr.ru\/post\/314622\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<h3>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0427\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445, \u0432\u043e\u0437\u043d\u0438\u043a\u0448\u0438\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u041f\u0440\u0438\u0447\u0435\u043c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u0432\u043e\u0435\u043c \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 2 \u0442\u0438\u043f\u0430:<br \/>  1) \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442. \u0435. \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<br \/>  2) \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442. \u0435. \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f (\u0431\u043e\u043b\u0435\u0435 1 \u0447\u0430\u0441\u0430) \u043f\u043e\u0441\u043b\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043c\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e Database Mail.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0432 HTML-\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043f\u043e \u043f\u043e\u0447\u0442\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c.<\/p>\n<p>  <\/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-280738","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/280738","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=280738"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/280738\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=280738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=280738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=280738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}