SQL MAINTENANCE PLAN - MTC Sys

1y ago
6 Views
2 Downloads
607.47 KB
15 Pages
Last View : 28d ago
Last Download : 3m ago
Upload by : Matteo Vollmer
Transcription

SQL MAINTENANCE PLANFor SAP Business OneCreate a maintenance plan to do integrity check, back up, shrink and clean old file created bythe plan on database.1 P a g e

Maintenance Plan1. Open Microsoft SQL Management Studio to find Maintenance Plan.2. Right click on Maintenance Plan to select Maintenance Plan Wizard.3. Click Next as shown below2 P a g e

4. Select Plan Properties page4.1. On the Select Plan Properties page Enter: 3 P a g eName - Name of the maintenance plan you are creating.Description - describe your maintenance plan (optional but recommended).Select either one of the below to specify the recurring schedule of the maintenance plan.“Separate schedules for each task” (or) “Single schedule for the entire plan or noschedule”. In case “Single schedule for the entire plan or no schedule” was chosen clickon “Change” button under Schedule.

4.2. In the New Job Schedule dialog box enter Name - The job schedule’s name.Schedule type list - select the type of schedule:o Start automatically when SQL Server Agent startso Start whenever the CPUs become idleo Recurring. This is the default selection.o One timeSelect or clear the Enabled check box to enable or disable the schedule.If Recurring is chosen as the Schedule type:o Frequency – Select the frequency of occurrence: If Daily- Select how often the job schedule repeats in days. If Weekly, enter days of the week on which the job schedule needs torun. If Monthly, select either Day or specific day of the week. If the Day is selected, enter the date of the month and how often the jobschedule repeats in months If the specific day of the week is selected within the month that youwant the job schedule to run and how often the job schedule repeats inmonths.o Under Daily frequency, specify how often the job schedule repeats on theday the job schedule runs: If you select Occurs once at , enter the specific time of day when the jobschedule should run in the Occurs once at box. Enter the hour, minute,and second of the day, as well as AM or PM. If you select Occurs every, specify how often the job schedule runsduring the day chosen under Frequency. For example, if you want thejob schedule to repeat every 2 hours during the day that the job4 P a g e

schedule is run, select Occurs every, enter “2” in the first box, and thenselect hour(s) from the list. From this list you can also select minute(s)and second(s). Please note that the largest number allowed in the firstbox is “100”. In the Starting at box, enter the time that the job schedule should startrunning. In the Ending at box, enter the time that the job scheduleshould stop repeating. Enter the hour, minute, and second of the day, aswell as AM or PM.o Under Duration, enter the start date and End date or No end date toindicate when the job schedule should stop running. If One Time, in the Date box, enter the date that the job schedule will be run.In the Time box, enter the time that the job schedule will be run Under Summary, in Description, verify that all job schedule settings arecorrect. Click OK.5. Select Maintenance TasksChoose the tasks that the plan needs to perform and Click Next. If Separate schedules foreach task on the Select Plan Properties page above are selected, the order of themaintenance tasks cannot be changed.5 P a g e

6. Select Maintenance Task OrderRearrange the order in which the task needs to be performed by selecting the task andclicking the “Move Up” or “Move Down” buttons. Then click “Next”.7. Integrity Check Task6 P a g e

Define Database Check Integrity Task: Under Database, select the databases forwhich the Integrity check needs to be performed. Click Ok and when completed clickNext. The options available are as below.o Under Databases to specify the databases affected by the task are.o All databases: The task runs against all Microsoft SQL Server databasesexcept tempdb.o System databases: The task runs against SQL Server system databasesexcept tempdb and user-created databases.o All user databases (excluding master, model, msdb, tempdb): The taskruns against all user-created databases. No maintenance tasks are runagainst the SQL Server system databases.o These databases: The task runs against only those databases that areselected. At least one database in the list must be selected if this option ischosen.o Include indexes check box: Checks the integrity of all the index pages andthe table data pages.8. Back Up DatabaseSelect the database or databases on which to run a full backup. Whenfinished, click Next.7 P a g e

The following options are available on this page.o Backup type list: Displays the type of backup to be performed. This isread-only.o Databases list: Specifies the databases affected by this task.o Backup component: Select Database to back up the entire database. SelectFile and filegroups to back up only a portion of the database. If selected,provide the file or filegroup name. When multiple databases are selectedin the Databases box, only specify Databases for the Backup components.To perform file or filegroup backups, create a task for each database.These options are only available if a single database is chosen from theDatabases list above.o Backup set will expire check box: Specifies when the backup set for thisbackup can be overwritten. Select After and enter a number of days toexpiration, or select on and enter a date of expiration.o Back up to: Specifies the medium on which to back up the database. Selecteither Disk or Tape. Only tape devices attached to the computer containingthe database are available.o Back up database(s) across one or more files: Click Add to open the SelectBackup Destination dialog box. Click Remove to remove a file from thebox. Click Contents to read the file header and display the current backupcontents of the file. Select Backup Destination dialog box. Select the file,tape drive, or backup device for the backup destination.o If backup files exist list: Specify how to handle existing backups. SelectAppend to add the new backups after any existing backups in the file or onthe tape. Select Overwrite to remove the old content of a file or tape, andreplace it with this new backup.8 P a g e

o Create a backup file for every database: Create a backup file in theooooooo9 P a g elocation specified in the folder box. One file is created for each databaseselected.Create a sub-directory for each database check box: Create a subdirectory under the specified disk directory that contains the databasebackup for each database being backed up as part of the maintenance plan.Folder box: Specify the folder to contain the automatically createddatabase files.Backup file extension box: Specify the extension to use for the backupfiles. The default is .bak.Verify backup integrity check box: Verify that the backup set is completeand that all volumes are readable.Set backup compression: Select “Use the default server setting”,“Compress backup” (or) “Do not compress backup”.Define Backup Database (Differential): Select the database or databaseson which to run a partial backup. When finished, click Next.Define Backup Database (Transaction Log): Select the database ordatabases on which to run a backup for a transaction log.

9. Database Shrink TasksThis task attempts to reduce the size of the selected databases. When complete, click Next. Databases: Specify the databases affected by this task. Shrink database when it grows beyond box: Specify the size in megabytes thatcauses the task to execute. Amount of free space to remain after shrink box: Stop shrinking when freespace in database files reaches this size (as a percentage). Retain freed space in database files: The database is condensed to contiguouspages but the pages are not deallocated, and the database files do not shrink. Usethis option if you expect the database to expand again, and you do not want toreallocate space. With this option, the database files do not shrink as much aspossible. Return freed space to operating system: The database is condensed tocontiguous pages and the pages are released back to the operating system for useby other programs. This database files shrink as much as possible. This is thedefault option.10 P a g e

10. Reorganize Index TaskThis task helps to select the server or servers where index pages need to be moved into amore efficient search order. When complete, click Next.The options available are: Databases list: Specify the databases affected by this task. Object list: Limit the Selection list to display tables, views, or both. This list isonly available if a single database is chosen from the Databases list above. Selection list: Specify the tables or indexes affected by this task. Not availablewhen Tables and Views is selected in the Object box. Free space options area: Presents options for applying fill factor to indexesand tables. Default free space per page: Reorganizes the pages with the default amount offree space. This will drop the indexes on the tables in the database and re-createthem with the fill factor that was specified when the indexes were created. This isthe default option. Change free space per page to box: Drop the indexes on the tables in thedatabase and re-create them with a new, automatically calculated fill factor,thereby reserving the specified amount of free space on the index pages. Thehigher the percentage, the more free space is reserved on the index pages, and thelarger the index grows. Valid values are from 0 through 100. Advanced options area: Presents additional options for sorting indexes andreindexing. Sort results in tempdb check box: Determines where the intermediate sortresults, generated during index creation, are temporarily stored. If a sort operationis not required, or if the sort can be performed in memory, theSORT IN TEMPDB option is ignored. 11 P a g e

Keep index online while reindexing check box: Uses the ONLINE optionwhich allows users to access the underlying table or clustered index data and anyassociated non clustered indexes during index operations. Selecting this optionactivates additional options for rebuilding indexes that do not allow for onlinerebuilds: Do not rebuild indexes and Rebuild indexes offline.11. Define Maintenance Cleanup TaskUsed to specify the types of files to delete as part of the maintenance plan, including textreports created by maintenance plans and database backup files. When finished, click Next.The options available are Delete files of the following type: Specify the type of files to be deleted. Backup files: Delete database backup files. Maintenance Plan text reports: Delete text reports of previously runmaintenance plans. File location: Specify path to files to be deleted. Delete specific file: Delete the specific file provided in the File name text box. Search folder and delete files based on an extension: Delete all files with thespecified extension in the specified folder. Use this to delete multiple files atonce, such as all backup files in the Tuesday folder with the .bak extension. Folder box: Path and name of the folder containing the files to be deleted. File extension box: Provide the file extension of the files to be deleted. Include first-level subfolders check box: Delete files with the extensionspecified for File extension from first-level subfolders under the folder specifiedin Folder.12 P a g e

Delete files based on the age of the file at task run time check box: Specify theminimum age of the files that you want to delete by providing a number, and unitof time in the Delete files older than the following box. Delete files older than the following: Specify the minimum age of the filesthat you want to delete by providing a number, and unit of time (Hour, Day,Week, Month, or Year). Files older than the time frame specified will be deleted.12. Select Report OptionsUsed to select options for saving or distributing a report of the maintenance plan actions.When finished, click Next. The options available are Write a report to a text file check box: Save the report in a file. Folder location box: Specify the location of the file that will contain thereport. E-mail report check box: Send an e-mail when a task fails. To use this taskyou must have Database Mail enabled and correctly configured with MSDB as aMail Host Database, and have a Microsoft SQL Server Agent operator with avalid e-mail address. Agent operator: Specify the recipient of the e-mail. Mail profile: Specify the profile that defines the sender of the e-mail.13 P a g e

13. Complete the WizardOn the Complete the Wizard page, verify the choices made on the previous pages, and clickFinish.14. Maintenance Wizard Progress:Depending on the options selected in the wizard, the progress page might contain one ormore actions. The top box displays the overall status of the wizard and the number of status,error, and warning messages that the wizard has received.14 P a g e

The options available are: Details: Provides the action, status, and any messages that are returned fromaction taken by the wizard. Action: Specifies the type and name of each action. Status: Indicates whether the wizard action as a whole returned the value ofSuccess or Failure. Message: Provides any error or warning messages that are returned from theprocess.o Report: Creates a report that contains the results of the Create PartitionWizard. The options are View Report, Save Report to File, Copy Report toClipboard, and Send Report as Email.View Report - Opens the ViewReport dialog box, which contains a text report of the progress of theCreate Partition Wizard.o Save Report to File – Opens the Save Report As dialog box.o Copy Report to Clipboard - Copies the results of the wizard’s progressreport to the Clipboard.o Send Report as Email - Copies the results of the wizard’s progress reportinto an email message.Reference:1. spx15 P a g e

SQL MAINTENANCE PLAN . For SAP Business One . Create a maintenance plan to do integrity check, back up, shrink and clean old file created by the plan on database. . System databases: The task runs against SQL Server system databases except tempdb and user-created databases. o. All user databases (excluding master, model, msdb, tempdb): The task

Related Documents:

MTC Micro Tech Components GmbH Lauinger Straße 16 D-89407 Dillingen Phone: 49 9071 7945-0 Fax: 49 9071 7945-20 www.mtc.de info@mtc.de an acal group company mtc an acal group company mtc 4 MTC – About us Features 5 MTC is an ISO 9001 and ISO 14001 certifi

4210GS, and MTC-4213GS transfer case specifi cations. There are no changes to the oil cooler interface points with these models. For more information on MTC-4208, MTC-4210, and MTC-4213GS Series transfer cases, refer to Maintenance Manual MM-0146 - Transfer Cases. To obtain this publication, visit Literature on Demand at meritor.com. Before .

SQL Server supports ANSI SQL, which is the standard SQL (Structured Query Language) language. However, SQL Server comes with its own implementation of the SQL language, T-SQL (Transact- SQL). T-SQL is a Microsoft propriety Language known as Transact-SQL. It provides further capab

MS SQL Server: MS SQL Server 2017, MS SQL Server 2016, MS SQL Server 2014, MS SQL Server 2012, MS SQL Server 2008 R2, 2008, 2008 (64 bit), 2008 Express, MS SQL Server 2005, 2005 (64 bit), 2005 Express, MS SQL Server 2000, 2000 (64 bit), 7.0 and mixed formats. To install the software, follow the steps: 1. Double-click Stellar Repair for MS SQL.exe.

Server 2005 , SQL Server 2008 , SQL Server 2008 R2 , SQL Server 2012 , SQL Server 2014 , SQL Server 2005 Express Edition , SQL Server 2008 Express SQL Server 2008 R2 Express , SQL Server 2012 Express , SQL Server 2014 Express .NET Framework 4.0, .NET Framework 2.0,

SQL Server DBA (SQL DBA) : Complete Course Plan Course Description Duration Module 1 Database Basics, SQL Server Architecture & T-SQL Plan A; B 2 Weeks Module 2 Basic SQL DBA : Backup- Restores, Jobs, Tuning & Security Plan A; B 2 Weeks Module 3 Advanced SQL DBA: Always-On, Repairs, HA DR - Errors Plan A; B 2 Weeks Module 4 Azure SQL Database Fundamentals and Azure Tuning Plan B 1 Week

SQL DBA Training Course Plan Training Module Dur SQL DBA Plan A SQL DBA Plan B SQL DBA Plan C Module 1 Core SQL DBA [HA-DR, AlwaysOn, Errors, Upgrades] 6 W Module 2 Azure SQL DBA [Migrations, HA-DR, PowerShell, Linux] 3 W X Module 3 Power BI Report Design, Cloud & Server Admin 4 W X X

Adopted by the Council of The American Society of Mechanical Engineers, 1914; latest edition 2019. The American Society of Mechanical Engineers Two Park Avenue, New York, NY 10016-5990