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

The Road to Better Data Handling

Recently I was on an internal communication thread with multiple people at Redgate Software. We have various ways to keep our (semi-) distributed teams in touch with one another and handle issues. While email works, I think many people like Slack better for quick discussions. I appreciate that as a remote worker since I'm not around to hear a conversation around a desk. To be fair, with a busy staff, others often aren't as well, so a thread in Slack often saves details others can see later.

In any case, we had some issue. I don't know if this was a product issue with a customer or a communication item for our marketing group. No matter what it was, we had someone mention they could help if the first poster would provide details. The next message that I saw was great. It said something along the lines of

"Please do not post email details in Slack."

A gentle reminder, but one that was needed. It's great that we want to help others and work through problems, but in many companies we've played far to fast and loose with data. Many of us hate the constant struggle to extract (or remove) information in "notes" fields in our databases. It's a hassle when we want to work with data that hasn't been put in a normalized space.

It's also a source of data leakage. While we might appreciate getting a quick note, these aren't secured communications, and more importantly, they provide yet another attack vector for problems if we lost control of the backups, archives, etc. Even worse, we could have gotten a request to remove emails and someone decide to contact the user later, knowing they can search through old Slack messages.

Likely a bit of an extreme example, but still a place where data handling should be better. We have secure systems for tickets or issues where we can store data. Or we can reference their information in another way. I've started doing this in GitHub, where we often log issues for SSC users. Rather than putting in an email, I'll put a user ID or other identifier. If the user wants to delete their account, I don't want their email floating around anywhere it isn't required.

While it might be a bit more hassle to be careful with personal information, I think it's much better than treating it as unimportant and potentially having it disclosed in some security incident. Whether it's my email, tax ID number, or credit card, I'd want my own data handled carefully and am trying to do the same for others.

Steve Jones - SSC Editor

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

 
Redgate SQL Compare
 Featured Contents

What’s the Difference Between PERCENT_RANK and CUME_DIST?

Kathi Kellenberger from SQLServerCentral

Learn a bit about the different results you get from the PERCENT_RANK and CUME_DIST aggregate functions.

How can we close the tech skills gap?

Additional Articles from Redgate

One of the most profound challenges faced by technology companies today is talent. According to the latest Harvey Nash survey, 65% of CIOs believe that a shortage of tech skills is affecting their ability to respond to change.

Improving Tech with Compassionate Code

Additional Articles from SimpleTalk

There is quite a bit of suffering within tech and caused by tech, from poorly commented code to shaming someone who asks a question on a forum. In this article, Samuel Nitsche explains why compassionate coding is a better way to go.

From the SQL Server Central Blogs - It’s interesting how an OR short circuits.

Kenneth.Fisher from SQLStudies

I recently did a post on the case expression short circuting and received a very very interesting comment from Chad ... Continue reading

From the SQL Server Central Blogs - Simulating Load

Steve Jones - SSC Editor from The Voice of the DBA

I needed to generate some load for a demo and wasn’t looking forward to doing it. I was in a hurry, and didn’t want to deal with a lot...

 

 Question of the Day

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

 

Reducing Round Trips

I need to code some SQL in my application and make parameterized calls. I want to minimize round trips as well. Which of these choices should I choose?

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

 

Redgate SQL ProvisionRedgate SQL Prompt
 

 

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

Executing Python from SQL Server

I use sp_execute_external_script to call a Python script from SSMS connected to SQL Server. That script has a print() statement to STDOUT. Where do my results appear in SSMS?

Answer: In the Messages tab

Explanation: Results from Python scripts will be in the Messages tab. Ref: Quickstart: "Hello world" Python script in SQL Server - https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/quickstart-python-run-using-t-sql?view=sql-server-2017

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
AlwaysOn AG versus FCI Licensing - AlwaysOn Availability Groups (AG) and AlwaysOn Failover Cluster Instances (FCI) Checking to see the licensing cost for 2 and 3. Would there be licensing cost for secondary replica or the cost would be for secondary server only? Please advise? FCI is for HA scenarios. An AG synchronous secondary replica, co-located with the primary, is for […]
Powershell for Automating SQL Server Restore. - Team, Has anybody written a Windows Powershell Script to Automate the SQL Server Restore process. I am looking for following Input Parameters:- DB Name Backup Path The script should be able to script out the Logins before starting the Restore process. I am looking for to Restore the Databases using it's most Recent Backup copy. […]
Verifying Backup Integrity. - Team, If DBCC CHECKDB is successful; do we still need to perform Verify Backup Integrity while taking the DB Backups. As far as i believe; if DBCC CHECKDB is successful then it means that the Database is free from any sort of corruption. In that case; there shouldn't be a need to perform Verify Backup […]
Updates are failing - Hi All, We are facing a roadblock in production server, hope experts can give some solution here. we are having a 900GB MS-CRM on premise database with replication in place. In every 6-8 hours interval DB is declining all updates from application, unable to find the exact reason. any updates to any table is giving […]
FO cluster.... Sql browser behaviour - Apologies if this topic has been cleared away many times. I can't locate the specifics of this if so. A new Sql 2017 Ent FO cluster default instance (1433) named instance 1 (1434) named instance 2 (1435) named instance 3 (1436) named instance 4 (1437) named instance 5 (1438) I can connect to the default […]
SQL Server 2017 - Development
Stored Procedure broken out into views - So my end result, I want to use the dataset in Tableau. Right now, I have a stored procedure. DECLARE @name TABLE ( VALUE1 VALUE2 VALUE3 )   SELECT DIFFERENT VALUES AS VALUE1 VALUE2 VALUE3 INTO #A FROM DB1 WHERE ( MYPARAMETERS = -1)   SELECT DIFFERENT VALUES AS VALUE1 VALUE2 VALUE3 INTO #B FROM […]
Indexing for View Containing UNION - Basic outline is that I wish to ensure uniqueness of data within a table where some of the data can be considered as "shared".  Sample data and code: - The intent is "C" is not an actual owner - that all the records with "C" as their owner are effectively shared for all other owners, […]
SQL Server 2016 - Development and T-SQL
Disappearing posts - Hi all I've tried to post an issue that got marked a SPAM (for no reason that I could see, although I did try to edit it to correct some typos). The forum will not allow me to post the question again as it's saying "Duplicate post" but I can't see it.   The post […]
date yyyy-dd-mm in SQL 2016? - Hello, Our new serer SQL 2016 on Windows 2019 is set to language British English. My login is set to British English. Then why is the count of records showing different when using this date format: >= 2018-08-01 It's giving records total from  8th January instead of 1st August. I am comparing the same query […]
tsql help - Hi All, Need some help in preparing a restore cmd dynamically using metadata which is stored inside a table. We need to read the file locations from the metadata table and form the RESTORE commands. -- metadata table CREATE TABLE [dbo].[FilelocationsTBL]( [dbid] [smallint] NULL, [dbname] [nvarchar](128) NULL, [logicalname] [varchar](100) NOT NULL, [filename] [varchar](300) NOT NULL […]
Development - SQL Server 2014
If we pass the DB name paramter should take the backup in the same server - Hi Team, Please help me on this below metioned code. Requirement: If we pass the DB name should take the Full or Diff or Tlog backups in deafult location where the data files existed  in the same server. First it should check the DB size and drive space is avaialble then it create or disply […]
bcp exporting to txt and wish to keep nulls - How to get end result where the word 'NULL' appears if value was NULL in source table? Getting WARNING: "Error = [Microsoft][ODBC Driver 11 for SQL Server]Warning: BCP import with a format file will convert empty strings in delimited columns to NULL."  , yet wherever there were NULLS in source table there are blanks in txt file. […]
SQL Server 2008 - General
Duplicate Query Failing to return the correct count - Hi All, WITH TempTable ( DuplicateCount, CustomerID, ActivityID, [RelatedReferenceID], [RelatedReferenceType], [Due Date], [TableType], [Team Member], [TableStatus] ) AS ( SELECT ROW_NUMBER() OVER(PARTITION by CustomerID, ActivityID,[RelatedReferenceType], [Due Date] ORDER BY [Due Date]), CustomerID, ActivityID, [RelatedReferenceID], [RelatedReferenceType], [Due Date], [TableType], [Team Member], [tableStatus] AS DuplicateCount FROM Tbl_MyTable ) Select * from TempTable The problem here is that […]
Reporting Services
Linked Report Parameters Not updating when master is changed - Hi , as above we have a report say with a parameter which two options and a linked report.   If on the main the design is changed so the parameter can accept multiple values , the linked report doesn't automatically allow the same. We have to relink the report.   Is there a way […]
Disaster Recovery
Attaching Multiple MDF and having LDF regenerated - There are a bunch of posts for attaching a single MDF and having the LDF regenerated using sp_attach_single_file_db. Can anyone see anything wrong with this approach for doing the same thing with multiple MDFs? 1. Detach the database 2. Delete or move the log file to a new location so it will not be found. 3. […]
 

 

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

 

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