Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
The Voice of the DBA
 

Daily Coping Tip

Spend less time sitting today, get up and move more often

I also have a thread at SQLServerCentral dealing with coping mechanisms and resources. Feel free to participate.

For many of you out there working in a new way, I'm including a thought of the day on how to cope in this challenging time from The Action for Happiness Coping Calendar. My items will be on my blog, feel free to share yours.

Migrating a Large Database

I have upgraded lots of SQL Servers from one version to the next, and for the most part, the process has been smooth. That's not always the case, and there have been some long nights where the Operations staff had to scramble to fix things, script out old logins, call Microsoft support, and perform various data exports and imports to get a new instance running.

Most of my upgrades were with relatively small databases for that time period. However, I have upgraded a few "large" databases in the past. We had a 400GB database on SQL Server 6.5 in 1999 that was a challenge to move to SQL Server 7. I also upgraded an 800GB database in 2001 from 6.5 to 2000 for our Financial team which involved a lot of stress.

I haven't upgraded a 1TB database, much less a 4TB one, but I know this can be very time-consuming to move all that data. Even with much faster hardware and networks these days, working with that much data can require a decent amount of downtime. That's not very acceptable these days, especially for applications that are used by customers all around the world and all around the clock.

I found an interesting upgrade story from a SaaS provider that runs PostgreSQL. I don't use that platform, but I found the write-up of their process to be aligned with some of my experiences with SQL Server. They delayed upgrading an old version and then had the desire to move to as current a version as possible and delay future upgrades (again). I've certainly experienced that. Their goal was also to minimize downtime, as their customers are constantly connecting.

The plan for the upgrade made sense to me. Use replication to move most data and then minimize downtime. That's a technique that can work in SQL Server, though we'd be more likely to use log shipping to simulate this. They also trimmed and cleaned some data, removing the need to upgrade some of the tables. That's something many of us might be able to do yearly in some databases, especially for large logging tables where older data might rarely be read. I'd even think about moving that data to another database and using a synonym to access it if it were needed. That's just a good idea for general DR planning.

I also appreciated them creating a runbook and testing the process multiple times in staging. Their big takeaway here: practice over and over with a realistic workload. They created some problems for themselves by not using a real enough workload. That ought to be something your organization does on a regular basis to test your software and ensure new code performs well. Using the same process for upgrades is a bonus.

Large upgrades are stressful and often they are "big bang" deployments where you can't go back to the old system. Practice as much as you can, make sure you have backups, and then be ready to adapt to whatever challenges come up. Plan ahead, and be prepared for a long night. If you do, you'll likely have success. If you don't, I am fairly sure something will go wrong and you'll regret not thinking ahead.

Steve Jones - SSC Editor

Join the debate, and respond to today's editorial on the forums

 
 Featured Contents
SQLServerCentral Article

7 DB Forge SQL Studio Features Discovered in Less Than 2 Hours

Br. Kenneth Igiri from SQLServerCentral

dbForge SQL Studio gives you a few advantages over SSMS. See what Kenneth discovered during his first use of the tool.

External Article

Continuous Data Protection with SQL Data Catalog 2.0 and Data Masking

Additional Articles from Redgate

SQL Data Catalog 2.0 provides a simple, policy-driven approach to data protection, through data masking. It can now automatically generate the static masking sets that Data Masker will use to protect your entire database, directly from the data classification metadata held within the catalog.

External Article

Why your PL/SQL needs to be testable – and how to do it: Part 1

Additional Articles from SimpleTalk

Part 1: What is testable code, why is it important, and first glimpses on practices that can help

Blog Post

From the SQL Server Central Blogs - Ensuring SQL Compare Checks Synonyms

Steve Jones - SSC Editor from The Voice of the DBA

I was running a PoC for a customer and they noticed that synonyms were being missed when they changed the database being used. It was surprising to me, but...

Blog Post

From the SQL Server Central Blogs - RunAsRadio- Query Performance Tuning Strategies

SQLEspresso from SQLEspresso

Had a great time talking with Richard on RunAsRadio about Query Performance Tuning Strategies, check it out. How do you keep your SQL queries fast? Richard chats with Monica...

 

 Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

Unicode Compression

Under which circumstances is Unicode compression not supported?

Think you know the answer? Click here, and find out if you are right.

 

 

 Yesterday's Question of the Day (by Steve Jones - SSC Editor)

The DB2 Migration

I want to migrate a DB2 database to an on-premises SQL Server database. Which tool(s) should I use?

Answer: The SQL Server Migration Assistant (SSMA)

Explanation: The SQL Server Migration Assistant (SSMA) tool is used to migrate from Access, Oracle, DB2, MySQL, or SAP ASE. you can use these to migrate to on-premises or Azure SQL Database. Ref: SQL Server Migration Assistant - https://docs.microsoft.com/en-us/sql/ssma/sql-server-migration-assistant?view=sql-server-ver15

Discuss this question and answer on the forums

 

 

 

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.


SQL Server 2017 - Administration
NT Authority/System User failed to open Model database - Hi, I am seeing messages every day failed to open explicitly specified database model for the user NT Authority/System  [Client: Local machine]. We don't have any jobs that run with that NT Authority/System . All jobs are running as sa only. I verified that there are no linked servers created. We have the 3rd party […]
Transaction log growth - Index Manintenance jobs & Database functional jobs - Hello SQL Experts, I saw some messages stating that transactional log is full. We have a database, we didn't enable the auto growth. We have Hallengren Index job running & some other jobs running at the same. How can we calculate the transactional log  required for the Index maintenance job? How can we ruled out […]
Replication Monitor - After you set up the replication, do you need to manually add each publisher server in the replication monitor? In one of the environment when I open the replication monitor I can able to see the replication status. In other environment when I open the replication monitor it is not showing any thing. So I […]
DBCC CHeck Dbs - Hi, We have about 30 SQL Server instances. I didn't see any DBCC Check DB jobs are scheduled. What will be the impact? How do you manage to run DBCC Check db  in very large production databases? Thanks,  
SQL Server 2017 - Development
SignByCert returning signature of length 264 byte for 2048 bit key - We have recently migrated to SQL Server 2017 (64 bit - version: 14.0.1000.169 - Host OS: Windows Server 2016 Datacenter). I created the test certificate in database and used it to sign sample text. The SQL method SignByCert returned signature of length 264 bytes. Ideally I expect the signature size should be length of mod […]
How to questions on SRRS - Hi Experts, This is the extract of the book from Teo Lachev, Applied Power BI.  I am trying to follow. I have SMMS but never had SRRS, never used it. I was not able to find Sql server Installation center so I proceeded to install stand alone. I could now figure out how to get […]
SQL Server 2016 - Development and T-SQL
Updating Current table w next day's data while keeping only previous date data - I have a table that I get on the 1st of each month, and it has all the jobs scheduled for the entire month:   SELECT [plannedstart] ,[plannedend] ,[machine] ,[Job] ,[Qty] FROM ScheduleJobs   Day 1: The table has all the jobs scheduled for the entire month (Original Table) Days 2: I get another table […]
How to get the first and last dates of all the months of the current year. - Hello, I'm trying to get the first and last dates of all the months based on the current year. 1/1/2022 1/31/2022 2/1/2022 2/28/2022 3/1/2022 3/31/2022 Any help would be greatly appreciated. Thank you in advance!
Find Maximum Qty of fruits (regardless of fruit) which could be bought by $50 - Find Maximum Qty of fruits (regardless of fruit) which could be bought by $50 accounting for the total qty available in each scenario. Final result query just need the qty IF OBJECT_ID (N'tempdb..#TEMP1', N'U') IS NOT NULL DROP TABLE #TEMP1 CREATE TABLE #TEMP1 ( Product VARCHAR(20), QtyAvailableToPurchase INT, Price DECIMAL(10,2) ) INSERT INTO #TEMP1 (Product,QtyAvailableToPurchase,Price) […]
SQL 2012 - General
The most basic SQL question ever... - I'm new. Fairly new to SQL. Can I query data that is saved on my desktop in Excel format without importing the data to the server? And if so, how? I'm using SQL Server Management Studio if that matters. Sorry, I feel dumb even asking this.
T-SQL (SS2K8)
Bulk Insert / (type mismatch or invalid character for the specified codepage) - Dear friends, I need your help and expertise. I'm trying to import several log files into a table but after I created a configuration file, I can't import a single record, because for some reason this doesn't understand my datetimes (2 values) saying that something is incorrect, an invalid character, I tried to remove the […]
Reporting Services
Data Driven Subscription - Where is the data source of the dataset stored? - For a data-driven subscription, you define a dataset which returns information that can be used by the report. For that report you have to define a data source. Does anyone know where that information is stored for a specific subscription? If I look in the [dbo].[Subscriptions] table, the [DataSettings] column contains the actual query being […]
SSRS 2016
SSRS 2016 - Headings in Subreports being removed in render - Hi All, Thanks for the input in advance.  I’ve created a main report which features multiple sub reports.  Each sub report is in a box so that it can have a page break at the end of each report.  This is so that each report can appear on a separate sheet in Excel once it’s […]
General
BitBucket, who does the Merge? - Not sure if this is the right place to post this, but here we go: For those of you using BitBucket, Who does your Merge of the branch to production? We have a set up where we have one person(not really one person a group), not a Developer, that does our 'move to server' for […]
SQLServerCentral.com Test Forum
Testing BB Formatting here... - It !!! [style size="30px"]does it?[/style] That worked.  Size is 32 there.  Size by px doesn't work.  Probably a good thing in this day and age. Notes to self: PRE and CODE are just monospaced and don't retain leading spaces even if they're pasted as non-breakable spaces.  CODE pretty much makes a train-wreck by encapsulating each […]
 

 

RSS FeedTwitter

This email has been sent to {email}. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. This newsletter was sent to you because you signed up at SQLServerCentral.com.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

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