Jobs to do after restoring 2000 db to 2008 R2

  • Hi - I'd appreciate a sanity check to a list of jobs I intend to do after a restore of a 2000 db to a new 2008r2 server.

    1. restore 2000 db using Redgate Backup to new 2008r2

    2. change compatibility level to 2008

    3. set appropriate database file sizes/autogrowth/max size settings

    4. run DBCC UPDATEUSAGE

    5. run ola hallengren's 'Index and Statistics Maintenance' script for the user db's

    6. run ola hallengren's 'Integrity check' script for the user & system db's

    I'm not sure if I should run the DBCC updateusage before or after the index & statistics job -

    I found this article http://sqlserverplanet.com/dba/using-dbcc-updateusage%5B/url%5D which suggests that the statistics should be updated BEFORE running the updateusage - does it matter?

    any other tips would be greatly appreciated...

    many thanks...

  • BEFORE you update, run DBCC CheckDB and DBCC CheckCatalog. If there are any errors, do not go further.

    After, checkDB with data purity, update all statistics, update usage. Order doesn't really matter, but consistency checks first are best.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • OK - thanks Gail,

    so thats...

    1. DBCC CHECKDB

    2. DBCC CHECKCATALOG

    3. CHECKDB WITH DATA PURITY (Ola Hallengren's SQL Server Integrity Check)

    4. UPDATE ALL STATISTICS (Ola Hallengren's SQL Server Index & Statistics Maintenance)

    5. DBCC UPDATEUSAGE

    No.1 and No.3 seem to be duplicating - could I get away with just running no. 3 first?

    thanks,

  • Please read what I wrote

    CheckDB and CheckCatalog BEFORE the upgrade and if there are any errors do not proceed!!!

    Then, after the upgrade CheckDB with data purity, update usage, update all statistics with fullscan

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • My apologies- Got it !

    thanks for your help

  • Also run these

    alter database dbname set page_verify checksum -- torn_page_detection

    -- upgrade creates a schema for all users and sets this as default, use following to create SQL to

    -- modify users default schema to dbo and then run in a new window

    -- if SQL 2000 objects were not owned by dbo modify script accordingly

    -- SQL2000 always checks objects by username.object first, then checks dbo.object if not found,

    -- so this check can be avoided and improve performance by setting default_schema to dbo so it is checked first,

    -- however if all objects are owned by the user or all or some are owned by user and object not qualified with

    -- owner in SQL then default_schema should be left at user. Only testing may prove this.

    set nocount on

    select 'alter user '+ name+ ' with default_schema = dbo' from sys.sysusers

    where uid > 4 and isntgroup = 0 and issqlrole = 0 and isapprole = 0

    order by name

    -- now drop all the user schemas created

    select 'drop schema ['+ name+ '] ' from sys.sysusers

    where uid > 4 and issqlrole = 0 and isapprole = 0

    order by name

    ---------------------------------------------------------------------

  • start it all running the Upgrade Advisor for SQL2008R2!

    This free tool will notify for potential issues.

    have a look at Using Upgrade Advisor to Prepare for Upgrades

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply