SQL 2016 using Maintenance Plans for backup automation
As per Microsoft documentation and with the courtesy of Microsoft, here is the detail about SQL maintenance plans
Make sure to review a link provided by Microsoft for a full explanation:
https://docs.microsoft.com/en-us/sql/relational-databases/maintenance-plans/create-a-maintenance-plan?view=sql-server-2017
Using SQL Server Management Studio
To create a maintenance plan using the Maintenance Plan Wizard
In Object Explorer, click the plus sign to expand the server where you want to create a maintenance plan.
Click the plus sign to expand the Management folder.
Right-click the Maintenance Plans folder and select Maintenance Plan Wizard.
Follow the steps of the wizard to create a maintenance plan. For more information, see Use the Maintenance Plan Wizard.
To create a maintenance plan using the design surface
In Object Explorer, click the plus sign to expand the server where you want to create a maintenance plan.
Click the plus sign to expand the Management folder.
Right-click the Maintenance Plans folder and select New Maintenance Plan.
Create a maintenance plan following the steps in Create a Maintenance Plan (Maintenance Plan Design Surface).
Using Transact-SQL
To create a maintenance plan
In Object Explorer, connect to an instance of Database Engine.
On the Standard bar, click New Query.
Copy and paste the following example into the query window and click Execute.
Copy
USE msdb;
GO
-- Adds a new job, executed by the SQL Server Agent service, called "HistoryCleanupTask_1".
EXEC dbo.sp_add_job
@job_name = N'HistoryCleanupTask_1',
@enabled = 1,
@description = N'Clean up old task history' ;
GO
-- Adds a job step for reorganizing all of the indexes in the HumanResources.Employee table to the HistoryCleanupTask_1 job.
EXEC dbo.sp_add_jobstep
@job_name = N'HistoryCleanupTask_1',
@step_name = N'Reorganize all indexes on HumanResources.Employee table',
@subsystem = N'TSQL',
@command = N'USE AdventureWorks2012
GO
ALTER INDEX AK_Employee_LoginID ON HumanResources.Employee REORGANIZE WITH ( LOB_COMPACTION = ON )
GO
USE AdventureWorks2012
GO
ALTER INDEX AK_Employee_NationalIDNumber ON HumanResources.Employee REORGANIZE WITH ( LOB_COMPACTION = ON )
GO
USE AdventureWorks2012
GO
ALTER INDEX AK_Employee_rowguid ON HumanResources.Employee REORGANIZE WITH ( LOB_COMPACTION = ON )
GO
USE AdventureWorks2012
GO
ALTER INDEX IX_Employee_OrganizationLevel_OrganizationNode ON HumanResources.Employee REORGANIZE WITH ( LOB_COMPACTION = ON )
GO
USE AdventureWorks2012
GO
ALTER INDEX IX_Employee_OrganizationNode ON HumanResources.Employee REORGANIZE WITH ( LOB_COMPACTION = ON )
GO
USE AdventureWorks2012
GO
ALTER INDEX PK_Employee_BusinessEntityID ON HumanResources.Employee REORGANIZE WITH ( LOB_COMPACTION = ON )
GO
',
@retry_attempts = 5,
@retry_interval = 5 ;
GO
-- Creates a schedule named RunOnce that executes every day when the time on the server is 23:00.
EXEC dbo.sp_add_schedule
@schedule_name = N'RunOnce',
@freq_type = 4,
@freq_interval = 1,
@active_start_time = 233000 ;
GO
-- Attaches the RunOnce schedule to the job HistoryCleanupTask_1.
EXEC sp_attach_schedule
@job_name = N'HistoryCleanupTask_1'
@schedule_name = N'RunOnce' ;
GO
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «SQL 2016 using Maintenance Plans for backup automation», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.