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

Daily Coping Tip

Donate some items to a charity

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.

Eyes Wide Open

Not many of us work in startup environments, but many of us do work with new databases that are created for new applications. These might be carefully designed, thrown together, or your database might be constructed by an ORM. In any case, I find many people make decisions and write database code for today, solving the problems that they see in front of them. they often do this with little data and a single system. They might have their eyes on using some new technology, and they decide on a data strategy without really considering what they will need later.

That seems to be what happened with Expensify, which started in the financial industry. Their system had requirements for low response times, multiple locations, and detailed logging. This required a robust database architecture, which turned out to be helpful when the company pivoted to a new business model. Their CTO talks about some of the problems he sees with startups making database decisions. I think many of these lessons are helpful for all organizations that are trying to ensure their database can grow and meet their needs.

I think one of the most common problems I see is that developers and leaders get enamored with new technology. There is a lot of promise in some of the platforms and designs that are being put forth. Some are even proving themselves in high-profile situations, but not all. For most of us, however, we aren't going to be solving the same problems in the same way. As the article notes, we're not Google, but we're also no Uber, Facebook, or Spotify. Choosing to mimic their choices because of their success doesn't necessarily map to our business model. I find no shortage of companies that struggle to adopt some new platform because they built a proof-of-concept and assumed the way the system works with small amounts of data. This becomes an issue later with the moderate or large amounts that they have over time.

I also see companies creating complexity, with the chance that they will need to deal with many petabytes or exabytes of data at some point. Face it, most of us will barely deal with terabytes of data in any particular system. We ought to plan for a high-performing system at that scale, not worry about a future that will not likely come. At the same time, we aren't going to be dealing with megabytes of data, so if your developers only test on MBs, they are going to miss problems.

I like the advice to go into your decisions with your eyes wide open. Don't copy others, and realistically think about what you will need. I believe that engaging a data professional early is helpful. Developers do some amazing things when they build software, but so often the majority of them don't really think about the challenges of a database system. They don't consider low response times or ensuring there are HA and DR (two separate things) strategies. They also forget about the challenges of aggregation and reporting lots of data. Most humans work with a few rows of data at a time, which is what developers do on their systems. When you need to aggregate things, or all your customers are generating a workload, that's when a data professional can help ensure you've properly indexed entities and planned for a demanding workload.

I do like the common sense advice that most startups won't outgrow a relatively modest single database server. Many applications might not as well, but that doesn't mean you can put all your eggs in that one server basket. Make sure if it dies that you have multiple people that can recover it and ensure your system is quickly running in another place. There are different ways to handle this, but engage someone that knows your platform and have them ensure you have some staff, operations or developers, that understand how HA and DR work in your environment.

Lastly, be secure. I really like the idea of always using stored procedures. I know this becomes a pain for developers, who now write code in two places, but this really helps you ensure better security, and maybe more importantly, ensures you can tune one part of your code regularly, the database side, without impacting the other side.

Steve Jones - SSC Editor

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

 
  Featured Contents

Tracking Failed Job Steps

Steve Jones - SSC Editor from SQLServerCentral

Recently a customer was asking for a way to alert on job steps that failed, but the job succeeded. They really wanted a custom metric for SQL Monitor, which I submitted, but this post looks at the query in general, trying to determine if a job step failed. Note: Let me start by noting that […]

Schedule Azure SQL DB Processes using Azure Functions

Additional Articles from MSSQLTips.com

Learn how to schedule processes in Azure SQL Database using an Azure Function in this easy to follow step by step tutorial.

Diagnose and resolve latch contention on SQL Server

Additional Articles from SQLServerCentral

This guide describes how to identify and resolve latch contention issues observed when running SQL Server applications on high concurrency systems with certain workloads.

From the SQL Server Central Blogs - How I carved up 18TB of Storage

John Morehouse from John Morehouse | Sqlrus.com

In a previous post I told you about how I got a Synology DS920+ on loan to play around with.  The device comes with 4 drive bays so there...

From the SQL Server Central Blogs - More Interactive Notebooks from MS Docs

Steve Jones - SSC Editor from The Voice of the DBA

I saw a note from Microsoft recently that they are trying to improve some of the support experiences for customers that are going through their docs. The idea is...

 

  Question of the Day

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

 

Trace Flag Scope

What are the scopes available for enabling trace flags? Not every flag might fit all these scopes, but what are the possible scope targets?

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)

What Service Tier in Managed Instance

I am connected to an Azure SQL Managed Instance database. I want to know the service tier, without having to log into the portal and click around. How can I get this from T-SQL?

Answer: SELECT TOP 1 sku as ServiceTier FROM [sys].[server_resource_stats] order by end_time desc

Explanation: The sys.server_resource_stats in Managed Instance has this in the sku column. Ref: sys.server_resource_stats - https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-server-resource-stats-azure-sql-database?view=azuresqldb-current

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 2016 - Administration
Suppress Backup Messages In Logs - I'm trying to get rid of all backup messages in my SQL logs and I was able to successfully suppress completed notifications by enabling trace flag 3266. However, I'm still dealing with "backup passed" and "backup skipped" entries which quickly clutters the log when performing log backups every 10 minutes on dozens of databases. The […]
SQL Server 2016 - Development and T-SQL
Gap in dates query - Hello All, I need your help in building this query. create table #memb (ID int, eff_dt date, term_dt date, prod varchar(5)); insert into #memb select 1111 , '01/01/2016' , '12/31/2016', 'AAA' union all select 1111, '01/01/2017', '12/31/2017', 'AAA' union all select 1111, '01/01/2018', '03/31/2021',  'AAA' union all select 1112, '01/01/2017', '12/31/2017', 'AAA' union all select […]
Development - SQL Server 2014
Incorrect Syntax near End - Hi if Month(@frDate) < 4 begin SET @ytdfrDate = (SELECT CONVERT(DATE, dateadd(y,-1,@frdate + '-04-01')) end Thanks
YTD Date calculation - Hi I have @frdate parameter. In below condition i want to Set date as '01/04' and subtract 1 year from @frdate if Month(@frDate) < 4 begin SET @ytdfrDate = "01/04/" + dateadd(y,-1,@frdate) end Thanks  
YTD Sale - Hi I have below Stored Procedure . I want YTd column value also. If user enters @frDate = 01/01/2021 and @toDate = 31/01/2021 then YTD value should be from 01/04/2020 to 31/01/2021 If user enters @frDate = 01/12/2020 and @toDate = 31/12/2020 then YTD value should be from 01/04/2020 to 31/12/2020 Create PROCEDURE [dbo].[SpBpGroupWiseSalePurchase] @frDate […]
SQL 2012 - General
Function for converting hh:mm:ss time to decimal equivalent - I have a user defined function that just needs a little tweaking. The first block of code used in a query returns 7 decimal places and when I wrap the code in a function it only returns 2 decimal places. Any clue would help... Thanks! ,CONVERT(DECIMAL(10,2),LEFT([LOGIN TIME],2) ) + CONVERT(DECIMAL(10,2),SUBSTRING(CONVERT(VARCHAR(8),[LOGIN TIME]),4,2))/60 + CONVERT(DECIMAL(10,2),RIGHT([LOGIN TIME],2))/3600 AS […]
SQL Server 2012 - T-SQL
How to get the detailed record and summary value at the same time - there are LineNo, itemNo and qty fields in one table, I want to the accumulative qty (totalQty) for each item and want to the totalqty shown as below picture, I just know one way to get the the result , could you please help me how many ways to get the result, it seems that […]
SQL Server 2019 - Administration
Complete permissions script - Hi Everyone Is there a script that can output a FULL audit of my SQL instance. As in script out: Logins Server roles Server securables Database Users Database Roles Database securables   I have bits and pieces of this but cannot find a complete solution.   Any help is appreciated   Thanks
Is that a reason DBA should Install SQL Server - Hello: I got a question from upper manager and he wanted to know why DBA should install SQL Server? Should Window Server Team install SQL Server? I tried to explain and clarify to him. Would you please give me a good reason why DBA should install SQL Server?   Thank you in advance. Edwin
Returning Database Properties related to "Change Tracking" - The SSMS Database Properties screen has a page "Change Tracking". How can I get those properties via regular SQL? The normal way to return database properties is to use sys.databases or DATABASEPROPERTYEX, but I could not find those properties via either approach. The SQL instance is 2019 - Microsoft SQL Server 2019 (RTM-GDR) (KB4583458) - […]
SQL Server 2019 - Development
T-SQL Unique Index - classification of unique - advice needed - I have inherited a data warehouse with Type II SCD tables. Each row has an entity_identifier (not null), StartDate (not null), EndDate (nullable) and then the entity attributes. When an attribute changes, the EndDate is completed and a new record added with the new StartDate. So far - So good Each table also has a […]
SQL Server 2008 - General
Service Broker limit in SQL - As mentioned in the link below, https://www.codemag.com/article/0605061/SQL-Server-2005-Query-Notifications-Tell-.NET-2.0-Apps-When-Critical-Data-Changes For client-side applications, query notification users should not exceed ten concurrent users , in SQL Server 2005. What is the maximum number of concurrent users allowed while using query notification in  SQL 2008 and above?
General Cloud Computing Questions
Questions about Cloud Computing - I am currently a second year Information Technology student and I aspire to be a Data Analyst or be a DBA and I have currently learned SQL through MySQL Workbench and have created personal projects and I was just wondering as it pertains to cloud computing (Azure SQL or AWS SQL) is it best I […]
SSRS 2012
SSRS 2012 Email Relay question - Hi All, I am trying to figure out if it is possible to send SSRS subscriptions via email directly through our office 365 environment, and I am having issues. I can't seem to find documentation of if this is possible in SSRS 2012 (I know they added it in 2016)., and what settings I need […]
Analysis Services
SSAS Referenced Dimension - Ahoi, i have been looking at the different relationship options the Multidimensional Model offers, because i only have the Regular and the M:N ones in actual use. The one that confuses me is the Referenced Dimension type. From my understand it allows connecting a  Dimension and Facts by using an intermediate Dimension which has a […]
 

 

RSS FeedTwitter

This email has been sent to newsletter@newslettercollector.com. 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

 

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