September 27, 2013 at 4:52 am
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
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...
September 27, 2013 at 6:12 am
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
September 27, 2013 at 9:10 am
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,
September 27, 2013 at 9:54 am
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
September 27, 2013 at 10:20 am
My apologies- Got it !
thanks for your help
September 27, 2013 at 10:34 am
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
---------------------------------------------------------------------
September 27, 2013 at 10:37 am
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