Download Upgrading SQL Server “Done Right”

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Relational model wikipedia , lookup

Clusterpoint wikipedia , lookup

Microsoft Access wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Object-relational impedance mismatch wikipedia , lookup

SQL wikipedia , lookup

PL/SQL wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Transcript
Upgrading SQL Server “Done Right”
Dandy Weyn (@ilikesql) – DB Best Technologies
Dandy Weyn
Director Business Dev. & Strategy – DB Best Technologies
www.ilikesql.com
[email protected]
@ilikesql
Why Upgrade?
Steps to Upgrade
Landscape
DEMO
Map Toolkit
Advisory & Considerations
Upgrade Strategy
•
•
•
•
Less granular control over upgrade process
Instance remains offline during part of upgrade
Not best practice for all components
Considerations for Rollback Strategy
•
•
•
•
More granular control over upgrade process at DB level
Can be used to perform test migration
Ability to run systems side-by-side for parallel runs
Relatively straightforward rollback strategy
•
•
•
•
•
•
More granular control over upgrade process at DB level
Can be used to perform test migration
Ability to run systems side-by-side for parallel runs
Relatively straightforward rollback strategy
Goes frequently together with OS upgrade
Goes frequently together with platform upgrade (x86->x64)
•
•
•
•
Easier, mostly automated, generally fast overall process
System data upgraded
May require no additional hardware
Applications remain pointing to same server/DB
•
•
•
Usually require additional hardware
Server/database name changes
Not practical for VLDB unless utilizing SAN
•
•
•
Requires additional Hardware
Server/Database name changes
Not practical for VLDB unless utilizing SAN
Upgrade Tools
Map Toolkit
•
•
Assessment and Reporting
SQL Server / Instance Discovery
SQL Server Upgrade Advisor
•
•
•
Prepares for upgrade
Analyzes installed components
Generates a report with blockers
Distributed Replay
•
•
•
•
Simulates a mission-critical workload
Application compatibility
Performance testing
Capacity Planning
Best Practices Analyzer
Microsoft SQL Server 2005 Best Practices Analyzer
http://www.microsoft.com/en-us/download/details.aspx?id=23864
RMLUtils
Microsoft SQL Server 2008 R2 Best Practices Analyzer
SQL Server Upgrade Assistant
http://www.microsoft.com/en-us/download/details.aspx?id=15289
Microsoft SQL Server 2012 Best Practices Analyzer
http://www.microsoft.com/en-us/download/details.aspx?id=29302
•
•
•
•
Capture test workload
Setup baseline environment
Used to identify compatibility issues
•
Complements the upgrade
process
Incredible instruments in
complex upgrade scenarios
https://support.microsoft.com/enus/kb/944837
Upgrade Paths / Methods
https://msdn.microsoft.com/en-us/library/ms143393.aspx
Upgrade Paths / Methods
https://msdn.microsoft.com/en-us/library/ms143393.aspx
Upgrade planning – pre-upgrade
Upgrade planning – pre-upgrade
SQL Server 2014 Upgrade Advisor
https://www.microsoft.com/en-us/download/details.aspx?id=42295
PART OF SQL SERVER 2014 FEATURE PACK (SQLUA.MSI)
REQUIRES SQLDOM.MSI to be installed as pre-requisite
DEMO
SQL Upgrade Advisor
Upgrade planning – pre-upgrade
Microsoft SQL Server 2005 Best Practices Analyzer
http://www.microsoft.com/en-us/download/details.aspx?id=23864
Microsoft SQL Server 2008 R2 Best Practices Analyzer
http://www.microsoft.com/en-us/download/details.aspx?id=15289
Microsoft SQL Server 2012 Best Practices Analyzer
http://www.microsoft.com/en-us/download/details.aspx?id=29302
Upgrade planning – pre-upgrade
Deprecated Features
https://msdn.microsoft.com/en-us/library/ms143729.aspx
Discontinued Features
https://msdn.microsoft.com/en-us/library/ms144262.aspx
Upgrade planning – pre-upgrade
Behavior Changes
https://msdn.microsoft.com/en-us/library/ms143359.aspx
Upgrade planning – pre-upgrade
DBCC CheckDB
DBCC CHECKDB
Other considerations?
•
•
•
•
•
Script and drop indexes
Logins
Maintenance Plans
Jobs
Linked Server Definitions
Upgrade Side/Side – New Install
Upgrade Side/Side – New Install
USE [master]
RESTORE DATABASE [DB_NAME] FROM
DISK = N'C:\Backups\Fullbackup.BAK'
WITH FILE = 1,
MOVE N'DB_NAME' TO N'C:\Pathname\datafile.mdf',
MOVE N'DB_NAME_log' TO N'C:\Pathname\logfile_log.ldf'
GO
DEMO
Backup Restore
Upgrade Side/Side – New Install
CREATE DATABASE DB_NAME
ON (FILENAME = 'C:\pathname\datafile.mdf'),
(FILENAME = 'C:\pathname\logfile_Log.ldf')
FOR ATTACH;
DEMO
Detach / Attach
Upgrade planning – post upgrade
Other Considerations
DEMO
Job Transfer using SSIS
Upgrade planning – post upgrade
Validate Application Configuration and performance
Validate Connectivity
Validate Application Configuration
Upgrade planning – post upgrade
Understand DB compatibility levels
Change compatibility levels (if needed)
Upgrade planning – post upgrade
(Clustered) ColumnStore Indexes
AlwaysOn Availability Groups
New T-SQL Database
Upgrade planning – post upgrade
Validate Query Execution Plans
Rebuild Statistics
Upgrade planning – post upgrade
DBCC CheckDB
DBCC CHECKDB
UPDATE STATISTICS for each table
USE db_name;
GO
EXEC sp_updatestats;
OR
USE db_name;
GO
EXEC sp_MSforeachtable @command1='UPDATE STATISTICS ? WITH FULLSCAN';
Upgrade planning – post upgrade
Findings / Challenges
• Database Upgrades can be easy or cumbersome
• 3rd party software challenges / licensing
Future sessions
•
•
•
•
Upgrading Databases with Replication
Upgrading Reporting Services
Upgrading Integration Services
Upgrading Analysis Services
Contact / Follow up
Dandy Weyn
www.ilikesql.com
[email protected]
@ilikesql