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

Daily Coping Tip

Check in with someone who may be lonely or feeling anxious

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.

The Slow Upgrade of SQL Server Versions

Every so often Brent Ozar releases a report of his Constant Care customers, showing the versions in use. While I don't know this client group is representative of the overall SQL Server customer base, I do think it's close enough to draw some rough conclusions.

The top version adoption graph that the summer 2021 report shows has 33-34% of the installed based on 2016, about 34% newer (and under support) versions, leaving the last third running older versions. However, the graph I found interesting is the lower one, which shows the distribution over time.

What I see in this graph is that the older versions (2008-2014) held about 45% of installs in Q1 of 2020. Now they have 31%. The 2017/2019 versions went from 19% to 34%. Those are fairly close numbers, which indicates that a fair amount of these older versions were possibly replaced with newer versions. There could be brand new instances as well as retirement of old ones that weren't replaced, but in general I'd think this shows that the ten-ish year lifecycle of an instance is probably a good guess. This is about 12 years for 2008, and 7 for 2014, but that's around ten.

I tend to think that many of us dislike upgrading our instances across major versions too often. While some DBAs might want to, there aren't often good business reasons for doing so, and many DBAs are just busy. Taking time to upgrade major versions for the same application, especially on the same hardware, doesn't always seem worth it.

In my experience, business people want a long lifetime for a major version. It's just too expensive and time consuming to both doing this too often. I've also found after a couple years, DBAs know the ins and outs of a version, what works well, what tricks are needed to keep things tuned and running. Not to mention that a workload on one version isn't always faster, and sometimes it's slower, on a new version. There are definitely DBAs that might not want to bother changing versions and potentially having issues with their current workload from changes, like the change in the cardinality estimator in 2014.

With modern hardware, for most applications, I think that many instances can run for 10 years. This might be even more true when we factor in that many database servers are virtualized, which means adding a few more cores or RAM is much simpler than in years past.

How often do you upgrade versions? I'm sure some of you do this regularly, and I know some applications might benefit from upgrades more often then every decade, but I bet a lot of you don't bother to change this too often. After all, "working" is a feature, and if you have that one, why take chances?

Steve Jones - SSC Editor

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

 
 Featured Contents

Using Coalesce to Clean Up Reports

Emmitt Albright from SQLServerCentral

One of the lesser used functions is COALESCE(), used to allow you to return one value from a list of those that are potentially NULL. This short pieces gives a few examples where this is useful?

Testing Flyway Migrations Using Transactions

Additional Articles from Redgate

When you are using Flyway, how can you test your database migration script first to make sure it works exactly as you intended before you let Flyway execute it? Phil Factor explains.

SQL VIEW Comparison in SQL Server, Oracle and PostgreSQL

Additional Articles from MSSQLTips.com

In this article we look at the similarities and differences for views in SQL Server, Oracle and PostgreSQL. We also look at indexed views, materialized views and updatable views.

From the SQL Server Central Blogs - Data Modeling at your fingertips

Rayis Imayev from Data Adventures

(2021-July-30) A picture is worth a thousand words, the same way a visual database schema is better than a database model communicated by a multitude of data scripting text objects.
Someone...

From the SQL Server Central Blogs - How to put a SQL Server Database into Recovery Pending

John Morehouse from John Morehouse | Sqlrus.com

You might be asking why on earth would you want to get a database into an undesirable state, more specifically into a Recovery Pending state.  Well, in my case,...

 

 Question of the Day

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

 

Azure Storage Redundancy Cost Savings

Which type of Azure Storage redundancy is the cheapest option from a cost standpoint?

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

 

 

 Yesterday's Question of the Day (by Evgeny Garaev)

Zero or Hero?

What will be result of this query:

IF (1 <> 0)
BEGIN
DECLARE @NumOfHolidays INT;
SET @NumOfHolidays = 0;
END;

SELECT @NumOfHolidays;

Answer: 0

Explanation: The variable scope is the entire batch in T-SQL. The correct answer is 0. Ref: https://docs.microsoft.com/en-us/sql/t-sql/language-elements/variables-transact-sql?view=sql-server-ver15 From the page:

The scope of a variable is the range of Transact-SQL statements that can reference the variable. The scope of a variable lasts from the point it is declared until the end of the batch or stored procedure in which it is declared.

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 - Development
Flat file import - I am importing a flat file from a network share which is dropped there by an application and populating a table. Now there is an additional requirement from the application team to have these files perform updates to existing records. I'm thinking updates need to be scripted and run manually as a query rather than […]
Memory Optimized Tables, UDF and Cross DB access - Hi everyone. I have a database call DBMemOpt with a memory optimized table tTableMemOpt I create a table value function in DBMemOpt in this way: USE DBMemOpt GO CREATE OR ALTER FUNCTION [dbo].[fTest_MemOpt] (@param as int ) RETURNS @fooTable TABLE ( idintNOT NULL, foointNOT NULL ) AS BEGIN INSERT INTO @fooTable SELECT id, foo FROM […]
SQL Server 2016 - Administration
is Forced Parameterization usually more beneficial than less? - On a hybrid server, with ~70% OLTP vs 30% (somewhat heavy) DW workloads, with over 60% of all heaviest recompilations coming from AdHoc queries: We view the recompilation reasons via the Histogram (via the below XE Session) and querying it (also below)  that produces this result (this is for most recent 24 hrs). Should I […]
csv export has line returns from a column on one server not the over - Ok i have a test server and a production server. (I did not set up) . On the test server when I export the query results to a csv vile one of the column (workinst) has line returns so the sheet is messed up with line returns and the following columns are no longer on […]
How to get spid of jobs that are running along with job name - Hi, Can you please let me know how to get spid of jobs that are running along with job name Thanks
Administration - SQL Server 2014
Linked Server to MS Access Database - Hello all - I am hoping someone here can help shed some light on what I am seeing in my environment.  I have a SQL Server 2014 Standard (12.0.4100.1 (X64)) installation. On this server, I created a linked server to a Microsoft Access Database called Property, which lives on a separate windows file server.  The […]
Development - SQL Server 2014
SSRS + SSAS Issue -   Hi I installed analysis services/ reporting services on SQL 2014 server and then restored databases -report server and report server tempDB and also restored the analysis databases from SQL 2012 server. The issue I am now facing is while configuring SSRS reports and giving a connection string as below : Provider=SQLNCLI11.1;Data Source=xx;Integrated Security=SSPI;Initial Catalog=xx […]
SQL Server 2019 - Administration
Loop thru DIRs and COPY latest BAK file to our DR Dir - I need to LOOP thru our Ola Hallengren gen'd backup DIR's to identify the most current FULL backup file and COPY it to a D/R directory (our Server team will then copy the files in the D/R directory t tape and ship offsite). I only wnat the single, most current FULL backup file copied fro […]
removed - removed
new sql installation of developer edition errors - I am learning to work with SQL server 2019. During the installation I got some errors. TITLE: Microsoft SQL Server 2019 Setup ------------------------------ The following error has occurred: Cannot find the user 'DESKTOP-QGVGUB6\PdwComputeNodeAccess', because it does not exist or you do not have permission. Changed database context to 'DWConfiguration'. Script version: 107 Version_History table created. […]
Irritating bug in the 2019 SQL Installer - When installing SQL, be careful on the Server Configuration\Services Account page when you select the "Grant Perform Volume Maintenance Task..." option. Even if you have selected an Active directory account for the services to run under, the right is actually assigned the SQL Server Managed Account NT SERVICE\MSSQLSERVER and NOT to the account you have […]
General
Update table from other tables - Hi, Basically i have 2 tables check-in and check-out where users check-in and check-out using a RFID card. I am wanting to display who's in the building or been in the building on a given day. I have a VB.net program writing to the tables how in SQL would it best to display this data. […]
Integration Services
How to copy data from Salceforce to SQL SERVER tables - Hello Good Morning, I have about 8 tables in salceforce  i would like to copy/load them into sql server daily. (just truncate and reload) in sql server. but automated way not manual loading. please share any thoughts or ideas... Thank you Asita
C# Script for sending email - Can anyone help me with some script to send email with C#. I tried the "Send Mail Task" and it failed also. Here's what I have so far. It runs but I get no mail. My port number is 25 and I'm using basic authentication with password. Any ideas?: public void Main() { try { […]
SQLServerCentral.com Website Issues
private messages gone - hi, Maybe I'm doing something wrong now, but it seems that the option to look at my private messages is now gone from my profile - did had a few private discussions with members and can't find the option anywhere now.
 

 

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

 

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