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

Daily Coping Tip

Find a new perspective on a problem you face

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.

Security Bug or Handy Feature

There are plenty of times that I want to share something with another person. This could be a link, a slice of data, or maybe the view of some page I've seen. Many applications make this easy, either on the Internet, or inside a company in Slack or Teams.

However, there are lots of times that I might want to share some data publicly, allowing anyone to get to it. That's a place where no shortage of data breaches have taken place, a problem we still grapple with today. It's not a "make-a-decision-once" problem either. I could set up some data for access to specific people using permissions. Then someone later changes to anonymous public access, mistaking some dataset that is sensitive for one that can be exposed. Likewise, I could have a dataset that I have set to be publicly available change, with sensitive data added later. The individuals adding the data might not be aware that this particular set is being shared without any controls.

I ran across this piece about PowerApps, noting that datasets can be configured for anonymous access if a list doesn't have table permissions enabled. That's an issue, as often enabling something looks like work. Many people often seek to avoid work and just complete a task as quickly and easily as possible. In many cases, they may not bother with enabling table permissions. Fortunately Microsoft later enabled permissions by default, but there are still cases of data owners exposing sensitive data.

Misconfiguring access is a big problem overall, and the best solution I see is to ensure data is classified and tagged. We can then build applications that have policies set on the way they handle data. If data were classified as PII or sensitive, then an app (like Power Apps), could refuse to allow anonymous access to be configured. Classifying data, however, is a tedious, boring, awful job. Even if this is easy to do across time, it's not a job anyone wants. However, this is part of the data lifecycle, and I don't know that we will get better data security and limit the exposure of data until we have a way to easily classify and tag data that allows applications to make decisions on how to use this data.

My employer makes a product to help here, and I've been pleasantly surprised that more and more customers are looking at doing this. However, we then need to ensure that applications can use these classifications  in an actionable way to protect data.

Microsoft has talked about enhancing that the TDS protocol and their software to read and use read classification data, which is lightly gathered in SQL Server. They have a Purview product, which also helps, but the best solution, in my mind, is an open API. This would allow for connections to any classification service. Developers and admins could submit classifications for database structures or even files in real time (and hopefully programmatically). Applications could access this data and then determine what controls should be applied. Ideally, they would also refuse access if data wasn't classified.

I don't know that we'll get here, but I do see some movement from a variety of vendors here, usually limited to the database space. Hopefully this will continue to grow over time and prevent some of the silly data breaches we have where someone mis-configures a data store and allows anyone to access it.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

Connecting to Amazon DocumentDB with MongoDB Drivers

JerodJ from SQLServerCentral

With Amazon DocumentDB developers and DBAs can balance availability, read scalability, and latency with five pre-configured consistency levels. The data in an Amazon DocumentDB cluster is accessible just like a MongoDB 3.6 cluster. The CData Software Drivers for MongoDB provide a SQL-like interface to MongoDB data through standards-based drivers. This allows users to see their data in the […]

Stairway to Columnstore Indexes

Stairway to Columnstore Indexes Level 12: Clustered or Nonclustered?

Hugo Kornelis from SQLServerCentral.com

The previous levels of this stairway describe details, features, and limitations of columnstore indexes in SQL Server. But they do not answer what should be the first question for every database professional: should columnstore indexes be used in my databases; on what tables should they be used; and should they be clustered or nonclustered columnstore indexes?

External Article

5 things to look for in a monitoring tool

Additional Articles from Redgate

A key finding from Redgate’s recent State of Database Monitoring Survey of over 2,500 IT professionals was that 79% of respondents reported using either a third-party or in-house monitoring tool. It’s notable because it’s an increase of 10 percentage points from the same survey last year. But when should you use an in-house tool, and when should you take the plunge and invest in a third-party monitoring tool like SQL Monitor?

External Article

How to successfully deploy databases with external references

Additional Articles from SimpleTalk

Database objects often have references to external databases which makes continuous integration problematic. In this article Liz Baron and Sebastian Meine demonstrate a solution.

Blog Post

From the SQL Server Central Blogs - STRING_SPLIT Basics–#SQLNewBlogger

Steve Jones - SSC Editor from The Voice of the DBA

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. I saw a post on using STRING_SPLIT() with...

Blog Post

From the SQL Server Central Blogs - Power BI Meets Programmability – TOM, XMLA, and C#

DataOnWheels from DataOnWheels

For anyone who read the title of this and immediately thought, “Oh no, I can’t do C#! Since when do I need to be in app dev to do...

 

 Question of the Day

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

 

Operator Precedence

Which of these has the high precedence among T-SQL operators?

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)

A Simple Error

What does this do?

CREATE TableA (id int, mystring varchar(100))

Answer: Gives an unknown object type

Explanation: A subtle error, but one that should be obvious. The object type error is because the CREATE statement is missing a TABLE after it. Ref: CREATE TABLE - https://docs.microsoft.com/en-us/sql/t-sql/statements/create-table-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 - Development
Creating appropriate data type from varchar(max) - This is something I am thinking someone may have done already. Basically we have data loader which loads data from any source but the data type in the table will always be varchar(max). if it is db to db transfer then the table will have correct data type as source. This was perhaps designed long […]
SQL Server 2016 - Development and T-SQL
Extract data from XML field - Hello, I have a SQL view with a column called GlobalCountryRegionXML. Here is an example of a value stored in this field:- United Kingdom UK-IE United States NORAM From this, I would like two further columns showing the following results (in the same single row) separated by a comma:- […]
How to get YYYYMMDDHHMMSS - This is getting the data I need, but not the format. select replace(convert(varchar, getdate(),101),'/','') + replace(convert(varchar, getdate(),108),':','') 10212021102437 I want YYYYMMDD before the time portion. Thanks.
SSIS File System Task - Permission Inheritence - I have an SSIS package which outputs a flat file to the file system into a "staging" folder. The package then runs a File System Task to move this file from the Flat File Destination "staging" location to another "collection" path specified in an SSIS Parameter. The package works successfully. However,  the resulting file that […]
Alter Procedure With Invalid Object Name - We are trying to update a stored procedure to reference objects that don't yet exist in preparation for when they will exist. The problem is SSMS doesn't like that and gives the error that there are invalid objects. Is there a way to trick it into allowing the invalid references?
Development - SQL Server 2014
Conversion failed when converting the varchar value to data type int. - Hi, I've tried using cast but can't seem to get the syntax right.  Here is the query below: SELECT PurchaseOrder AS Customer, [JobNumber] AS ROM#, Counter_Type as Countertop, ((Length/12)*(16)) as Price, LnFt AS Reason, CASE WHEN LnFt = '1' THEN ' SHIPPING DAMAGE' WHEN LnFt = '2' THEN 'SHIPPING SHORT ON DELIVERY' WHEN LnFt = […]
SQL 2012 - General
named pipes connect error - Inherited an estate. Just trying to logon to one of the SQL servers.  It's not a named instance.  Trying to connect via SSMS & osql (local to the SQL box) - connecting with either: SSMS (windows user onto hostname, hostname,1433 or hostname\mssqlserver).  It's windows auth only. osql -S. -E osql -S hostname -E osql -S […]
SQL Server 2019 - Administration
Need the (default) port to connect - why is this not implicit. - So I have 2 instances (1 x 12, 1 x 19). Both have the default port set to 1433.  Same settings on each. I connect in from a central server. On one, I must specify the port the other I don't need to. Just wondering why.  I would have presumed the default port is implied? […]
SQL Server 2019 - Development
Rank values based on dates (grouping) - Hello friends, I need some help. I need to rank all titles for each week. Later on, I need to pull top20 titles for each week in PowerBI, however for some reason it doesn't let me to do it there (it pulls top20% only). I am trying to find a way around and group it […]
Replace apostrophe in user input field - I have an Access front end with SQL backend.  The user input field is text. He inputs: don't mess up. When I run the SQL update to update the field I get the SQL injection error. My code: strSQL =  _ "UPDATE [Orders] " & _ " SET [Orders].[Comment] =  '" & Me.Comment & "' & _ " WHERE [Orders].[OrderId] = '" & strOrderId & "';" DoCmd.RunSQL strSQL The Comment text […]
DATEDIFF with GETWEEK worth of data - I have such an issue. I have units, on sale date and also how many weeks the unit is on sale. However, my current formula with DATEDIFF grabs only dates that are from '09-20' and some from '09-21' (if we take a week of 1 month example), but I need to change it so it […]
Update field based on next 5 rows - Hi, I have table below: ID   Postcode   PostcodeNext 1       LL11 2       LL12 3       LL13 4       LL14 5        LL15 6       LL16 . . . I need to update PostcodeNext column for each row in database with next 5 postcodes as string, so ie […]
SQL Azure - Administration
Managed Instance, cross-database queries. What are the hidden requirements? - Have a managed instance with 2 databases. In theory I should be able to query between them like I would do on my local SQL Server. I'm getting the message which I thought was for Azure SQL, not Azure SQL Managed Instance: Reference to database and/or server name in ‘**removed**’ is not supported in this […]
Reporting Services
Please help with grouping totals and details - I am trying to get the same layout going in ssrs as in the picture below. Basically there is a parent group on business area/line and then it groups on event type too and does the totals on the top line. right underneth the totals for the event type it goes into the detail to […]
SQL REporting SErvices 2017 , how do I deny permission to users - I set site level and user level Security entry for domain users, but still user is able to access the repots.. How do I mitigate this... i want to give access to only few user groups and not all user groups..
 

 

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

 

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