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

Daily Coping Tip

Looking back at the pandemic, what has returned to normal for you in life that you appreciate?

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.

A Real World Security Reminder

A saw a tweet from Brent Ozar about USB ports on slot machines to charge your devices. There are also wireless charging pads. Convenient, but also potential security problems, especially for IT workers that hold privileged access to code or data.

Please, don't use public USB ports for charging a device. You never know if there is any data access taking place. Yes, I know that most phones ask you to approve things, but have you ever hit the wrong button on your UI? Know how to turn it off? How quickly would data move or malware install? Just don't plugin.

Next, beware of physical security. My wife was using a wireless pad at a Starbucks a few years ago. She was sitting there talking with my daughter, and occasionally checking her phone (she gets LOTS of texts). Someone walked up and started talking with them, pleasantly and unassuming. After a few minutes, they walked away.

A minute or two later my wife realized her phone was gone. They both looked around and then ran outside. They couldn't find the person, and since this was a trip to visit colleges, she ended up purchasing a new phone. An expensive trip for us all.

That reminds me of a few stories in the past from my former CEO, Simon Galbraith. He wrote a piece in 2005 about the issues of losing backup tapes. That used to be a problem, along with the loss of laptops. He also shared a story internally about finding a USB drive near our HQ. Our IT staff investigated the USB drive on an air-gapped computer since USB drives are sometimes spread around with malware.

In this case, we found that it had been lost by our auditor. No Redgate information was on it, but there was data on it from another client. An accident, but one that could have had severe consequences if someone else found the drive. A good reason to be sure that any data you move around outside of production is masked or anonymized, no matter how secure you think your development laptop or mobile device is in your possession. Mistakes happen.

We also need to be careful with devices. These days, with BYOD and MFA, it's especially important that we secure devices and limit the disclosure of data on locked screens. Whether for a practical joke or malicious purpose, having someone else get access to our credentials is not something we want to explain to our employer.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

Using Azure File and Blob Storage with Azure VMs – Step by Step

roopesh.uniyal@gmail.com from SQLServerCentral

Learn how to use Azure File and Blob storage with your applications.

External Article

Moving from ‘Chaotic’ to ‘Managed’ Database Development using Flyway

Additional Articles from Redgate

This article describes a route to adopting Flyway in order to bring management and control to a chaotic database development process. It is based on use of Flyway migrations to update a database from version to version, while maintaining object-level source scripts for tracking changes between versions.

External Article

Getting started with MySQL

Additional Articles from SimpleTalk

The first step when getting started with MySQL is to get it installed and running. In this article, Robert Sheldon explains how to install it on Windows and create the first database and table.

Blog Post

From the SQL Server Central Blogs - Virtual Network Data Gateway for Power BI

MAMIR from Semhar Data Centric Blog

Virtual Network data gateway service provides a secure data source connectivity in a given Azure VNet such as Power BI connection to Azure PaaS data(more...)

Blog Post

From the SQL Server Central Blogs - Starting your Azure Journey – Free Trial, Tenant and Subscription

Martin Catherall from measure twice, cut once.

G’day, Over the last few years I’ve had the privilege of helping people start on their Azure journey. Some come along with Azure Subscriptions, others just want to get...

 

 Question of the Day

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

 

Checking the Type Code

What is wrong with this code?
CREATE OR ALTER TYPE LocationParameter AS TABLE   
    ( LocationName VARCHAR(50)  
    , CountryCode CHAR(3)
    , INDEX IX_CountryCode (
CountryCode
)
 );  
GO  

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)

Hyperscale Service Tiers

I want to provision a Hyperscale Azure SQL Database. What are my options for service tiers?

Answer: Hyperscale is its own service tier.

Explanation: Hyperscale is its own service tier in Azure SQL Database. Ref: What is Hyperscale - https://docs.microsoft.com/en-us/azure/azure-sql/database/service-tier-hyperscale

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
How to shrink LOB data in sql server 2017 - I have a huge table that stores pdf documents with datatype "image". Recently we started to offload files to blob storage, that is why we want to shrink main data file. All my tries to shrink the file wasn't successful. Usually, it stucks on 97-98% and doesn't go any further. Even shrinking by small chunks […]
SQL Server 2017 - Development
Blank space being imported during stored procedure - I have a stored procedure that imports a group of csv files.  The first field is called Initial and it always has 4 characters but is set to VarChar (50) because there are some blank lines at the end of the file and it will fail the import with a truncate error if I dont […]
Blank space being imported during stored procedure - I have a stored procedure that imports a group of csv files.  The first field is called Initial and it always has 4 characters but is set to VarChar (50) because there are some blank lines at the end of the file and it will fail the import with a truncate error if I dont […]
Behaviour of SSMS when scripting SPs has suddenly changed - Dear Experts I think this is an SSMS issue. My version is v18.10, aka 15.0.18390.0.  Honestly don't know where best to post this - please advise if it is out of place. Until recently, when I right clicked on an existing stored procedure and selected Script Stored Procedure As > ALTER to > New Query […]
SQL Server 2016 - Administration
Linked Server Error - I have three node AG - 2 synchronous in one data center and the other asynchronous in a separate datacenter. A linked server has been configured for years and running without issue until all of a sudden recently. To add to the confusion, I'm only getting the error message on one of the synchronous nodes […]
Development - SQL Server 2014
SQL Query Required - Dear All As per my request I have following input table Create table #FirstTable( StudYear int, StudValue varchar(20), SGPA float ) insert into #FirstTable values('1','Value1','5.6') insert into #FirstTable values('2','Value2','4.5') insert into #FirstTable values('3','Value3','3.2') insert into #FirstTable values('4','Value4','8.5') insert into #FirstTable values('5','Value5','6.5')   I want Out put in following table structure Create table #OutputTable( StudYear int, […]
AND syntax - Hello all, I am new to SQL, how to syntax 2 conditions connected with AND when trying to save value to variable? When I use code bellow there is no error but also no value displayed. SELECT @last_value = [VALUE] FROM dbo.TABLE_1 WHERE (IDMEASURE=(SELECT max(IDMEASURE) FROM dbo.TABLE_1) AND IDRESOURCE=27) PRINT @last_value
SQL Server 2019 - Administration
Log shipping broken after application upgrade - I have a weird situation regarding log shipping.  We back up the databases on our production database server every hour, and then restore to our reporting server.  This has been running for years. Last weekend, we upgraded our accounting system, and afterwards, log shipping stopped on the databases that the accounting system users.  There is […]
SQL Server 2019 - Development
What am I doing wrong with this subquery? - I am trying to return all values from the lookup table to columns on the same row for the Diagnosis code.   Here is my query: SELECT distinct a.accession_no as "Accession Number", (ISNULL((select m.code from medical_code m where ai.icd9_id = m.id and ai.sort_ord = 1), '')) + '~' + (ISNULL((select m.code from medical_code m where […]
cursor not getting next values - I've built this cursor to build a new diagcode from all the values in the cursor. The cursor is working in the sense that it's looping, but it's not getting the next "code" or value in the list. What am I doing wrong? Note: I am selecting a list of codes. then I have declare […]
populate a table with new data set but keep the original identity column values - I have a table like below, I would reset the values in the table with some fake addresses. I have already have the fake addresses ready without identity columns. But I would keep the original addressID in the table, so that other table use it as FK still works. Basically I want to keep the […]
Looking at startdate of one table and calculate the numbers from a different tab - I have such a situation. I have a table UDT_CKB_SNAPSHOT where we have different events (promotions). I need to take these event names, start dates of those events. I have a 2nd table called FCSTPERFSTATIC where we have Actuals and Forecast. What I need to do is basically is to look at STARTDATE of UDT_CKB_SNAPSHOT […]
Azure Data Factory
How do I pause and resume a Synapse dedicated SQL pool automatically? - Hi All, How do I pause and resume a Synapse dedicated SQL pool automatically? If it is in ideal state can I capture that and pause synapse dedicated SQL Pool? Could you please suggest. Thanks in Advance!! Regards, Ashok Kumar
Reporting Services
SSRS Long Text 2 Column report with some variables - I need to design what looks like a simple report.  However, it's 29 pages or so, 2-column, with a few variables mixed into the long text with various formatting throughout.  It seems simple enough.  However, I'm not sure how to even begin. I have the data set setup without issue.  I also have my parameters […]
Design Ideas and Questions
Need some example or answer for this doc - Need answer or data sample for this exam CMSC424 - Database Design SQL Assignment (Parts A and B) Fall 2007 (TENNIS DB SCHEMA) I trying test some tennis db like this doc, if someone has example with data test sample for test. https://ufile.io/dih6vn9a  
 

 

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

 

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