Sie sind auf Seite 1von 27

SQL 2012 Upgrade

Guide

Parikshit Savjani
Sr. PFE, Microsoft
SQL 2012/2008R2
Upgrade Planning

2
SQL 2012
Upgrade
Flowchart

3
Pre-Upgrade Tasks &
Considerations

4
SQL 2012 Upgrade Path SQL 2008 R2 Upgrade Path
Allowable
Upgrade Source Instance Minimum Version Source Instance Minimum Version
Paths requirements requirements
SQL Server 2000 Not Supported SQL Server 2000 SP4 is required.(8.00.2039)

SQL Server 2005 SP4 is required. (9.00.5000) SQL Server 2005 SP2 is required. (9.00.3042)

SQL Server 2008 SP2 is required. (10.00.4000) SQL Server 2008 RTM is required. (10.00.1600)

SQL Server 2008 SP1 is required (10.50.2500)


R2

5
SQL 2012 Upgrade Path SQL 2008 R2 Upgrade Path
Allowable
Upgrade Windows OS Minimum Version Windows OS Minimum Version
Paths requirements requirements
Windows 2003 Not Supported Windows 2003 SP2 is required

Windows 2008 SP2 is required Windows 2008 SP2 is required

Windows 2008 RTM is required Windows 2008 RTM is required


R2 R2
Windows 2012 RTM is required Windows 2012 RTM is required

6
• Is the current SQL Instance version (Service Pack level) supported
for upgrade.
Pre-Upgrade • Is the current Windows OS version supported for upgrade
Consideratio • Is the Application supported & tested on the latest version of SQL
ns Instance.
• Do we have test environment or cert instance where we can test the
upgrade first?
• Do we need to upgrade the complete instance (including All
Databases,SSAS,SSRS etc) or partial instance (Few Databases)
• Do we have multiple instances of the server & all needs to be
upgraded (In case of multiple instances of the Server, the shared components might be upgraded
to latest version impacting the other instance)

• Do we also need to upgrade the Edition of the SQL instance (For e.g
Standard to Enterprise etc)

7
SQL Best Practice Analyzer

Pre-Upgrade • Run SQL BPA to identify if there are any issues or deviation
Tasks from the best practice which needs to be fixed first before
upgrade

• You can download the SQL Server 2005 version of BPA at the SQL Server 2005 Best Practices
Analyzer
• You can download the SQL Server 2008 R2 BPA at the SQL Server 2008 R2 Best Practices
Analyzer

8
SQL Upgrade Advisor

• Upgrade Advisor analyzes objects and code within legacy instances and
Pre-Upgrade
produces reports detailing upgrade issues, if there are any, organized by
Tasks
SQL Server component.
• The resulting reports show detected issues and provide guidance about
how to fix the issues or work around them
• Fixing all the issues identified by SQL Upgrade Advisor will ensure
smoother upgrade & help identify known issues with upgrade.
• With fixing the issues identified, if we proceed with the upgrade, the
upgrade will fail.

9
Download the latest version of SQL Upgrade Advisor

Microsoft® SQL Server® 2012 Upgrade Advisor


SQL Upgrade X86 Package (SQLUA.msi)
X64 Package (SQLUA.msi)
Advisor Pre- Microsoft® SQL Server® 2008 R2 Upgrade Advisor
requisites X86 Package (SQLUA.msi)
X64 Package (SQLUA.msi)
IA64 Package (SQLUA.msi)

Requirements for running Upgrade Advisor are as follows:


• Windows Vista SP1, Windows 7, or Window Server 2008 R2
• The Microsoft .NET Framework 4 (the same version of the .NET Framework included with
SQL Server 2012 and Visual Studio 2010)
• Windows Installer 4.5
• Pentium III-compatible processor or a later version, with a processor speed of at least 500
MHz
• 15 MB of available hard disk space

10
Choosing the right
Upgrade Strategies

11
Upgrade In-place Upgrade Side By Side Upgrade
Strategies
Side by Side Upgrade involves a new
Using the SQL Server 2012 Setup program
installation of SQL 2012 instance along
to directly upgrade an instance of SQL
side with legacy SQL 2005\SQL 2008
Server 2005, 2008, or 2008 R2. The older
instance on the same server or a separate
instance of SQL Server is replaced.
server

12
Pros
In-place • Easier & faster, especially for small systems, because data and configuration
upgrade options do not have to be manually transferred to a new server.
Strategy • Automated process.
• Upgraded instance has the same name as the original.
• Applications continue to connect to the same instance name.
• No additional hardware is required because only the one instance is involved.
However additional disk is required by Setup
• Takes the least deployment team resources.

13
Cons

In-place • You must upgrade the whole instance or a major SQL Server component. For
upgrade example, you cannot directly upgrade a single database.
Strategy • You must inspect the whole instance for backward-compatibility issues and
address any blocking issues before SQL Server 2012 Setup can continue.
• Upgrading in place is not recommended for all SQL Server components, such as
some SQL 2000 DTS packages.
• Because the new instance of SQL Server 2012 replaces the legacy instance, you
cannot run the two instances side by side to compare them. Instead, you should
use a test environment for comparisons.
• Rollback of upgraded data and the upgraded instance in an in-place upgrade
can be complex and time-consuming

14
Pros

Side By Side • It gives more granular control over which database objects are upgraded.
Upgrade • The legacy database server can run alongside the new server. You can
perform test upgrades and research and resolve compatibility issues
without disturbing the production system.
• The legacy database server remains available during the upgrade,
although it cannot be updated for at least the time that is required to
transfer data.
• Users can be moved from the legacy system in a staged manner instead
of all at the same time.
• Even though your system might have passed all validation and
acceptance tests, a problem could still occur. But if a problem does occur,
you will be able to roll back to the legacy system.

15
Cons

Side by Side • A side-by-side upgrade might require new or additional hardware


resources.
Upgrade
• If the side-by-side upgrade occurs on the same server, there might
be insufficient resources to run both instances alongside one another.
• Applications and users must be redirected to a new instance. This
redirection might require some recoding in the application.
• You must manually transfer data—as well as security, configuration
settings, and other supporting objects—to the new instance.
• Synchronization of data from the legacy server to a new server will
be required to capture data modifications that occurred to the legacy
system while setting up the new system and its original copy of the
data.

16
Decision Matrix

In Place Upgrade Side by Side Upgrade

Easier & Faster Easier & Faster Time consuming & involved manual effort

Rollback
Very Complex Easy as legacy instance is up & running
Strategy

Manual Effort Minimum if upgrade is successful More to transfer data, security, jobs etc

Additional
Not Required Additional Storage or Server required to install new instance
Hardware

Downtime
Less if upgrade is successful but is very large if rollback is executed Time required to transfer data
Required

Preferred for Small databases & less critical applications. Very Large Databases & Databases with Replication, Mirroring & Log Shipping
Testing the Upgrade
Strategy

18
Testing is the essential step especially in an in-place upgrade strategy to identify
the possible bottlenecks, shortcomings which we can face while performing an
upgrade.
Testing
• To test an in-place upgrade, we need to ensure that test (Cert) SQL Instance is
near duplicate replica of the Production instance in terms of database, database
properties, server configuration & application components which can connect to
the cert environment similar to production.
• To test a side-by-side upgrade, we need to install a new instance of SQL
2012/2008R2 on the cert/test environment and transfer all the databases, logins,
jobs, linked servers, Maintenance Plans, SSIS packages, SQL Configuration settings
to the new server.
• Document any issues\bottlenecks identified during testing.
• Document the time for each steps involved in the backup.
• Following the Upgrade on the test environment, ask the application team to fully
functionally test the application

19
Downtime
Requirements &
Rollback Strategy

20
In-place Upgrade

Downtime
The Downtime requirements for In-place upgrade would be minimal if ran
Requirements •
successfully and can be best estimated from testing.
&
• The rollback strategy for in-place upgrade involves uninstalling & cleaning up the
Rollback new SQL instance, reinstalling the previous SQL instance upto the latest service pack
Strategy level followed by restoration of all the system & user databases.
• Considering the complex rollback plan for in-place upgrade, the overall downtime for
in-place upgrade might be much higher than side-by-side upgrade if the rollback
plan is executed.
• Rollback Plan time must be accounted in the overall Maintenance window of the
upgrade

21
Side-by-Side Upgrade
• The downtime requirements for Side-by-Side Upgrade would be higher since it
Downtime involves transferring or moving the data from one instance to another.
Requirements • The downtime can be reduced by configuring database mirroring between the legacy
& & new SQL instance & switchover during the maintenance window.
The rollback strategy for side-by-side upgrade involves starting the legacy instance of
Rollback •
SQL Server which might be up & running and restoring or attaching the databases
Strategy back to the legacy instance.
• Backups from the higher version of SQL Server cannot be restored back to the lower
version of SQL Server which means Rollback Plan should include the transfer of the
data which might be new added, modified or deleted in the new instance of SQL
Server.
• Rollback Plan time must be accounted in the overall Maintenance window of the
upgrade

22
• Run DBCC CHECKDB on all system and user databases – address
any errors that are found.
Before you • Backup everything (system dbs, user dbs, registry, sys db settings,
Upgrade config options, encryption keys, etc) and save off the backups.
• Capture Performance baselines metrics to measure the resource
utilization, user workload.
• Choosing the Upgrade Strategy, running Upgrade Advisor &
testing should have be completed and issues should be addressed
• Develop Successful Upgrade Acceptance criteria
• Develop & test Rollback Plan
• Estimate Downtime required and account for rollback time in the
downtime estimation

23
Post Upgrade Tasks

24
• Apply latest service pack for SQL Server following
upgrade
Post Upgrade • Re-configure Log-shipping, Database Mirroring or
Task (In Place
Always-ON
Upgrade)
• Run FTS Crawl and check Crawl log in case of Full text
catalogs
• Execute DBCC CHECKDB WITH DATA_PURITY
• Run DBCC UPDATEUSAGE
• Update statistics by using the sp_updatestats

25
• Transfer Logins to new instance & check of orphaned users (if any)
• Transfer Linked server
• Transfer Encryption keys on new instance
Post Upgrade • Transfer Jobs & DB Maintenance Plans
Task (Side by • Configure DBA Jobs & alerts on new instance
Side • Transfer & Deploy SSIS Package on new instance
You will have to restore the following settings after the upgrade:
Upgrade) •
is_broker_enabled
is_honor_broker_priority_on
is_trustworthy_on

• Execute DBCC CHECKDB WITH DATA_PURITY


• Run DBCC UPDATEUSAGE
• Update statistics by using the sp_updatestats
• Run FTS Crawl and check Crawl log in case of Full text catalogs
• Reconfigure Log-shipping, Database Mirroring or Always-ON
• Update Application connection strings to point to the new instance

26
Contact Parikshit Savjani
Premier Field Engineer
pariks@Microsoft.com
http://www.sqlserverfaq.net

Das könnte Ihnen auch gefallen