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

Daily Coping Tip

Get outside and observe the changes in nature around you

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.

Going On-Prem?

This editoiral was originally published on Jul 11, 2016. It is being republished as Steve is on holiday.

When I started in this business, every company owned their own servers, and had their own data center. Now, some of those data centers were closets (including that for one state government Senate). Some were offices-converted-to-computer rooms, rarely with separate air conditioning until I requested it. Some were actual data center rooms, though usually for larger companies. The idea of putting your computing resources off-site was seen as ludicrous.

As time passed, the idea of using a co-location facility grew. In fact, SQLServerCentral went from a couple machines in a residential basement to a locked rack at a facility in Denver. Many companies started to use third party data centers, and in the late 90s and early 2000s, this was common, with facilities springing up. Full time employees will often racked equipment and visited data centers when they needed physical access.

This changed over time as virtualization grew, and more and more companies started to rent a VM, rather than purchase a physical box. Some still used physical machines, but they rented the machine, allowing a third party to setup and mount the equipment, sometimes even installing the OS and then providing access to the lessee. We've come to the place now where we have cloud services that are often just platforms or services, where we have no idea of the underlying equipment. In the case of things like Salesforce, Azure SQL Databases, or Amazon's RDS, we don't even care, just asking for a certain level of performance.

Is this the future? Will we now be asking ourselves if we "want to go on-prem" as the default question? I ran across the blog linked, which is from a SaaS perspective, that is trying to always get customers to use the service (or platform) and never have a local install. I know Microsoft would like to do this, especially for Azure databases as they make more profit on compute services.

Some of you think this is crazy. In fact, I know plenty of industries that struggle with this from a regulatory standpoint. However, I'd point out that the idea of letting someone else run your email system was seen as crazy 20 years ago. Today many people (myself included) would never think to install Exchange or any other email software. We would always purchase this service from someone else.

Tim Mitchell had a podcast interview recently talking about whether the on-premise data warehouse is dead. While I think the Azure Data Warehouse has some great advantages, and is worth considering, I'm not sure the local DW is dead. In fact, for lots of tasks I perform, including software Continuous Integration builds (.NET or database), I prefer to have some local resource doing the work. Especially when I can't predict the number of times I'll build and that task is easy to scale on local machines.

I don't think that we are at the point where we'd put more databases in a cloud service than on premise, but I do think that for new applications, it's a valid question to ask whether the database and application could be hosted in the cloud.

Steve Jones - SSC Editor

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

 
 Featured Contents

Service Broker Part 1: Service Broker Basics

Klaus Aschenbrenner from SQLServerCentral

This article covers SQL Server 2008 Service Broker, an asynchronous messaging framework that is directly integrated within the relational engine of SQL Server. The series will provides you with the basics about implementing Service Broker applications and how you can transparently scale them out to support any required workload.

Questions about SQL Prompt you were too shy to ask

Additional Articles from Redgate

Phil Factor answers some questions you've been itching to ask about SQL Prompt, covering ranked code completion suggestions and auto-fixing SQL code smells, and suggesting where in the tool to find other nuggets of hidden treasure.

How to Build a Cost Effective Virtual Desktop for Your Remote Teams

Additional Articles from MSSQLTips.com

In this article we look at how you can easily build virtual desktops that you can deploy to your teams using Amazon WorkSpaces.

From the SQL Server Central Blogs - Azure DevOps–Using Variable Groups

Steve Jones - SSC Editor from The Voice of the DBA

I was in a webinar recently and saw a note about variable groups. That looked interesting, as I’ve started to find that I may have lots of variables in...

From the SQL Server Central Blogs - Persistent Server Name Metadata When Deploying SQL Server in Kubernetes

aen from Anthony Nocentino's Blog

In this post, we will explore how a Pod name is generated, Pod Name lifecycle, how it’s used inside a Pod to set the system hostname, and how the...

 

 Question of the Day

Today's question (by sknox):

 

What Resets @@ROWCOUNT?

Which of the following statements (AFTER any SELECT statement) will set @@ROWCOUNT to 0? Assume the statements are fully completed and reference existing objects/transactions. (you do need to choose MORE THAN ONE answer)

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)

Checking the Check Constraint

What happens when I run this code?

CREATE TABLE MyTest
(   myid  INT
  , myval INT CHECK myval < 10
);
GO

DROP TABLE MyTest;

Answer: A syntax error is returned

Explanation: This results in a syntax error. The expression after CHECK needs to be in parenthesis. Ref: Creating Check Constraints - https://docs.microsoft.com/en-us/sql/relational-databases/tables/create-check-constraints?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
Distributed Availability Group Failover test without affecting Primary site - Hi I have created a test environment with Distributed Availability Group (SQL 2016)  for DR Testing and I can fail over to DR. Now I need to test the DR site databases with application. To avoid the test data sync  back  to Production site, i have to drop the Distributed AG. Is there any way […]
Locking issue - All, I would appreciate some advice on identifying an issue. The error I received is: "The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time" I was monitoring sys.dm_tran_locks and I saw the query is taking a lot of page locks. I'm therefore thinking that the issue is either: […]
SQL Server 2017 - Development
Visual Studio Database Project Reference to a Non-Project Database - I have a database solution in Visual Studio Enterprise 2019 which consists of four database projects. My databases live on a shared SQL Server instance that hosts multiple solutions. My database projects take advantage of objects on that instance in another database that I do not control, and is not managed in a VS solution […]
SQL Server 2016 - Administration
Availability Group Latency Check -   How can I check if there is latency between primary and secondary on SQL Server 2016. Are there any scripts available?. What in specific you look for in the availability dashboard. For example, I see all the db's in green ( healthy) however found out that we still had 40 secs latency. Do you […]
Recovering SQL databases - Hi I'm looking into recovery plan for individual SQL databases. The scenario I'm planning for, is if a single SQL database on an instance with multiple databases, for multiple applications, becomes unavailable. My thought is to have a cold standby server we can restore the database to, then use CLIconfig on the application servers to […]
SQL Server 2016 - Development and T-SQL
Ugly code fix - CASE WHEN Phone IS NOT NULL OR MobilPhone IS NOT NULL THEN CONCAT(CONCAT(LEFT(COALESCE(Phone,MobilPhone),3),'-'), CONCAT(CONCT(RIGHT(LEFT(COALESCE(Phone,MobilPhone),7),3),'-'), RIGHT(LEFT(COALESCE(Phone,MobilPhone),12),4))) ELSE '' END As PhoneNumber I inherited this god awful code. I comment this variable out and the query executes in < 30 seconds against a sizable number of records.  (~ 1MM). I add this little tidbit of insanity back […]
Administration - SQL Server 2014
How to find all Linked Servers pointing to our instance? - Hi all. We are preparing for migration, and scripting all our Linked Servers. But how to find all other Linked Servers, that originate on different instances but leading to ours? Thanks    
Development - SQL Server 2014
TRY_CONVERT missing? - Hi gurus! I am trying to use the try_convert function on a SQL Server 2014 Standard Edition and a SQL Server 2016 Developer Edition (my staging) and I am getting this: Msg 195, Level 15, State 10, Line 11 'TRY_CONVERT' is not a recognized built-in function name. Am I missing something?  As usual, any help […]
location address without file name - If my column contains these values. C:\AABCD\EDFG\RFG\MyDB123.bak D:\RFG\MyDB1123.bak E:\AABCD\EDFG\MyDB1223.bak How do I select only these in my output C:\AABCD\EDFG\RFG D:\RFG E:\AABCD\EDFG Thanks
string selection - If my column contains these values. A:\AABCD\EDFG\RFG\MyDB123.bak A:\RFG\MyDB1123.bak A:\AABCD\EDFG\MyDB1223.bak How do I select only these in my output A:\AABCD\EDFG\RFG A:\RFG A:\AABCD\EDFG Thanks
SQL Server 2019 - Administration
A read operation on a large object failed - I got an alert every day recently at different time on SQL server box DESCRIPTION:   A read operation on a large object failed while sending data to the client. A common cause for this is if the application is running in READ UNCOMMITTED isolation level. This connection will be terminated. This is hard for me […]
Numerous IF and Else clauses & its execution time in sys.dm_exec_procedure_stat - Hey SSC, Please if we have a stored procedure in which at a time only a single code segment of IF is executed out of many IFs in the procedure. Every IF code segment has a different query and execution time. So on cumulative what info would be sys.dm_exec_procedure_stat will bring to us? and how […]
SQL Server 2019 - Development
Hello I need help to improove the following query with many joins - Hello I have this query   SELECT ISNULL(sta5.AttributeValue, rdd5.Value) as 'Manufacturer Code', ( SELECT TOP 1 ID2.Content FROM ItemMaster IM join ItemMasterDetail ID1 on IM.Id = ID1.ItemMasterId and ID1.ItemMasterAttributeId = 14 join ItemMasterDetail ID2 on IM.Id = ID2.ItemMasterId  and ID2.ItemMasterAttributeId = 15 WHERE ID1.content = ISNULL(sta5.AttributeValue, rdd5.Value) and ID1.Sequence = ID2.Sequence order by ID2.[Sequence] desc […]
SQL Server 2008 - General
Select query is slow for Non clustered index - I am using SQL Server 2008 R2. Select query is slow when non cluster index is used in the table  compared to table without index. Query used: select * from table order by customer_name It is  too slow (more than 1 minute for 40000 rows) Error was due to non-clustered index , without index  query […]
SQLServerCentral.com Website Issues
Can post please be stored in nvarchar? - It actually surprises me this should even be a request. Post data, however, appears to be stored as a varchar, not an nvarchar which is causing malformed post, including today's QOTD. Obviously this data has not been lost, but this should be fixed, as it can't be assumed that post will only contain characters from […]
 

 

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

 

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