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

Daily Coping Tip

Enjoy new music today. Listen to a recommendation from someone else

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.

When to Use a Database

One of the trends of the last ten years has been for many developers to try and avoid using a relational database where possible. Some look to NoSQL data stores, and others even consider flat file type stores of JSON or other formats that allow developers to work with speed and agility. Quite often it seems that applications grow to require some sort of relational store, often as an additional data store.

I ran across an article from a data science and analysis developer that is often performing work in R or Python on datasets. At some point, the post notes that when your dataset(s) become larger than memory, you might want to consider using a local database of some sort.

Actually, the first question the author asked was "when is your data too big?" Their answer: when operations take a long time, which was 20 seconds for the author. I tend to agree as I am looking for Notepad-like startup performance for apps, and query results in low 10s of seconds.

Most people that perform some sort of data analysis understand tables. Whether this is in R, Python, or even Excel, the table structure for data is familiar and easy to work with. While some analysts might not be overly concerned about normalization, that isn't always a problem for situations where data is loaded into systems and rarely (if ever) updated. In these cases, just having a database of some sort, could speed up your work.

I think you ought to use a database early, if for no other reason than this is good practice with loading and storing data in a form that is persistent, scalable, and often can perform better across time with disparate queries and data manipulation. While quick experimentation is rapid with in-memory tools, I think a database is better suited to queries across time.

I know I'm biased, but if you find data scientists and other analysts struggling with data sets, offer them a database. They can easily share data, you can protect it with backups, and you might find that you both learn a few things from working together.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

SQL Server Data Masking: a comparison with Gallium Data

maxtardiveau from SQLServerCentral

Introduction In SQL Server 2016, Microsoft introduced a new feature called dynamic data masking, which allows you to mask the values of certain columns and keep that data hidden from certain users, without having to modify your applications. Let's take a look at how SQL Server does data masking, and compare it to the way Gallium Data […]

External Article

Top Query Search in SQL Monitor

Additional Articles from Redgate

SQL Monitor v12.0 has added a new Query Text Search feature to allow users to search the text of the most expensive queries that executed on a SQL Server instance over a period. Here's what it does, and how it works.

External Article

Trusting STRING_SPLIT() order in Azure SQL Database

Additional Articles from MSSQLTips.com

Learn about the changes to the STRING_SPLIT function in Azure SQL Database that allows you to specify ordinal position of the output.

Blog Post

From the SQL Server Central Blogs - Issue with Windows pass through authentication

matt.bowler from Ctrl-alt-geek

It began with an error thrown by a linked server. The linked server is on our warehouse server and connects to our SSIS server using the “login’s current security...

Blog Post

From the SQL Server Central Blogs - Data jokes

Kenneth.Fisher from SQLStudies

I’m feeling a bit uninspired this week, and I plan on only doing one post this week, so I figured ... Continue reading

 

 Question of the Day

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

 

Default Masking

I have a 20 character varchar string column in a table. I want to add dynamic masking to the column with this code:
ALTER TABLE dbo.DDMTest ALTER COLUMN String1 ADD MASKED WITH (FUNCTION='DEFAULT()');
I have two rows with values in this string column. One row has 1 character, one has 5 characters. If a user queries these rows without the UNMASK permission, how many Xs will appear for the 1 character string and the 5 character string?

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)

Finding the ADF Trigger

What variable gives me the name of the trigger that invoked an ADF pipeline?

Answer: @pipeline().TriggerName

Explanation: The @pipeline().TriggerName variable contains the name of the trigger that invoked the pipeline. Ref: System Variables - https://docs.microsoft.com/en-us/azure/data-factory/control-flow-system-variables

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
Retry SQLAgent Job - Hello. Does anyone know how I can retry a job should any one of it's steps fail ? To clarify, I don't want to retry the job step but the whole job. Thanks,  
create index columnstore - hello , Who has any idea please how to rebuild a clustered index to a clustered columnstore index thanks
SQL Server 2016 - Development and T-SQL
Run second query if first completes - I am having a total brain cramp. I have a query the populates a month_end_summary table from nightly_results table. If the query runs correctly i want to run a query to delete the nightly_Results table. but only if the first summary query runs with out error. i can do the try catch on the first […]
Update alias or update tablename when from clause is specified - I would like to ask your opinions and recommendations on how to properly write an update with a from clause. I'm putting this in the SQL Server 2016 forum as that is the version we are mostly using. The syntax hasn't changed however in newer versions -as far as I know- so the same question […]
efficient large table cleanup - looking for examples on doing a large table cleanup where my attribute value selected has an attribute_value of Null. I would like to maybe do it in Batches where I deleted say 20,000 in 5 iterations then exit.   Attribute = 'csx' and attribute_value is null Thanks.   CREATE TABLE [dbo].[Quality_Attribute]( [Quality_ID] [int] NOT NULL, […]
SQL Server 2012 - T-SQL
Get Summary Data for Last 52 weeks by Week - I have a table which stores shipment data by date. We have a need to get last 52 weeks Shipments by week. If today is 11/29/2021, My first week should be between Nov 23-Nov 29 Week 1 , 2020 and so on . Week always starts on Monday and ends on Sunday. Table: Shipments , […]
SQL Server 2019 - Administration
Upgrade in place error (2017 to 2019) - invalid name space. - Upgrade stops with an invalid namespace error (that was it, no error codes of any kind).  Retry fails.  then hit the Cancel button and the upgrade continued and finished.  This was in the SqEngineCongigAction_upgrade_config_Cpu64 phase.  This was a warning and the finish was all green.  I had uninstalled SSMS and rebooted before the upgrade. I […]
SQL Agent Driving Me Nuts - Been given a new server running Win 2019 & SQL 2019 unable to run bat jobs with SQL Agent So to try & simplify & understand what is happening have a simple bat file that is called test.bat,  contains the following @echo off echo Test Test Test pause SQL agent has full access rights to […]
SQL Server 2019 - Development
Help with SQL Query - Hello SQL experts, Please see attached file for table detail. I have a temp table name company similar to what’s shown above  and I am trying to write a query that will SUM up the totaAmt column for each company then subtract that total from the company’s Bid_Limit of  25000  to find the Results. I […]
help with SQL query PGADMIN - 2 tables Users : User_id, First_name, Last_name, Gender. Deposits : User_id, time_stamp, amount. i need to write a query that returns as result all users with Gender="M" from User table and for each user his total sum amount from deposits table taking into account only deposits made after 1/1/17 and on amount which is higher […]
T-SQL query combine rows into a single column -   Hi all, I'm a newbie to T-SQL. Please can you help me with the below query . Thanks in advance! my desired o/p ------------------  my input code ------------------ IF OBJECT_ID('dbo.test', 'U') IS NOT NULL DROP TABLE dbo.test; create table test (person_id int , name_change nvarchar(75) ) go insert into test values (1,'Mr Herby Spike') […]
General Cloud Computing Questions
Which version of SQL should I use? - I see SQL as a query language, used to store and retrieve data. However, there are now many versions of new words with different features. Now I am using SQL to manage school data. So now which version should I use? Please give me some advice.
Powershell
run multiple scripts inside main logic - Currently I have this script executing based off another process, but only if I actually have a file to process. Now I would like to add additional scripts to be executed. What is the best way to go about that, and if something fails don't process anymore that follow. Thanks. $path = '\\srv1\dblocks\' $file = […]
Integration Services
ODBC - Pipeline component has returned HRESULT error code 0xC0208457 - I am trying to connect to MYSQL as a target/destination via ODBC. I am getting this error, pls assist?   TITLE: Microsoft Visual Studio ------------------------------ Pipeline component has returned HRESULT error code 0xC0208457 from a method call. Error at Data Flow Task [ADO NET Destination [71]]: Failed to get properties of external columns. The table […]
Trouble connecting MYSQL in SSIS - I connect to MYSQL in SSIS with MYSQL data provider. I am getting the errors below. I also tried via ODBC using this code Driver={ODBC Driver 13 for SQL Server};Server=myServerName,myPortNumber;Database=myDataBase;UID=myUsername;PWD=myPassword; I just cant seem to figure out where the problem is. Please assist?   [ADO NET Destination [2]] Error: An exception has occurred during data […]
 

 

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

 

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