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

Daily Coping Tip

Create a playlist of uplifting songs

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.

Accounting for Typos

When I watched Star Trek as a kid, I was amazed by the technology. Talking to the computer, the touch screens, the handheld communicators. We have most of those devices now, without the space travel. Hopefully that will start to change with all the effort being made by various organizations.
 
One of the things that always bothered me was the chance for mistakes. A mis-spoken (or mis-heard) command to a computer that didn't verify things as a human might. The chance to hit the wrong part of the screen as the starship moved. It seemed as though soft buttons would have allow more mistakes than hard ones. Certainly humans make mistakes with physical switches, but I think I make more mistakes trying to hit a part of the screen in my Tesla than using one of the (few) buttons or wheels to change something. Interestingly enough, my 23 year old decided on a slightly older car because it had more physical buttons and few soft ones.
 
We are human. Frail and faulty. We make mistakes. Some are small (I ran a SELECT query on the wrong database), some are bigger. A mistaken copy paste error sent US$36 million away. That is the type of mistake that could happen to any of us, though hopefully not at this scale of financial loss.
 
This type of mistake is a main reason why I think DevOps and automated flows for development, testing, and even for production updates are a good idea. This doesn't prevent human error, but it does serve to limit it and reduce silly mistakes. Often these types of errors are caught when we force someone to work through a bit of a process. An easy and quick process, but still a process.
 
In this case, you would hope that someone looking to make changes would write an update that can be tested in a second environment before applying to the production blockchain. Perhaps with some idempotent wrapper and a pre-check that verifies the target. That might seem like overkill, but it's the type of care that most of us take when we know we aren't going to be the one executing the code. If you submitted a script to a DevOps process, you'd want to be sure the process running your code made the proper decision of whether to run the code or stop because of some error.
 
We won't prevent all errors, but a lot of automation and light DevOps process is designed to limit simple, silly human errors because we are tired, distracted, or otherwise unfocused. I am a proponent of having humans design systems and processes, but then letting the computer handle the drudgery of following the process over and over on a regular basis.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

SQL Server Sample Databases

Daniel Calbimonte from SQLServerCentral

Learn how to get and install sample databases for SQL Server.

External Article

Security in MySQL: Part One

Additional Articles from SimpleTalk

There are several tools available to keep a MySQL database secure. In this article Lukas Vileikis discuses access control and user privileges.

External Article

SQL Database Snapshots for Reporting, Auditing and Data Recovery

Additional Articles from MSSQLTips.com

In this article we look at how to create a SQL Server database snapshot and how snapshots can be used for reporting, auditing and more.

Blog Post

From the SQL Server Central Blogs - How To Create A SQL Server 2022 Learning Sandbox In Few Easy Steps

MarlonRibunal from Marlon Ribunal - SQL, Code, Coffee, etc.

Microsoft has recently released the public preview of SQL Server 2022. You can find info here. Microsoft peddles SQL Server 2022 as “the most cloud enabled version Microsoft has...

Blog Post

From the SQL Server Central Blogs - dbatools - Exceptions

Cláudio Silva from Cláudio Silva

Who doesn’t like a good red and verbose exception? At PowerShell community we often call it a “sea of red” which we found as something that can be intimidating....

 

 Question of the Day

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

 

Azure Storage Policies

I want to set a policy for a container in Azure Storage where I am storing some data import files. I want to use a Shared Access Signature (SAS). What types of limits can I set for the Access Policy?

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)

The Service Name

What does this code return?

SELECT @@SERVICENAME

Answer: The name of the named instance or MSSQLServer

Explanation: This variable returns the registry key under which SQL Server is installed. This is MSSQLServer for the default instance or the named instance name. Ref: @@Servicename - https://docs.microsoft.com/en-us/sql/t-sql/functions/servicename-transact-sql?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
Deleteing BLOB-STORAGE files from an On-premise server. - Dear all, I had some issues backing up from an on-premise server to an Azure FILE-SHARE using the Ola Hallengren scripts . The main issue it didn't work was the difference between an Azure FILE-SHARE and an Azure BLOB-STORAGE. I was trying to backup to the FILE-SHARE but that is not allowed using the Ola […]
Availability Groups - I will be running the application upgrade process which will run for couple of hours and behind the seen it will make bunch table changes such as create the new table with the field changes and then insert it back into the new table etc. So since my environment is always on AG with couple […]
Administration - SQL Server 2014
How can I configure heartbeat/cluster dedicated network - Hello, We have 3 VMs, 2 of which are Azure VMs.  We are trying to use one NIC as the administration and client connectivity and the other NIC as dedicated to cluster and availability group traffic.  I am having a heck of a time trying to find where you tell it the type of traffic.  […]
SQL Server 2019 - Administration
Issue with second instance being moved to a different node - I have a new SQL 2019 failover cluster which consists of two nodes and two SQL instances. The first instance is using port 1433 and the second 1439. During failover testing I have been having issues with the second instance. It moves across to the new node and all cluster resources are brought online and […]
SQL Latest Cumulative Update - Preparing for our monthly maintenance, I always use THIS MS SITE to check for the latest update. I see that the latest cumulative update for 2019 shows CU16 + GDR is available. Typically, this just shows CU16 because there is a separate column for GDRs. Any idea why?   Adding that I have downloaded CU16 […]
Backup Encryption - Hi , AG has been setup with 2 synchronous and 1 asynchrounos node. In asynchrounous node, the backup is running. Backup encryption is something I'd like to enable. I'd like to create a masyerkey and certificate in the asynchrounus node,then enable backup encryption. Then create the same certificate  in the other two nodes. Does it […]
Faster Retstore options. - Hi, I'm looking for a third-party backup and restoration solution because native restore takes roughly 7 hours for a 4TB database. Some of the object restore solutions really do a full restore in the background then just pull out the tables selected. This does not alleviate the 7-hour time limit. Is the Lite Speed version […]
SQL Server 2019 - Development
Replace function - Hi, Which is the best\elegant way to update a string in nvarchar(MAX) column? The record contains a string similar to this: 'The dog cat sat on the mat' I just want to replace the above to this: 'The cat sat on the mat'   Is this is the best way:   UPDATE myTable SET ColumnB=REPLACE(ColumnB,'dog […]
Reclaim space after setting varbinary(max) column to NULL - I have a sql server 2019 database with a table that contains  a varbinary(max) column . I have used SSIS package to move the content to a datawarehouse and update the varbinary(max) column to null. In SQL 2008R2 I was able to reclaim the space back after setting the varbinary(max) column to null by running  […]
Bringing all the columns not just the newly created - Hi. I have the below query but only brings the 'Max_VacationHours'  column. As yo may guess I am quite new to SQL. How could I do so that all the table columns come up not that the newly created query? Select MAX (vacationhours) as 'MinMax_VacationHours' From [HumanResources].[Employee] Union Select MIN (vacationhours) From [HumanResources].[Employee]
UNION from many linked servers - Hello! Here is an example of a script that selects into one table the same data spread across  2 linked servers --/****** Script for SelectTopNRows command from SSMS ******/ DECLARE @DateTimeStart DATETIME; DECLARE @DateTimeEnd DATETIME; SET @dateTimeStart = '2022-06-10 10:00:00' SET @dateTimeEnd = '2022-06-10 11:00:00'; IF OBJECT_ID(N'tempdb..#TQC') IS NOT NULL BEGIN DROP TABLE #TQC END […]
Amazon AWS and other cloud vendors
Which instance to choose? - So i usually don't have any clue which instance type to choose for any particular application to deploy. It's really difficult for me to assume how many cpu and ram will be enough for the particular application. How do you guys consider any specific type of instance type i mean large or medium or small […]
General Cloud Computing Questions
Connecting Cloud Run to cloud sql - having trouble getting this off the ground. im able to host a flask app using gunicorn but i keep getting "The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application. " when trying to connect to it. e: trying […]
General
Beginner: trying to understand when to use sql vs other tools - Hi everyone, I hope this is the right community. In my new position I’m pulling lots of sql reports. Other than BASIC sql, I’m use excel, powershell and python. Right now I’m having trouble understanding when I should export my sql queries to one of those other tools, vs. is it possible for me to […]
Integration Services
SSIS - ignore the file that has issue and continue with the others - I have 10 text files and file 4 at nth row has special character that cant be loaded to sql server table required is to log the issue AND ignore processing the 4th file and process the rest      
 

 

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

 

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