Upgrade to 2008 Best of PASS

269 views

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
269
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Upgrade to 2008 Best of PASS

  1. 1. Upgrade your Databasewith only 15 Minutes of Downtime.<br />Chris Shaw (Chris@SQLShaw.com)<br />
  2. 2. The Case<br />
  3. 3. Critical updates, could impact public safety.<br />No more than 15 minutes of downtime.<br />3 databases<br />2 were updated on a regular basis<br />1 was updated once a week<br />Total size was 300 GB<br />Using SQL Litespeed for compression<br />Database Maintenance was limited to backups (No Re-indexing to speak of)<br />Outages are extremely hard to come by.<br />Full Backups taken every Sunday, Diffs taken every night, T-Logs every 20 min.<br />
  4. 4. Migration to SQL 2008 in a Mission Critical Environment<br />
  5. 5. <ul><li>Agenda
  6. 6. About 888
  7. 7. Upgrade Methodology
  8. 8. Upgrade Tools
  9. 9. Upgrade Process
  10. 10. Demo – Real-Time Migration</li></li></ul><li><ul><li>Agenda
  11. 11. About 888
  12. 12. Upgrade Methodology
  13. 13. Upgrade Tools
  14. 14. Upgrade Process
  15. 15. Demo – Real-Time Migration</li></li></ul><li>About 888<br /><ul><li>888.com is a global online gaming company.
  16. 16. Our purpose is to provide quality entertainment for people who enjoy gambling.
  17. 17. Giving them the opportunity to do so in a safe, fun, fair, regulated and secure environment. </li></li></ul><li>Our products<br />
  18. 18. 888 Database Environment<br />
  19. 19. R&R Of DB Infrastructure Team<br /><ul><li>Installations
  20. 20. Maintenance
  21. 21. Backups
  22. 22. Indexes
  23. 23. Statistics
  24. 24. Data retention
  25. 25. Monitoring
  26. 26. Performance Tuning
  27. 27. Version Uploads
  28. 28. Security</li></li></ul><li>SQL 2008 Project Summary<br /><ul><li>50 production clustered instances were upgraded
  29. 29. 300 development and QA instances were upgraded
  30. 30. All SQL server hosts upgraded windows 2008 R2 OS
  31. 31. Cut licensing costs by more than $500,000
  32. 32. Reduce load from IO subsystems by using SQL server compression
  33. 33. Minimal interference to the operation</li></li></ul><li>DB Infrastructure Team<br />
  34. 34. <ul><li>Agenda
  35. 35. About 888
  36. 36. Upgrade Methodology
  37. 37. Upgrade Tools
  38. 38. Upgrade Process
  39. 39. Demo – Real-Time Migration</li></li></ul><li>In Place Upgrade<br />Advantages<br /><ul><li>Simple
  40. 40. No connection string changes
  41. 41. No need to copy system objects – system DBs are upgraded
  42. 42. No need to copy the user databases</li></ul>Disadvantages<br /><ul><li>No control over the process
  43. 43. A standby server is mandatory for a quick rollback</li></li></ul><li>Side by Side Upgrade<br />Advantages<br /><ul><li>Full control over the process
  44. 44. A quick rollback
  45. 45. OS upgrade can be included</li></ul>Disadvantages<br /><ul><li>The necessity of copying the system objects
  46. 46. Connection string changes pose an overhead</li></li></ul><li>In Side Upgrade<br />
  47. 47. Copy System Objects<br /><ul><li>Linked servers
  48. 48. Jobs
  49. 49. Configurations
  50. 50. Logins and Credentials
  51. 51. Server master key</li></ul>By The Book: <br /><ul><li>Generate Export/Import Scripts</li></ul>Q: Can I copy system databases across different versions?<br />
  52. 52. Copy system databases across different versions of SQL servers<br />System DBs<br />System DBs<br />
  53. 53. Connection String Change<br />By the book: <br /><ul><li>Stop application
  54. 54. Change connection strings
  55. 55. Start application </li></ul>𝑋 (𝑁𝑢𝑚 𝑜𝑓 𝐴𝑝𝑝𝑠) 𝑋 (𝑁𝑢𝑚 𝑂𝑓 𝐼𝑛𝑠𝑡𝑎𝑛𝑐𝑒𝑠)<br /> <br />
  56. 56. Downtime Timeline<br />Downtime ends<br />Downtime starts<br />Conn stringchanges<br />DBs RW2008<br />DBsRO2000/2005<br />Backup log<br />Stop allapps<br />Start all apps<br />Restore log<br />Q: Can we do it in one step and faster?<br />
  57. 57. Server Identification<br /><ul><li>Hostname / Virtual-name
  58. 58. IP
  59. 59. Port
  60. 60. Service Name
  61. 61. Connection Examples:
  62. 62. hostnameINST1
  63. 63. Virtual-nameINST1 (in clusters)
  64. 64. Virtual-name, port
  65. 65. IP, port</li></ul> Q: What can I change?<br />
  66. 66. Change the SERVER Identification<br />2005<br /><ul><li>REAL-APR-SQLAPR
  67. 67. 10.10.10.193
  68. 68. Port 1433</li></ul>2008<br /><ul><li>REAL-APR-SQL2APR
  69. 69. 10.10.10.198
  70. 70. Port 1433</li></li></ul><li>Downtime Timeline<br />Downtime ends<br />Downtime starts<br />Conn stringchanges<br />DBs RW2008<br />DBsRO2000/2005<br />Backup log<br />Stop allapps<br />Start all apps<br />Restore log<br />
  71. 71. Copy User Databases<br /><ul><li>Storage Level
  72. 72. Move LUNs
  73. 73. Clone LUNs
  74. 74. Database Level
  75. 75. Database Mirroring
  76. 76. Log shipping </li></ul>- Works at the database level<br />
  77. 77. <ul><li>Agenda
  78. 78. About 888
  79. 79. Upgrade Methodology
  80. 80. Upgrade Tools
  81. 81. Upgrade Process
  82. 82. Demo – Real-Time Migration</li></li></ul><li>Installation Challenge #1<br />Number of installations<br />SQL 2008 Basic Installation<br />SP1<br />CU6<br />
  83. 83. Slipstream<br />Means to integrate packages of updates, patches or service-packs into one installation pack.<br />Robocopy<br />
  84. 84. Slipstream Advantages<br /><ul><li>66% less installations
  85. 85. Less restarts & less failovers
  86. 86. Saves time</li></li></ul><li>Installation Challenge #1<br />Number of installations<br />SQL 2008 SP1<br />CU6<br />SQL 2008 Basic Installation<br />SP1<br />CU6<br />
  87. 87. Installation Challenge #2<br />Installation Duration<br />SQL 2008 <br />Full Installation<br />
  88. 88. Silent Installation<br />Installation that does not display messages or windows during its progress<br />
  89. 89. Silent Installation Advantages<br /><ul><li>Easy to use – less parameters than GUI
  90. 90. Saves time
  91. 91. Install many instances with one script
  92. 92. Coherence and uniformity in all environments</li></li></ul><li>Silent Installation<br />
  93. 93. Installation Challenge #2<br />Installation Duration<br />SQL 2008 SP1<br />CU6<br />SQL 2008 SP1<br />CU6<br />
  94. 94. Copy User Databases<br />Microsoft Log Shipping<br />Works at the database level<br />888 AutoRestore<br />Works at the instance level<br />
  95. 95. In-House Tool – Autorestore<br />
  96. 96. Auto Restore Implementation  <br /><ul><li>An in-house tool that facilitates the control and management of restores from a central location
  97. 97. Uses transaction log backups from the source servers
  98. 98. Supports parallel restore operations
  99. 99. Works on an instance level (several databases) and not on a per-database basis (Mirroring)</li></li></ul><li><ul><li>Agenda
  100. 100. About 888
  101. 101. Upgrade Methodology
  102. 102. Upgrade Tools
  103. 103. Upgrade Process
  104. 104. Demo – Real-Time Migration</li></li></ul><li>Pre-Migration <br />Preparation Stage<br /><ul><li> Run Windows cluster validation
  105. 105. Install a new instance on a new cluster
  106. 106. Perform a failover
  107. 107. Network – check open ports
  108. 108. Open UDP 1434 or create aliases</li></li></ul><li>Pre-Migration<br />Preparation Stage<br /> Restore server objects by restoring the system databases<br />Windows 2008<br />Windows 2003<br />Restore <br />Upgrade<br />Restore <br />Instance 2005<br />Instance2008<br />Instance<br />20002005<br />Instance<br />2008<br />
  109. 109. Pre-Migration<br />Preparation Stage<br /> Copy user databases using instance level log shipping (Auto-Restore)<br />Windows 2003<br />Windows 2008<br />Auto-Restore<br />Instance<br />20002005<br />Instance<br />2008<br />
  110. 110. Pre-Migration<br />Simulation Stage <br /><ul><li> Application sanity checks
  111. 111. System health checks – OS ,Storage, Host, Network
  112. 112. Migration Process (scripts, time)
  113. 113. Compression Preparations</li></li></ul><li>Migration Day<br /> On 2000/2005 Instance<br /> Stop SQL server agent <br />2. Set all databases to read-only<br />Run last log backup for all databases <br />
  114. 114. Actual Migration<br />On 2008 Instance<br />4. Restore last logs with no recovery<br />5. Check if all the logs were restored from the old server<br />6. Restore with recovery for all databases<br />7. Set all databases to read-write<br />8. Fix orphan logins<br />9. Change compatibility to 100<br />
  115. 115. Actual Migration<br />Changing Instance Identification <br />10. Take offline the old instance group <br />Take offline the new instance group<br /> Delete the old and the new virtual IP and name DNS records from the DNS server<br />
  116. 116. Actual Migration<br />Changing Instance Identification <br /> Clear the DNS server’s cache<br />Give the new server the old server’s virtual IP & <br /> name<br />15. Flush DNS cache clients of new server, Arpcache <br />16. Start the new instance group<br />
  117. 117. Post-Migration<br /> Perform Sanity Checks<br /> Check NOC Alerts<br />3. Check SSIS, MSDTC and Job statuses<br />4. Run a Profiler’s Error Trace<br />5. Check  SQL Error Log & Event Log<br />6. Check Performance Baseline<br />7. Run Full Backups<br />
  118. 118. Compression <br /><ul><li> Compression Advisory – in-house utility
  119. 119. Compression Scripts</li></li></ul><li><ul><li>Agenda
  120. 120. About 888
  121. 121. Upgrade Methodology
  122. 122. Upgrade Tools
  123. 123. Upgrade Process
  124. 124. Demo – Real-Time Migration</li></li></ul><li>

×