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

Daily Coping Tip

Relax today with some yoga, tai chi, meditation or a quiet walk

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.

The Security of Source Code

I saw a somewhat scary story about a backdoor being added to the PHP source code repository. Apparently with an innocuous comment like "fix typo", they committed code to the main repo using the name of a maintainer. The issue was caught by a post commit review, but allowing users to commit to your VCS server while spoofing another is a problem.

I doubt this would happen inside an organization, where authentication and credentials are more controlled, but perhaps that's not the case. If someone got into your network, perhaps with a VPN vulnerability, would they be able to spoof another user and commit something to a git repo? That would be bad.

Maybe more important is having a process to review changes. Lots of organizations prevent commits directly to main without some review. Either automated testing or human review. In the case of security issues, I always worry about automated testing not accounting for the creativity of malicious actors. When someone comes up with a new attack vector, how long before a test is written to check for this?

I don't know about to what extent git itself is vulnerable to security issues. However, if you use any VCS, you ought to ensure that you manage access and credentials and security as carefully as you might manage access to your network. It seems that attacks against source code are on the rise. Perhaps that might be the next, new way that hackers think they can disrupt your business and profit from the problems.

With DevOps, security is a concern, and rapid deployments have a downside that the pace of review and testing can be overwhelming. On the other side, you can patch things quickly, which is what I'd be more concerned about.

Steve Jones - SSC Editor

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

 
 Featured Contents

Installing Docker Desktop on Mac

aveek22 from SQLServerCentral

Introduction This article will help you install the Docker Desktop for Mac. Before we show that, let us start by understanding what the Docker Desktop software can do for you. To understand Docker, we need to understand what a container is. If you remember a few years ago, the only way of deploying application code […]

Recover Deleted TDE Key for Azure SQL Database

Additional Articles from MSSQLTips.com

In this article we look at the steps to recover a deleted TDE key that is being used by Azure SQL Database for database encryption.

A data transformation problem in SQL and Scala: Dovetailing declarative solutions Part II

Additional Articles from SimpleTalk

In this article, Shel Burkow uses the SQL execution plan from the previous article to write a program in Scala.

From the SQL Server Central Blogs - How does the buffer pool handle low memory conditions?

Randolph West from Born SQL with Randolph West

(Thanks to Erik Darling for reviewing this post. Check out his training materials.) One of the bigger clichés in the data professional vocabulary (behind “it depends”) is that you...

From the SQL Server Central Blogs - Book Review: Learn dbatools in a Month of Lunches

Matthew McGiffen from Matthew McGiffen DBA

If you work in the world of SQL Server you’ve almost certainly heard of dbatools. For those who haven’t, it’s an open source PowerShell module for automating literally hundreds...

 

 Question of the Day

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

 

Running SSIS in ADF

I want to execute an existing SSIS package using Azure Data Factory (ADF). I have uploaded my SSIS package into Azure and have a new pipeline. What activity to I add to the pipeline?

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)

Numbers to Letters

What does this return?

SELECT ASCII (65), ASCII (66);

Answer: 54 and 54

Explanation: This returns 54 and 54. The function takes the leftmost value of the parameter and gives you the ASCII numeric value. In this case, 6 is implicitly converted to a '6'. The ASCII value for a '6' is 54. Ref: ASCII - https://docs.microsoft.com/en-us/sql/t-sql/functions/ascii-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
Availability Group - Trying to understand the pros and cons. So I have SQL Server default instances and I am planning to configure as AOAG. However, the best practice I have heard is add the nodes to cluster first and then install SQL Server and configure AOAG? But I have situation where all the nodes are not available […]
SQL Server 2017 - Development
SQLCMD.exe get installed with SSMS? - Is the  SQLCMD.exe  supposed to be installed when SSMS is installed on a workstation? I've been told it is, but I cannot seem to locate it after SSMS was installed. I've looked where I typically find this  exe  , run a  DIR  search.  I do not find this  exe.  
T-SQL code help - Hello! I am designing one query where I have to convert the value from one currency to another. The problem is for I have to calculate a value with following conditions: In that transaction row, if the current row currency (A) is not equal to the posting currency (B) then I will have to go […]
SQL Server 2016 - Administration
fn_dump_dblog - Hi All I have been trying to figure out what has caused a spike in the size of a particular log backup. ' I am seeing entries for LOP_MODIFY_COLUMNS & LOP_MODIFY_ROW I found this in attempt to get an understanding... LOP_MODIFY_COLUMNS: Designates that a row was modified as the result of an Update command. LOP_MODIFY_ROW: […]
SQL Server 2016 - Development and T-SQL
Log Updates To Table - I've a user table that has four fields that need to be manually verified (as a daily batch) by an administrator any time they're changed.  The four fields may be changed over the course of a couple of different web pages.  The table does have a 'modified' column that records the date the last change […]
Transaction log and updates on large tables - I’ve inherited a query that on first glance should be re-written. The main part of which is performing an update on a table (200m+ rows) in a while and using nested selects in a not exists. I realise this is quite vague so can provide more detail. The query has a tendency to fill my […]
Complex .Json Data Parsing with multiples Array elements into SQL (MS-SQL 2016) - DECLARE @JSON NVARCHAR(MAX) =N'{ "code": 200, "msg": "success", "data": [{ "ITEM": "SP", "FACTORY_NO": [{ "FACTORY_NO": "1", "ORDERQTY": 10 }, { "FACTORY_NO": "1", "ORDERQTY": 20 } ], "DETAILS": [{ "LINE_INFO": "INLNE", "CARD_NUMBER": 13 }, { "LINE_INFO": "OUTLINE", "CARD_NUMBER": 14 } ] } ] }' Expected OUTPUT IN MS-SQL 2016 ITEM FACTORY_NO ORDERQTY LINE_INFO CARD_NUMBER SP 1 […]
SSRS Report doesn't refresh data - Hi all, I have SSRS Report that uses SP as a source. I have one filter - Activation Date and use such script for it: select distinct [Activation Date] from TableTest. Every month data in the TableTest updates. But in the SSRS filter I didn't see updated value. When I execute a query in the […]
How to change schema of all tables, views and stored procedures in MSSQL - Hello Community, I trying to use the following sql code to change the Schema for all my tables from dbo to Config SELECT 'ALTER SCHEMA Config TRANSFER [' + SysSchemas.Name + '].[' + DbObjects.Name + '];' FROM sys.Objects DbObjects INNER JOIN sys.Schemas SysSchemas ON DbObjects.schema_id = SysSchemas.schema_id WHERE SysSchemas.Name = 'dbo' AND (DbObjects.Type IN ('U', […]
SQL 2012 - General
How to Display FeatureName of Comptitor First then Npx Feature Name second Based - How to Display Feature Name of Comptitor First then NXP Feature Name second Based On Display Order? I work on SQL SERVER 2012 I face issue I can't arrange feature on same display order to start by comptitor feature name then nxp no issue on display order 1 and 2 because it is correct issue […]
SQL Server 2019 - Development
Debugger permission issue - We have a dev that used to use SSMS in order to debug code that was related to SQL.  I guess MS has taken that piece out of SSMS and now they are supposed to do this with Visual Studio.  Problem is, now we can't seem to get that to work right. Each time they […]
Reporting Services
SSRS inserting blank page - I have a main report calling three subreports. The subreports are being grouped together by the CourseID field. Page 1 shows course 1 for the first two reports. The third subpreport is for comments. If course 1 has comments, they will show up on page 2. If there were no comments, page 2 will be […]
Analysis Services
Changing SSAS TCP port directly in config file - Goodday, I have a problem with changing the TCP port for SQL Server Analysis Services by using the "msmdredir.ini" file I know how to change it by using Microsoft SQL Server Management Studio, but I want to change it directly in the "C:\Program Files (x86)\Microsoft SQL Server\90\Shared\ASConfig\msmdredir.ini" file, so that I can automate the installation/configuration. […]
Integration Services
SSIS Package to load contents of CSVs to SQL Table - I have 14 .csv files from which I need to extract 1) a date found only in the file name itself e.g. "ConvoEVQ2021-03-22" (i.e. I need to harvest the date part of the file name and place it in all the date fields of each SQL record associated with that .csv), 2) an individual's full […]
Last day of the previous month - Format MM/DD/YYYY - I use the below to get Last day of Previous Month, but I want the date format to be MM/DD/YYYY.  We are sending that in the output file. REPLACE(LEFT((DT_WSTR,20)DATEADD("d",-1,DATEADD("m",DATEDIFF("m",(DT_DATE)"1901-01-01",GETDATE()),(DT_DATE)"1901-01-01")),10),"-","/")   Thanks!
 

 

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

 

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