Manual Maintenance Plan

Hi All,
Using SQL Server 2008 R2 in multiple servers.
1. Any script (links) for creating a manual maintenance plan? I would like to manually run the script for some databases in multiple servers.
2. It is a way to collect the statistics before and after the maintenance? I would like to show the improvement after the plan running.
3. Am I missing anything in this maintenance plan steps?
- Full Backup of the database.
- Transaction Log Backup.
- Check DB integrity
- Cleanup Backups more than two months
- Rebuild Indexes
- Reorganize indexes
- Shrink databases
- Update Statistics
Thanks for your help in advanced.
Best,

I echo Raju: start at http://ola.hallengren.com
A few more points:
3. Am I missing anything in this maintenance plan steps?
You have too much!
- Full Backup of the database.
- Transaction Log Backup.
T-Log backup is something that should occur regularly through the day. How often depends on your RPO, that is, how much data loss you can accept in case of a disaster. Every 15 minutes may be a good frequency.
- Rebuild Indexes
- Reorganize indexes
One of them. Not both. (Unless you have a table with LOB data that is updated frequently. You need REORGANIZE to get LOB compaction, but you may still want index rebuild, since it makes a more thoroufg work than reorganize. But this is a true edge case.)
And only rebuild/reorganize when there is a need to. (Which is exactly what Ola's scripts perform for you.)
- Shrink databases
No! No! No! Shrinking databases should never be part of any regular maintenance. Shrinking a database file is an exceptional activity that you may perform when you have deleted a lot of data that never will return. Or when a log file has exploded after an
occasional accident. But shrinking on a regular basis is only detrimental. Shrinking introduces massive fragmentation (why it's pointless to rebuild indexes first). And what shrank will only grow again and growing takes time. While autogrow is good in
the sense that it prevent a complete outage when a file is full, it should still not happen during buisness hours but during maintenance windows.
- Update Statistics
If you rebuild an index (not reorganize), statistics are updated as part of that operation, and they are updated with FULLSCAN, and not sampled. Anyway, this is also something that Ola's scripts handle for you.
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • Certain Maintenance Plan not getting scheduled in the background job

    Hi Gurus,
    I am facing an issue here.
    A weekly background job (RISTRA20) runs every weekend and schedules the maintenance plans.
    But we have noticed that some maintenance plans are not getting scheduled. i.e no orders or schedule is getting generated.
    When I run IP30 manually for these plans then the schedule gets generated and orders get called.
    I have checked up the background job and it is running fine.
    Also, i have noticed a similarity in all these plans which are not getting scheduled. There schedule has been restarted (through IP10) at somepoint or the other.
    But i don't see any direct impact of this?
    Can any of you provide some help on this?? Points will be rewarded.
    Thanks and regards,
    Nitin Saini

    Hi Narender,
    Thanks for replying.
    The message number for 'Groups don't match' is ME303.
    I think this does not have anything to do with the restart as i have done further investigation.
    Whenever I run IP30 with sortfield input as AS02*, i get the error as mentioned above for a certain number of maintenance plans while the remaining plans get scheduled.
    If i run IP30 for any other sort fields, it runs fine and i don't encounter the error
    mentioned above.
    If you send me ur email address, i could forward you screen-shots of the issue.

  • How to look for New start Called call for a Maintenance plan

    Hi,
    I need to find out all calls for a maintenance plan of scheduling type- 'New Start' and Status- 'Called'. How to find this using tables.
    For 'New Start' scheduling type probably table field and value is MHIS-TERMA = 'N'. There are different statuse in this table but I am not able to identify the status 'called'. Also what is the field MHIS-ZAEHL(Maintenance package number) for?
    Thanks,
    Vimal

    Taken from the standard IP10 program:
    * possible status combinations
    * TSABR - Scheduling status: planned date called
    * TSVBT - Scheduling status: call outstanding
    * TSENQ - Scheduling status: call horizon not reached
    * TSENM - Scheduling status: stopped manually
    * TSTAT - Sceduling status
    * TSABR   TSVBT   TSENQ   TSENM   TSTAT
    *   X       -       -       -       A     called with order
    *   X       -       -       -       -     called without order
    *   -       X       X       -       -     on hold (TSENQ), due (TSVBT)
    *   -       X       X       -       F     on hold, due and fixed
    *   X       -       -       -       X     skipped
    *   -       X       X       X       -     blocked
    *   -       X       X       X       F     blocked
    *   X       -       -       -       -     LRMDT <> 0, completed

  • IF Auto Update Statistics ENABLED in Database Design, Why we need to Update Statistics as a maintenance plan

    Hi Experts,
    IF Auto Update Statistics ENABLED in Database Design, Why we need to Update Statistics as a maintenance plan for Daily/weekly??
    Vinai Kumar Gandla

    Hi Vikki,
    Many systems rely solely on SQL Server to update statistics automatically(AUTO UPDATE STATISTICS enabled), however, based on my research, large tables, tables with uneven data distributions, tables with ever-increasing keys and tables that have significant
    changes in distribution often require manual statistics updates as the following explanation.
    1.If a table is very big, then waiting for 20% of rows to change before SQL Server automatically updates the statistics could mean that millions of rows are modified, added or removed before it happens. Depending on the workload patterns and the data,
    this could mean the optimizer is choosing a substandard execution plans long before SQL Server reaches the threshold where it invalidates statistics for a table and starts to update them automatically. In such cases, you might consider updating statistics
    manually for those tables on a defined schedule (while leaving AUTO UPDATE STATISTICS enabled so that SQL Server continues to maintain statistics for other tables).
    2.In cases where you know data distribution in a column is "skewed", it may be necessary to update statistics manually with a full sample, or create a set of filtered statistics in order to generate query plans of good quality. Remember,
    however, that sampling with FULLSCAN can be costly for larger tables, and must be done so as not to affect production performance.
    3.It is quite common to see an ascending key, such as an IDENTITY or date/time data types, used as the leading column in an index. In such cases, the statistic for the key rarely matches the actual data, unless we update the Statistic manually after
    every insert.
    So in the case above, we could perform manual statistics updates by
    creating a maintenance plan that will run the UPDATE STATISTICS command, and update statistics on a regular schedule. For more information about the process, please refer to the article:
    https://www.simple-talk.com/sql/performance/managing-sql-server-statistics/
    Regards,
    Michelle Li

  • Maintenance Plan Calls

    Hello, I am wondering if it is possible to have two maintenance or service orders generated for the same date from one maintenance plan?
    For example, I have a piece of equipment that has a regular monthly check, but at certain times this equipment has to have a thorough inspection done and we need to keep track of when the inspection was done and completed.
    There is no set period for the inspection to take place because it can happen at different times.
    Is this possible in SAP? Please respond ASAP

    Hi Charlie,
    Given your requirement, its advised to make a single cycle plan for your equipment with a cycle unit of 1 month(as you have monthly maintenance requirements).You can then schedule this plan for the scheduling period as per your requirement. This will ensure that you have monthly call dates & planned dates. For your sporadic/unplanned inspection requirements, You can use Manual Call option in tcode IP10 (scheduling) which does not affect your regular schedule and is specifically meant for intermediate maintenance activities.
    Its possible to create seperate orders from the same maintenance plan if u have created more than one maintenance item. For example. if u have an equipment whose electrical and mechanical maintenance activities are to be carried out on similar times, btu u have different task lists for both, then you can create a two maintenance items having their own task lists but will be scheduled as per the cycle/strategy defined in the plan.
    Hope this gives some clarification..

  • Maintenance Plans

    Does anyone know if it is possible to create one Maintenance Plan for one piece of equipment that will create two scheduled visits for exactly the same date.
    Thanks Paul

    hi paul,
    as said before have a look at hirearchy options for packages in strategy based plans and in IP10 u can also use the option of creating manual calls without affecting your normal scheduling .... you can create a manual call for generation of call object on  any date and mentioning the package you want to include in this date and for 09 month as below u can have a manual call ....  remember call horiozn will not be considered for manual calls ...
    regards
    pushpa

  • SQL Server Maintenance Plan Issue

    SQL Server Version:
    Microsoft SQL Server 2005 - 9.00.5000.00 (Intel X86) 
    Dec 10 2010 10:56:29 
    Copyright (c) 1988-2005 Microsoft Corporation 
    Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
    Issue : Maintenance Plan - DB backup plan & TRN Log backup plan skipped / some times not deleting the old backup files.
    Error : Failed to retrieve date for this request (Microsoft.SqlServer.SmoEnum)
    Additional Informaiton
    An exception occurred while executing a Transact-SQL statement or batch.
    (Microsoft.SqlServer.ConnectionInfo)
    A Server error occurred on the current command.
    The results, if any should be discarded (Microsoft Sql Server)
    Any experts can help me to resolve this issue.
    Thanks
    drmrpush
    MRVSFLY

    Hello,
    Same issue reported here:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/601fd83c-c49f-4bf8-b69d-95431197652d/maintenance-plan-is-not-opening-on-sql-server-2005-sp2?forum=sqlkjmanageability
    Please check solution on :
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/3e53ba8b-ea23-4629-98db-43c80ba9888e/cannot-save-maintenance-plans?forum=sqltools
    This problem occurs if some of the stored procedures while installing SP2 has not been applied successfully. So manually run the script below and it may resolve
    your issue. It resolved ours and we went throught exact same process of re-installing several times.
                    1)     
     First go to the folder Install . The default location is this = “C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Install “ .
    Please post back still your issue not resolves.
    2)     
    Then in this folder find this “sysdbupg.sql” .
    3)     
    Please open this script with a nodepad.
    4)     
    Then copy the
    whole script and then paste it in the Query window of the Management studio.
    5)     
    Then execute this script.
    6)     
    Once this script has been successfully executed, The issue should be resolved.
    Regards, Pradyothana DP. Please Mark This As Answer if it solved your issue. Please Mark This As Helpful if it helps to solve your issue. ========================================================== http://www.dbainhouse.blogspot.in/

  • Calibration Order from maintenance plan

    Hi All,
    We have assigned inspection point 300 in task list. And inspection type 14 is assigned to the order type.
    When I create the order manually by IW31 then I am getting the inspection lot but when creating the Maintenance Plan with the same order type and task list, the lot is not generated.
    Pls suggest  is there any QM or PM setting missing ??
    Thanks,
    Sanjay

    Dear Sanjay,
    Make sure you have assigned the inspection characteristic and sampling procedure for your individual task list operations.
    Please do confirm the same and do reply.
    Regards,
    Chintan

  • SQL Server Maintenance Plan does not run DEL command in .BAT

    Hello,
    I have a T-SQL Statement task in my Maintenance Plan that runs a .BAT file and it runs OK when manually executed.  The .BAT file has a del d:\backups\*.* command in it. However, when the plan runs automatically at a scheduled time, the .BAT file does
    not delete files.  Could this be a permissions issue?
    Paul

    Hi Paul,
    This looks like a permission issue.  Make sure the account SQL instance is running has delete permissions on the folder from which you are trying to delete and also make sure the account has execute permission on that batch file.
    Thanks,
    Bhanu

  • Mass Re-start / Re-schedule of Maintenance Plan

    Dear Sirs,
    I have created a BDC which runs in the background at the end of every month.
    This BDC creates a Strategy Maintenance Plan (IP42), the moment a new equipment is installed in the system & it automatically gets scheduled (IP10) as per the installed date.
    After a while we came to know that the BDC was not taking the proper start cycle date & hence the Maintenance Plans which were created were scheduled on the wrong date. We have already solved the problem & have corrected the coding.
    But we need to re-schedule all the earlier wrongly scheduled maintenance plans & delete the previous history.
    When we tried to re-start the cycle manually through IP10 it was allowing us to delete the earlier records as well as to re-start the cycle.
    But as there were thousands of Maintenance plan to be re-started, we planned to create a LSMW or BDC to do the same.
    But while running the LSMW / BDC recording we are not able to delete the earlier records & those are showing as skipped.
    We want the earlier records to be deleted & to re-start the new cycle.
    Can you please tell me something that can be done through any std transaction like IP30 etc.
    Regards,
    YVK.
    Edited by: Yogesh Khamkar on Mar 5, 2010 1:13 PM

    Hi Goswami,
    I am facing the same problem while creating recording for restarting scheduling maintenance plan in IP10 with  LSMW , I am not getting the option screen as given below to delete or skip the call
    as result I am not getting any field in  " Maintain Field mapping and conversion rule"
    Please help me for same. As I have scheduled 1000s of plan one month ago but client need to reshedule all with new start of cycle.
    regards,
    Raj

  • Changing Cycle Modification factor in a maintenance plan.

    On the basis of MTBF of an equipment, Can i change cycle modification factor of any maintenance plan.i.e. suppose MTBF of an equipment if reaches to 3 months then cycle modification factor for all preventive plan should get multiplied by 1.5 automatically.
    please suggest on this thanx
    ravi

    hi
    in standard it will not automatically change ,you have to make it manually .
    another workaround is create it like test equipment and follow the calibration process ,while making the usage decision you can specify the modification factor.
    regards
    thyagarajan

  • Counter Base Maintenance plan.

    Hi all,
    I had created counter base maintenance plan, speciefied equipment,in equipment maintained measuring point.
    Then I created measuring point document, in this I had put 50 volt as my reading & click on SAVE,
    then system immediated give masage create noti/service order.
    if Yes then it create service order.
    Now my question is is there any need to shedule maintenance plan?
    Please tell me process of counter base maintenance plan.
    kapil

    Hi
       Maint plan for coutner
               Create the maintenance plan with maintenance strategy(IP11) which suits the performance parameter. Assign proper maintenance item to maintenance plan.
    If only one measurement point is created for technical object then it will be automatically picked up otherwise select appropriate among the available once. Set the scheduling parameter according to requirement & specify the start reading. Start reading is in reference to which maintenance plan starts scheduling.
    Example: Maintenance cycle is 90 run hrs., Start reading is 6 hrs and annual estimation given in measurement point = 360 Hrs (1hrs/day). Scheduling period = 365 day. Current Measuring point reading = 1 hrs on 1st Jan 06.
    Schedule plan on 1st Jan 06.
    Call no.     @Hrs     @Date
    1     6+90=96     1st April 06
    2     96+90 = 186     1st July.
    System schedule call date based on annual estimation and its keep on shifting as counter reading increases with time. System will trigger the call object on schedule date even if measurement reading will not reach the specified value.
    Scheduling of maintenance plan
    Once maintenance plan is created it needs to be scheduled at regular interval. Single plan can be scheduled by IP10 and Multiple plan by IP30. (Called Deadline monitoring) This can be done manually or batch job can be created.
    hope this will help. also please refere saphelp.com for further info
    regards
    krishna jois

  • Tolerance in maintenance plan.

    Dear All,
    I Am little bit confusing what is 1)shift early factor 2)Tolerance 3)shift late factor 4)Tolerance. can anybody explain me these with an example?
    Regards,
    varma

    Hi Varma,
    1. Shift early factor is the percentage of shift time if we call the WO earlier than it's called date. Usually by using manual call to the scheduled WO. The next scheduled WO will be shift early based on percentage input.
    2. Tolerance (the first one) is the percentage of which we can tolerate to call scheduled WO earlier
    3. Shift late factor is the percentage of shift time if somehow the scheduled WO is hold (usually due to the required completion flag is tick, then the scheduled WO will be hold until the previous WO is closed). The next scheduled WO will be shift late based on percentage input.
    4. The tolerance (the second one) is the percentage of which we can tolerate to late WO callled.
    Example:
    Maintenance plan have parameter:
    - Shift early factor : 90%
    - Tolerance: 10%
    - Shift late factor: 80%
    - Tolerance: 10%
    - Cycle period: 1 month (30 days)
    - 1st WO date: 1 - 04 - 2012 (call date); 3 - 04 - 2012 (plan date)
    - 2nd WO date: 1 - 05 - 2012 (call date); 3 - 05 - 2012 (plan date)
    - 3rd WO date: 1 - 06 - 2012 (call date); 3 - 06 - 2012 (plan date)
    in that case, the tolerance parameter will be 10% x 30 days = 3 days
    If we call the 1st WO 1-3 days earlier, the 2nd and 3rd WO will not shifted.
    If we call the 1st WO 4 or more days earlier, then the 2nd and 3rd WO (Call date and plan date) will shifted (90% x number of days earlier)
    If the required completion is tick, and the 1st WO hasn't been TECO until 1 or 2 or 3 May 2012, then the 2nd and 3rd WO will not be shifted (the late not more than 3 days)
    if the required completion is tick, and the 1st WO hasn't been TECO until 4 or more days on May 2012, then the 2nd WO will be called immediately after the 1st WO is TECO, and the 3rd WO (call date and plan date) will be shifted (80% x number of days late).
    Hope this is understandable and useful.
    Regards

  • Copy Planning Plant to Sort field in Maintenance Plan

    Hi All,
    Is there any User Exit User exit is available to Copy Planning Plant to Sort field in Maintenance Plan.
    Regds
    Vinit

    I think it is not possibe as the sort field in maintenance plan is a customizing field. you can not enter any value in the sort field but you in SPRO first you have to maintain the values  for sort field.
    The sort field in order and notification, there you can copy the planning plant or anything else as they are manual input fields

  • Maintenance plan report.......

    hi all,
    please any one help me to solve this issue....
    my client wants ... A report to show all preventive maintenance objects call/planned dates of maintencenance plan, which were issued,completed and not completed with status issued,completed and not completed.....for the last 12 months.....
    so can any one share the procedure means from which table i can get the info to solve this issue so that i can do customized report with the help of ABAP coding..
    thanks in advance.........
    regards
    gunnu

    Hi,
         Check the below tables :-
    MHIO     Call Object from Maintenance Order
    MHIS     Maintenance plan history
    MMPT     Cycle definitions and MeasPoints for MaintPlan
    MMPX     Maintenance cycle short texts
    MPLA     Maintenance plan
    MPOS     Maintenance item
    T351     Maintenance strategy
    T351P     Maintenance packages
    T351T     Maintenance strategy texts
    T351X     Maintenance strategy package texts
    T399G     Maintenance Plan Sort Field
    T399G_T     Descriptions for Maintenance Plan Sort Fields
    T399P     Maintenance item category parameter
    T399W     Maintenance plan type parameter
    T399W_T     Maintenance plan category descriptions
    VIMPOS     Maintenance Item (view)
    1. You have different status at MP Call object level , Called , Completed, Hold, fixed, skipped, Manual,
    2. For MP :- CRTD,Inactive, Locked, Deactivated etc
    3. You need to differentiate via Maintenance Plan Category
    4. Call Object Status
    5. Maintenance Plan status
    6. Time period
    etc
    regrds
    pushpa

Maybe you are looking for

  • Hello everybody, Problem with Two panel in a Frame

    This is my first mail in this forum.I'm trying to learn java myself & have a problem in adding more than one panel in a JFrame. i should be able to add one panel which occupies 3/4 of a frame and another panel occupies the rest. Thanx in advance for

  • 11.1.1.4.0 - inline popup: disabling the default cancellation action...

    Hi, I read in Oracle JDeveloper and Oracle ADF 11g Release 1 Patch Set 3 (11.1.1.4.0): New Features and Bug Fixes: "Dialog Framework: Capability of disabling the default cancellation actions applied to the entire web application for full page task fl

  • IPhoto 5 - missing images

    Today I went to down load some new photos off my Rebel XTi into iphoto. Everything went smooth except when iPhoto was done and the Library opened only the newly imported photos were there and the old photos were represented by their shadow boxes and

  • Adobe after effect/bundle question

    Hello! I am new to the Adobe community and i just have a quick question. I am looking into buying Adobe after effects and I don't remember but I think it comes in a bundle. After I buy it and it goes onto my pc is that it or can I put it on my new pc

  • Where the certification or a course will be defined

    Hi all, Can any one tell where the classes (or) Courses and certifications will be defined. whether the course or certification is restiricted to one operating unit. where we can define a course or certification. Please help me, Thank you.