Database updates statistics maintenance plan issue.

Hi team,
We are configured one job through maintenance plan that job name is “database update statistics” and database size is 280 Gb, this job executing 13 to 15 hours but job was not finished  still it’s continually running.
This same job I am running through below script it’s executing within 2 hours.
Use database
Go
Exec sp_updatestats
What is the main problem if this maintenance plan.
Note: on this server no jobs and no traffic, only abc_update subpaln1 Job.

Hello,
Updating stats for whole database which is 280 G will always result in problem.It is better to run update statistics for tables and indexes which are changed frequently.
Now to your question few points which sp_Updatestas list in BOL
http://technet.microsoft.com/en-us/library/ms173804.aspx
sp_updatestats updates statistics on disabled nonclustered indexes and does not update statistics on disabled clustered indexes.
sp_updatestats updates only the statistics that require updating based on the rowmodctr information in the sys.sysindexes catalog view, thus avoiding unnecessary updates of statistics
on unchanged rows.
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

Similar Messages

  • Database update statistics

    Hi
    I am in the middle of ECC 5.0 installation (IDES). At the step 29 database update statistics, system stops giving error
    CJS-00288  Could not update database statistics. DIAGNOSIS: Command brconnect -c -f crsyn -o SAPDEV returned 128, which is not a success code. SOLUTION: See brconnect.log for details.
    brconnect log is empty.

    Hi Sandhya
    Check the Link:  [Link |http://sap.ittoolbox.com/groups/technical-functional/sap-basis/ides-r3-47-installation-error-1701550]
    and SAP notes 593582 and 145777
    Edited by: Anindya Bose on Dec 10, 2009 2:38 PM

  • 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/

  • PeopleSoft Database Update Statistics

    I am trying to find out what is the best practices for implementing the Update statistics on Psoft Database. Any help or documentation regarding will be a great help
    I am looking for
    what is the best practice for update statistics on oracle , Intervals , Tables , do we need to include any custom script to generate and include all big tables.

    I was the one who designed the pscbo_stats package to leverage the statistics collection techniques used in EBS and Seibel. (Mr. Sierra was the wizard who coded it.) I just noticed this thread and wanted to comment.
    If you are using the pscbo_stats, the gather_schema_stats() procedure will by default gather only stale statistics, so it can be run regularly. I suggest weekly. You can follow the contents of the pscbo_log table for historical data for all (non-dynamic) stats gathering activities.
    If you find there is a table that constantly stale and forcing you to think that the schema statistics should gathered more often, you may want to have two schedules - one weekly for schema, and one more often (daily?) to capture the more volatile objects excepting, of course, those that are already dynamically sampled.
    There may be objects that are volatile enough that they should be added to the Stage Table Exception table. (see the stage_table_ins() procedure) We added that feature to configure dynamic sampling to work on volatile table - tables that are not working storage for COBOL and App Engine but are so often stale that they should be dynamically sampled.
    I find that there are a few transactional tables that work well when dynamically sampled. For example, PSTREESELECT* tables can be problematic if they are dynamically rebuilt by a nVision report book - the end points can get stale quickly. They may be a good candidate for dynamic sampling.
    Lastly, I am very interested to know user experience with the pscbo_stats package. Please post your comments to the communities.oracle.com forum for "Install/Upgrade PSFT".

  • Maintenance Plan Issue in SQL 2005

    Hi All,
    In SQL 2005 server maintenance plans are not active. If we execute maintenance plan manually, it will show as success but actually it is not running and history also not recording.
    Server Details:
    Product version: 9.00.1399.06
    Product Level: RTM
    Product Edition: Developer Edition
    OS: Windows server 2003 with SP2, Enterprise Edition
    We are able to create maintenance plans, also SQL agent jobs are running fine.
    But maintenance plans are not working.
    Can anyone please suggest, what will be the problem.
    Thanks in advance.

    Hi Ashwin,
    Thanks for your immediate reply.
    Sure will apply SP4 asap.
    Maintenance plan created to take backups, when I right click and execute maintenance plan, it will show as success but backups are not happening, also in view history nothing is recording.
    Actually no maintenance plan is working on this server.
    If I modify any maintenance plan while saving modifications, it is showing bellow message. But changes are reflecting in maintenance plan
    Message:
    Guid should contain 32 digits with 4 dashes ( xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx)
    Ex: Right clicked on backup maintenance plan and selected modify.
    then added one more database name in backup list and while saving changes, we are getting above message.

  • Maintenance Plan Issue

    Dear All,
    I have maintained Strategy with Offset as 6 12 36 76 & 84 Months & no cycle length for the same .
    As i wanted to get order only for specific months , now as i schedule the plan the system is creating order for past dates dates also which i don't want .
    Tasklist Key Date - 01.01.2006 as we want to upload back date data.
    E.g Start date 01.01.2008
    1     29.06.2008                                   HF     New start  Save to call
    2     26.12.2008                                   Y     Scheduled  Save to call
    3     16.12.2010                                   3Y     Scheduled  Save to call
    4     25.11.2014     25.11.2014                 7Y     Scheduled  Hold
    Please suggest what setting i have to change.
    Thanks & regards
    Ajay

    Hi,
    1. If u dont want past dates then u can enter restart and enter present /future date ..in start date of the Maintenance Plans ..,IP10 ..
    2. If ur using offset then on scheduling system first calculates planned dates as per offset cycle for each package then goes to the cycle length of the packages .
    3. You can use Hirerachy in strategies in IP11 if u want to avoid unwanted calls , Like 6month call if u do not want to generate on 12th month then hirerachy will be helpful , in this for 12th month u can H2, 6th -H1,same for other packages also
    4. If ur looking for something different u can explore user exit :-IPRM0002 Determine planned date info for maintenance plan
    regards
    pushpa

  • 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]

  • 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

  • Database maintenance plan - recommendation

    Hi
    I have an existing mm plan in one of the server which contain 
    1.Check integrity 
    2.Shrink 
    3. Reorganize 
    4.Rebuild 
    5.Update stats 
    Does both Reorganize and Rebuild required in the same mm plan ? Only Rebuild will optimize the indexes ? 
    Currently re-org is taking 2 hrs to complete where Rebuils only 20 min . 
    Thanks  

    2 Shrink -
    The second option Shrink is not recommened in a maintenance plan. Shrinking introduces fragmentation and causes autogrowth unnecessarily. Shrinking in not a good for either data file or log files. Shrinking occassionally to free up space which got increased
    exponentially due to some specific operation is fine. But shrink in a Maintenance plan is a very very bad idea. Check these blogs
    http://www.brentozar.com/archive/2009/08/stop-shrinking-your-database-files-seriously-now/
    http://sqlblog.com/blogs/aaron_bertrand/archive/2009/07/27/oh-the-horror-please-stop-telling-people-they-should-shrink-their-log-files.aspx
    3 Reorganize/4 Rebuild
    Both are not required. Either one is enough. A better approach is to find the fragmentation and then decide either to reorganize or rebuild. You dont have to do this for all indexes. You only need to reorg/rebuild if the fragmentation is higher. General
    rule of thumb
    Fragmentation between 10 % - 30 % - Reorganize
    Fragmentation above 30 % - Rebuild
    Also you only need to do this if the page count is above 1000.
    I would recommend you to take a look at Ola Hallegrans maintenance solution rather than using a Maintenance Plan
    https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html
    https://ola.hallengren.com/sql-server-integrity-check.html
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • SQL 2000 Database Maintenance Plan drop downs for days, weeks, months, not displaying

    When setting up a SQL 2000 Database Maintenance Plan the drop down for Remove files older than is not populating with hours, days, weeks, or months. It is just blank. The version is  Microsoft SQL Server  2000 - 8.00.2039 (Intel X86)  
    May  3 2005 23:18:38   Copyright (c) 1988-2003 Microsoft Corporation  Desktop Engine on Windows NT 5.2 (Build 3790: Service Pack 2). Is there a fix for this issue?

    This also works. All the credit goes to a user named eyechart.  Great directions provided as well.
    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=47575
    sqlmaint.exe
    was missing from MSDE 2000, but that was fixed in SP1 I think. Since this is SP3
    you probably have a missing registry value for the backup directory.
    I
    had to fix a similar problem last year on a bunch of laptops. They were all
    missing a registry value. Anyway, here is the fix:
    1. Fire up regedit and
    look under HKLM\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer
    2. Ensure you have
    a string value called BackupDirectory. The value for this should be the path to
    your backup dir. The default value is C:\Program Files\Microsoft SQL
    Server\MSSQL\BACKUP
    btw, this fix assumes you have a default instance
    installed. A named instance will have slightly different registry location and
    filesystem path.
    -ec
    Edited by -
    eyechart on 03/25/2005 21:04:27

  • Update was terminated error while scheduling maintenance plan

    HI Friends,
    I created a maintenance plan.I scheduled the order and i saved.
    Now when i tried to see the schedule i am getting a message
    "Update was terminated"
    the detailed error is
    Update was terminated
    System ID....   DEV
    Client.......   XXX
    User.....   XXXXX
    Transaction..   IP10
    Update key...   49041E2C02935CCCE10000000AFA0209
    Generated....   30.10.2008, 17:22:18
    Completed....   30.10.2008, 17:22:19
    Error Info...   00 671: ABAP/4 processor: SAPSQL_ARRAY_INSERT_DUPREC
    Can anyone tell me why this error is coming and how to rectify.
    Thanks in advance
    Vivek
    Edited by: vivek mankad on Oct 30, 2008 1:38 PM

    Vivek,
    Talk to your ABAP/Basis team
    PeteA

  • Locking issue in workflow with conseutive database update

    Dear Workflowers,
    We are in ECC 5.0 and release 6.40. We went live for SAP in February and we are currently using workflow in PLM module for DMS and ECM.
    We have been facing this locking issue randomly happened in our production and quality system. The error from workflow log is "Document XXXX is locked by WF-BATCH". I have two steps in workflow one is to update the document user( from originator to editor with custom BO "zdraw" new method "setuser") and the next step is to update the document status( BO "zdraw" "setstatus" method which inherited form standard BO "draw").  
    I have tried to use "wait" (1st try) , statements  "BAPI_DOCUMENT_ENQUEUE", "BAPI_DOCUMENT_DEQUEUE" (2nd try) and  "Commit work and wait" (3rd try) to add one step in between, however the issue remains.
    The other question I had was we need to write "commit work" when we use BAPI to perform database update in the ABAP program. But I don't see "commit work" in the method of BO(for example "setstatus" in "draw" object) which performs database update. How does workflow perform DB update properly without "commit work" by referencing standard method?
    Could anyone please share your expertise with the issue I am facing?
    Thank you in advance,
    Merta

    Hi Merta,
    Regarding COMMITs: theoretically you should never use COMMIT statements because the Workflow runtime handles that - the transaction of executing the task is the LUW, not your method. By adding COMMIT WORK you are also committing the workflow task execution.
    In practice however there are the occasional exceptions where something just won't work without an explicit commit - but the theory remains that you should always try it without.
    Regarding your problem, the one way to be certain that a DB update is complete is to use a terminating event - either through change documents or status management.
    Failing that, you can write a wrapper method for SETSTATUS that does something like:
    do 10 times.
      try to lock it.
      if success.
        unlock.
        swc_call_method self 'SetStatus' container.
        set success flag.
      else.
        wait up to 3 seconds.
      endif.
    enddo.
    if no success, raise exception.
    Cheers,
    Mike

  • Maintenance plan for SQL Server 2012 Database in AlwaysOn Availability Group

    Hi all,
    I need assistance creating a maintenance plan that will backup a databases logs in order to prevent them from filling up the drive they are located on. I have looked at some blogs but they do not specifically show how this is done.
    My database is in an AlwaysOn Availability Group.
    Thank you very much for your help!
    Jake

    Hi all,
    I need assistance creating a maintenance plan that will backup a databases logs in order to prevent them from filling up the drive they are located on. I have looked at some blogs but they do not specifically show how this is done.
    My database is in an AlwaysOn Availability Group.
    Regular maintenance plan would work. Only thing to remember is that when you create log backup plan, there is a checkbox which says whether it should honor backup preference or not.
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • Issue in displaying Maintenance Plan Category.....

    Hello,
    I have created a maintenance plan category ZQ , copying PM category in the golden client, and transported it to test client. This customized plan category is not populated in the transaction IP41 in both servers, golden client and test client. whereas this value is populated in list edit(IP15) maintenance plan category. I have checked in SPRO setting also and is available.
    Path of config:
    spro>plant maintenance and customer service>set maintenance paln category & assign number range.
    Is there anything missing?

    In the configuration have you set the call object correctly. Call object must be a PM object for it to appear in IP41, but can be anything to appear in IP15.
    I have replicated this and cannot find any issues - ZQ is available in both IP41 and IP15 transactions, call object used - Maintenance and Service orders

  • Update Statistics for the database MS-SQL

    hi all ,
    I want to run the statistics programmatically ( update statistics ) and our database is MS-SQL. Can any one tell me which is the suitable function module to do the same.
    Thanks,
    Ram

    If you did not find this - I found the function module 'update_stats'.
    How this helps
    Or maybe you found somthing else?

Maybe you are looking for

  • Os x installation errors please help

    Hi i appologize from now if i posted this in the wrong place but i have looked around and cant find anything to help me out i have a 15inch macbook pro with no operating system at all. It had 10.5.7 version of operating system x but my sisters friend

  • Iphoto 6  & image resolutions

    what format, jpeg, tiff, psd is the best when importing photos into iphoto 6 from photoshop cs? does the image size of a photo in photoshop stay the same in iphoto once its imported? where do i find the resolution for am image in iphoto? what resolut

  • BlackBerry App World ID Installation Fails - error 80003

    For the past 2 weeks I have been trying to access BB App World. However, I cannot connect to the App World Server because it gives me a 80003 error when trying to connect.  Please let the world know what is the problem....

  • Auto filling

    Is it possible to get auto filling on browser?

  • Doubts about SLD

    Hi ,Experts:      As you know ,SLD is a server runing on J2EE engine. and i have to set the parameter in J2EE(Data Suplier)in order to send data changed to SLD server (Bridge),right?     my first doubt is that , why I don't need do the same job (set