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

Serverless

About a year ago I kept hearing about serverless as the way to go for all new code. It seemed every conference, every cloud vendor, even many developers were discussing serverless as a technique for running small snippets of code. The technology seemed to burn very bright, but then dropped out of the media somewhat. It’s still being adopted, but seems less popular than a year ago, with containers and Kubernetes becoming more popular this year.
 
Serverless computing is kind of a backend-as-a-service (BaaS) or a function-as-a-service (FaaS) architecture where you write and deploy functions on a cloud service that are called by your application as small chunks of functionality. The pricing is by the execution, with a very low cost for resources. Azure Functions cost US$0.20/million calls and US$0.000016 / GB-s. Strange metrics, but the result is a very low cost for most clients to use a functional part of a system. The key is that there are not infrastructure worries. The serverless platform provides the CPU and RAM needed to execute a function, with storage also available on the cloud provider’s platform.
 
I ran across an interesting article that talks about serverless platforms on premises don’t quite make sense. The idea with serverless is that you most closely pay for what you use, not being charged for times when your code isn’t being executed. On premises, you would need some hardware running all the time that you are paying for, which is ready for when code is called to execute.
 
I’d disagree slightly, especially with architectures like Azure Stack that blur the line between private and public cloud resources. With Azure Stack, you should (at some point) be able to write applications using serverless functions that execute in your data center. If you need more resources, you scale your data center up with Azure cloud resources, and pay for your usage. When the workload shrinks, you stop using cloud resources and just use your data center.
 
Most of us won’t necessarily want to run an Azure Stack, so why would be use serverless on premises? To me there is one element of a cloud service I can’t control: what other people do on the platform. Cloud services are large and distributed and in use by lots of customers at a time. If I execute things in my data center, on some serverless platform, I have better control over how things work and likely more predictable performance. If my workload is well known, I also probably have lower costs.
 
In many cases, we know the workloads of our databases, and we want predictable performance (however good or bad it is). Databases are potentially a good fit in the cloud, but often in a mature application, we would be better served by keeping the database on premises, especially if we’ve already invested in the hardware and other resources.
 
Serverless is a very interesting idea, as is much of the cloud. It might suit your application, or it may not, but you have to think about the requirements for your situation. Knowledge of new options and technology is important for us to intelligently debate and discuss what works best for our organizations.
 
 
 

Steve Jones - SSC Editor

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

 
Redgate Webinars
  Featured Contents

A Self-Serve System to Refresh Databases – Part 1

bkubicek from SQLServerCentral

Empower developers to refresh their own test systems with production backups.

Introduction to SQL Server Security — Part 5

Steve Jones - SSC Editor from SQLServerCentral

SQL Server contains many built-in views and functions that can be used to understand what is going on “under the hood,” and security is no exception. In this article, Robert Sheldon explains the security related catalogue views, dynamic management views, and system functions

Which Database is Causing the Problem?

Additional Articles from Brent Ozar Unlimited Blog

You’ve got one SQL Server hosting a bunch of databases, and performance is bad. Which database should you focus on first?

From the SQL Server Central Blogs - Using the same Azure DevOps build steps for Terraform with different Pipelines with Task Groups to build an Azure Linux SQL VM

mrrobsewell from SQLServerCentral

In my last post I showed how to build an Azure DevOps Pipeline for a Terraform build of an Azure SQLDB. This will take the terraform code and build…

From the SQL Server Central Blogs - STEP-BY-STEP: HOW TO CONFIGURE A SQL SERVER 2008 R2 FAILOVER CLUSTER INSTANCE ON WINDOWS SERVER 2008 R2 IN AZURE

david.bermingham from SQLServerCentral

Intro On July 9, 2019, support for SQL Server 2008 and 2008 R2 will end. That means the end of regular security updates. However, if you move those SQL…

 

  Question of the Day

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

 

Filtered Statistics

How can I create filtered statistics on a column in a table?

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

 

Redgate SQL Prompt
 

 

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

Getting Dataframes in Python

Which Python command is used to import the data structure and data analysis tools such as the DataFrame() function?

Answer: import pandas

Explanation: Pandas is the library used for data work. Ref:Python Pandas - https://pandas.pydata.org/

Discuss this question and answer on the forums

 

Featured Script

SQL Server Worker Thread Alert

SQLShark from SQLServerCentral

We decided to build a quick worker thread alert so we know when we are near the limits.

--Author - Ed Pochinski 04232019
--Purpose - AG Worker thread alert
--SSC posting copy
Declare @availableThreads varchar(25), @workers_waitingForCPU varchar(25), @Request_waiting_ForThread varchar(25),@msgbody varchar(500), @msgsubject varchar(500)
Select @availableThreads = (select max_workers_count from sys.dm_os_sys_info)-sum(active_Workers_count) from sys.dm_os_Schedulers where status='VISIBLE ONLINE'
Print @availableThreads
Select @workers_waitingForCPU = sum(runnable_tasks_count) from sys.dm_os_Schedulers where status='VISIBLE ONLINE'
Print @workers_waitingForCPU
Select @Request_waiting_ForThread = sum(work_queue_count) from sys.dm_os_Schedulers where status='VISIBLE ONLINE'
Print @Request_waiting_ForThread
--edit threshold to accomodate this is a test machine with no load so the number is high to facilitate the alert for testing
If @availableThreads <=545
Begin
Print ' Send a email alert here !!!!! Worker threads are low: ' + @availableThreads + ' Workers Waiting on CPU: ' + @workers_waitingForCPU + ' Requests Waiting for thread: ' + @Request_waiting_ForThread
set @msgbody ='Worker threads are low on Server: ' + @@servername + ' - Available Thread Count: ' + @availableThreads
set @msgbody = @msgbody + char(13);
set @msgbody = @msgbody + ' Worker Threads Waiting on CPU count: ' + @workers_waitingForCPU + char(10);
set @msgbody = @msgbody + ' Requests Waiting for worker thread count: ' + @Request_waiting_ForThread
set @msgsubject = '!!! AG Worker Thread Alert on SQL Server: ' + @@servername + ' !!!'
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'Your_Email_Public_Profile',
@from_address = 'YourEmail@here.com',
@recipients= 'YourEmail@here.com',
@subject= @msgsubject,
@body = @msgbody
End

More »

 

Database Pros Who Need Your Help

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


Windows Server 2016 or Windows 10 for SQL server!!! - Every MS SQL server I have worked with in the past has been run on Windows desktop because I worked in radio and it was cheaper for our clients (who had very limited funding). I’m now in a position where it’s my decision about going Windows server or desktop on production MS SQL machines that are our […]
Beginner help with SQL Server Management Studio 2016!! - OK, so am still new to the world of SQL. Am teaching myself on the job and have a question I need help with.   I’m noticing that it isn’t just as easy as open a query that I’ve saved and running it. The Query windows needs to be connected to a specific database. I’ve […]
Post from the future - I haven’t seen anything to say otherwise, and I post I made earlier suggest the same, but all post times are currently displayed in UTC (I suspect this post will show it was made at around 08:40 on 28 April 2019). This post, however, appears to have come from the future, as it’s going to […]
Get Records from UDT - I’m trying to get data from User-Defined Table type which has the values needs to be inserted into Parent & Child table. In the below-stored procedure, I’m using separate SELECT statement for getting values from User Defined Table and inserting into Parent & Child table. Can you please help me with the following questions? 1) […]
Export results of a Stored Procedure to a PC Folder - Hi Forum, I have a Stored Procedure that selects one record from a table. I want to select one row at a time (maybe using a cursor?) and paste into a Folder on my PC’s ‘C’ Drive. I have below the code to create the Stored Proc & then the script to run it. This […]
Status Update 26 Apr 2019 - Another slow day. New developer trying things, some not working. Old developer out with back issues. A few other things moved to test and got kicked back and fixed, but no real changes. Filed 3 new issues. 1 frontend high priority, 2 frontend low backlog. Hopefully things will pick up speed next week.
SSIS connection manager to a MySQL database - Hello, Looking for some help with creating an SSIS connection manager to a MySQL database.  I have tried the following with no luck: https://smallbusiness.chron.com/connect-mysql-ssis-60851.html The error message is: Test connection failed because of an error in initializing provider. Authentication to host ” for user ” using method ‘caching_sha2_password’ failed with message: Access denied for user […]
ADFS database [dbo].[IdentityServerNotificationCleanup] - There are a couple of adfs servers (pri and sec) with backend adfs database. This was installed by an ex-employee and that user is the database owner (account does not exist in AD anymore). However, the ADFS service runs on a service account and that service account also owns the schema for IdentityServerPolicy in database […]
SQLCMD Mode - Hi, I’m just curious. I know when we as database administrators and developers install SSMS on a new machine, we either import or set our preferences. I know there’s 10 or so that I set. One thing I’m curious about is whether you enable SQLCMD Mode to be on by default. Having it on should […]
ssrs display bullet in report - In an ssrs 2012 report, I need to place bullet dot marks on several lines. The dot looks like the following: • . Thus can you tell me on to setup this representation in the SSRS report? There is probably some kind of a character representation that I need to use.
Alias server names - Hello. This should be simple, maybe. I have to work with over a dozen servers all named such as VSKDFJLMM99003. I don’t want to (well, I can’t) rename the servers. But it would be nice that when looking at Object Explorer, they were labeled as something more readable, like “Mortgage_dev” or something like that. Is […]
is_rpc_out_enabled - Can someone tell me if this setting should be set to true or false? I have a list of linked servers and I have noticed that for some, it is set to true and for some, it is set to false.
web.config security best practice - So a dev has created a web app connecting into one of my dbs with a connectionString hardcoded into the web.config.  We’re using a sql login. He has left.  I want to harden it if possible.  Can I create a dsn & reference this instead?  Or is there something else I could do to secure […]
Text file import - Is there a script that scan take text that is not column delimited and transfer each line into a separate record and each line where it is separated by a number of spaces inserts into a separate column. For example the format of the txt file is as below but there are hundreds of lines. […]
limitations for RDS - Hello everyone What limitations can  I have if I migrate to RDS SQL Server? thank you for your feedback
 

 

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

 

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