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

Serverless Databases

I wrote about serverless applications recently. Not a lot of people are using serverless technology for their code, but a few have had a lot of success. It seems like a move that makes sense, though there are some challenges in managing the code when you deploy functions or snippets instead of an entire codebase. I worry a bit about tracking billing, usage, versions, and deployment pipelines with serverless, but I know things will get better over time.

Now Microsoft Azure has included a new option for databases: Azure SQL DB Serverless. This is a SQL Server database that bills you for the compute cycles used by the second. This works by essentially pausing your use of the database processing when clients are not accessing the system. You are still billed for storage all of the time, which makes sense, but storage is cheap. The system also has quite a few automatic scaling features, many of which aren't as simple to understand as I might hope.

How many times have you purchased a server (or rented one) and found it is barely used, trundling along at 10-20% CPU? I've done that quite a few times, especially when I had no idea of the workload early on. Later, it's often not been worth my time to try and consolidate the database on another machine. Often this is often a fear based response where the cost of the machine is already gone, and I don't want to take the chance that a burst in workload will overload another system.

For sporadic use applications, serverless databases might be a good fit. I can avoid paying for compute during low periods, such as overnight. I'm essentially renting a machine at specific times and not at others, but the compute layer gets provisioned as I need it. That seems like the ideal situation for a lots of apps, assuming I can run them in the cloud. There are some restrictions in preview, such as the inability to pause the system unless there are 6+ hours of no activity, but I'm hoping that changes. Six hours seems like a long time.

The one thing I think about this database service is that it will require longer timeouts and more resilient applications that can handle a warm-up period if the computer layer has been shut down. I also worry a bit about cache and the buffer pool. If you've ever dealt with servers that regularly restart, there is a bit of a slow period as the buffer pool fills and code is compiled. Perhaps Microsoft has ways of saving off some of these states, perhaps capturing plans in the Query Store that can avoid excessive compilations on restart, but I do worry that slow starts will increase user complaints and tickets filed. Those costs might not be worth the savings from shutting down your database resources.

Steve Jones - SSC Editor

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

 
Redgate SQL Provision
  Featured Contents

A Self-Serve System to Refresh Databases (Part 3)

bkubicek from SQLServerCentral

This is the wrap up of this series on a system for developers to restore production database in test. It gets pretty detailed on the web setup side.

Overview of Azure Cosmos DB

Additional Articles from SimpleTalk

Cosmos DB is Microsoft’s highly scalable, NoSQL database platform running in Azure. It supports four API models, including Key-Value pair and Documents. Pushpa Sekhara provides an overview of Cosmos DB, including some best practices to improve performance.

From the SQL Server Central Blogs - OpenSSH Resources for Windows and PowerShell

aen from SQLServerCentral

Had a conversation with a good friend in the SQL Community about OpenSSH and how it fits as a transport layer for PowerShell Remoting. I pointed him towards several...

From the SQL Server Central Blogs - Track SQL Server Database Recovery Progress – ErrorLog

dharmendra.keshari from SQLServerCentral

This question has come up many times how to capture the SQL Server Database Recovery Progress or Total time take to recover a database. It will help to plan...

 

  Question of the Day

Today's question (by Thom A):

 

ISNULL vs COALESCE

What values are returned from the SELECT in the following statements?
CREATE TABLE Strings (String1 varchar(5),
                      String2 varchar(10),
                      string3 varchar(5),
                      string4 varchar(10));

INSERT INTO dbo.Strings (String1,String2,
                         String3, string4)
VALUES('Hello',NULL,
        NULL,'Goodbye');

SELECT ISNULL(String1, String2) AS Expr1,
       COALESCE(String1, String2) AS Expr2,
       ISNULL(String3, String4) AS Expr3,
       COALESCE(String3, String4) AS Expr4
FROM Strings;

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

 

Redgate SQL Monitor
 

 

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

Getting the Date

In the R language, how do I get the current date of the system?

Answer: Sys.Date()

Explanation: Sys.Date() will return the system time Ref: Sys.time() - https://stat.ethz.ch/R-manual/R-devel/library/base/html/Sys.time.html

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
NOT IN with OpenRowSet - Hi, I am trying to use a text file to exclude a list of things.  Thus I was hoping to use OpenRowSet to create the file.  The query runs, it just doesn't exclude anything. DECLARE @Job_numbers VARCHAR(max) SELECT @Job_numbers=BulkColumn FROM OPENROWSET(BULK 'c:\temp\SampleUnicode.txt', SINGLE_nCLOB) x; SELECT ModelName0 FROM v_Manufac WHERE ModelName0 NOT IN ( SELECT @Job_numbers […]
SQL Server 2016 - Administration
SQL Alert for stack dumps - I want to create a custom SQL Agent Alert for whenever a stack dump occurs.  However I can't seem to determine what the stack dump error number is (for example Error 1205 Deadlock Detected) or what severity level (001 - 025) it would be.  Does anyone know?
How to configure automated updates? - Hi, My company recently (a couple months ago) migrated a particular application to a new Windows Server 2016 box with SQL Server 2016.  As I review the event logs and SQL logs from last night, it appears that updates to SQL Server 2016 Database Engine Services and Full text Search tried to install, but failed. […]
home lab set up - Hi guys, I'm after advice on setting up a home lab.  Basically where to get the OS & SQL server software.  I'd like a mix of a DC, 2 x 16 with AAAG, a 12 and a 2008. So for the few win OS & SQL isos I require (for my test only) I guess […]
SQL Server 2016 - Development and T-SQL
top 5 cpu consumers and collecting the result set in table - One of my clients has requested me to gather the information on top 5 cpu consuming queries. I can find several of them online that pulls it from cache and dump the result set into the table but my main concern is that I don't want to insert the same queries back again if it […]
Sum fields with a little twist - Hi,   I have got a unique requirement here but I’m struggling to get the right results.  I have table #temp, the data in this table can’t be updated permanently so the underlying table values can’t be changed permanently.   Below is all the code to create a sample table, the data and queries for […]
indexing view - Hello. I have 2 DBs (MS SQL Server 2016 Standard Edition). I want to create indexing view to implement some indexes. The view must be able to select data from other database on same server. How can do it ? Thanks in advance)
view temp table - i would like to create a view. but my current script has temp table. how can i replace the temp table. query sample as below: create table #a ( testing1 varchar(100), testing2 varchar(100), testing3 varchar(100), amount integer ) insert into #a values('testing1','testing2','testing3',700) select * into #tempA from #a select * --case condition logic case when […]
Development - SQL Server 2014
live update of data from a view into a table - Hi all, I have a pending upgrade to an application which changes a database table into a view. The issue I have is I have 4 copies of the same application on different servers in different regions and use the existing table to update a master table hosted locally using triggers. With this change I'm […]
SQL Server 2008 - General
Monitor network traffic - Is there a way to monitor network bandwidth on a SQL Server? My network admin is telling me that we r using over 1 terabyte of bandwidth per hour and I am not sure how to capture that. Through Perfmon?DMV?
SQL Server Newbies
Tasks of Senior SQL Server Experts/Data Scientists - Ahoi, i have started working with SQL for a year now. Ive managed to get along at work. My work includes: - SSIS ( ETL soley using TSQL) --SSAS --Backups (Ola Hallengren)   I am far from being an expert in what i am currently doing, but as i said i am getting along. Not […]
SSRS 2016
Change language across all reports in a single SSDT project - Hi, I have a number of SSDT SSRS project files where the language is configured EN-GB. These reports are to to be deployed in Australia. I know I can edit each report, reconfigure the language. My question is though. Is there a way of re-setting the language across all the reports in the project? Thank […]
Integration Services
List all of the variables in a package - In multiple projects I always want to document the variable. Ideally the name, the value and (if applicable) the expression behind the variable. I can not install software so this would have to be done in code (script task) The packages are stored in file system so not available via SSMS. I have tried a […]
Certification
Certification information collection - Hey guys, sorry if this is a dumb question. The MS website is confusing to me. What is a good path for a beginner looking to get certs for SQL Server? Most of the ones im finding are 2012 SQL Server. Isn't that a bit outdated at this point? What certs are available? Where can […]
Resumes and Job Hunters
WPM Typing Requirement for a Systems DBA? - Has anyone else seen a job description for a systems DBA with a typing WPM requirement?  Ordinarily I would think they want a lot of data entry but are naming the position "database administrator" erroneously but the rest of the job description doesn't make it sound that way.  I type with all fingers, two fingers, […]
 

 

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

 

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