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

Daily Coping Tip

Take 5 minutes to sit still and just breathe

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 in the Aftermath

Not too long ago was a very sad and embarrassing day for the US. The US capital was breached and rioters had hours inside without authorities. Ignoring the reasons and politics behind the event, think about the security of the building and systems after the criminals were removed from the building.

Someone else brought up this point, which I think is fair. Can you trust any system in the building? Keyloggers, cameras, who knows what devices might have been planted. As a friend noted, anything with a plug should be thrown out. Who knows what might have been replaced or altered to create a security vulnerability.

I haven't had intruders in an office, but I have had to evacuate offices and returned to find unsecured systems. I've seen unlocked computers, when there were law enforcement or fire department staff walking around unsupervised. I doubt they did anything, and certainly never heard of any breach, but it is something to think about before you have to deal with the event.

Have you thought about this or had to deal with this situation? Are you ready to audit systems and ensure nothing happened? Forget about spy devices, though those are certainly possibilities in this day of hot-plug USB keyboards, what about someone accessing information? If someone left a machine unlocked, would you think to check the history of the machine? Look at sites visited or emails sent? I don't know I've ever thought about this, though in today's world, this is something to consider. We are seeing some crazy types of attacks on systems, and I suspect it will continue to get worse.

I learned a long time ago to lock my machine when I leave for any reason. A large group of administrators took delight in changing configurations, wallpaper, even sending embarrassing emails from unlocked machines to the group. After making a couple mistakes, it became a habit to lock a machine before you stood up for any reason.

Most of us won't deal with criminals walking around our office space, but we certainly should be careful and aware that unsupervised people around privileged systems is always a bad idea. I used to hate taking out the trash from a computer room I worked in, but I now appreciate that allowing cleaning staff into that space might not have been a good idea in a nuclear power plant.

Steve Jones - SSC Editor

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

 
 Featured Contents
Stairway to Exploring Database Metadata

Exploring Facts About SQL Server Tables: Stairway to Exploring Database Metadata Level 5

Phil Factor from SQLServerCentral.com

Now that we've explored, in preceding levels, some of the information that is available about indexes, triggers, keys and distribution statistics, we can concentrate on the tables themselves and their columns.

How to Resolve Merge Conflicts in Git for SSIS Projects

Steve Jones - SSC Editor from SQLServerCentral

In this part of the tip, we'll show you how to simulate a merge conflict when using Git for an Integration Services project.

Optimize SQL Server estate monitoring with Redgate's SQL Monitor

Additional Articles from MSSQLTips.com

How can we balance our need to monitor SQL Server performance and operational processes across hundreds of SQL Servers, but also save time by focusing on the highest priority issues?

From the SQL Server Central Blogs - EightKB is coming!

dbafromthecold@gmail.com from The DBA Who Came In From The Cold

The next EightKB is coming on January 27th, kicking off at 2pm UTC. Once again we have 5 mind melting sessions on 5 in-depth SQL Server internals topics, from...

From the SQL Server Central Blogs - Top 3 Easy Help Queries for XEvents in Azure SQL

SQLRNNR from SQL RNNR

These are a few simple queries to help you along your way to becoming better acquainted w/ XEvents in Azure SQL. These queries will make XEvents easier for you!
The...

 

 Question of the Day

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

 

Running R Scripts in SQL Server

What stored procedure is used to run R scripts in SQL Server 2019?

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)

Tracking Datetime2 storage

How much storage can a datetime2 variable require?

Answer: 8, 7, or 6 bytes

Explanation: The amount of storage depends on the precision of the variable.

  • If 0, 1, 2, then 6 bytes
  • If 3 or 4, then 7 bytes
  • 5, 6, or 7 require 8 bytes

Ref: datetime2 - https://docs.microsoft.com/en-us/sql/t-sql/data-types/datetime2-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
SQL Service "services" recovery option - Good day all.  Quick question.  Has anyone, under Services > Recovery for SQL Server, set the following and does anyone have any issues or recommendations.  I personally have never set this for SQL Service (or any service) and am wondering if any issues.  
Visual Studio 2017 Community Edition license expired error - Hello experts, I've run into an issue that many others on the internet seem to report: Although it is free, VS 2017 Community Edition starts presenting a license expired error after 30 days. The main workaround has been to sign into a Microsoft account. However, that workaround doesn't work for computers that are not allowed […]
824 errors - Hi All, Today we are seeing 824 errors on one of the database. When I ran checkdb I am seeing below errors. Note: The database hosted on a 3rd part storage appliance called Actifio. Use master Go DBCC CHECKDB (CDP) WITH ALL_ERRORMSGS, NO_INFOMSGS; GO Msg 1823, Level 16, State 6, Line 3A database snapshot cannot […]
Continuous replication from SQL Server to Google's BigQuery - Hello everyone, I have a need for enabling a continuous flow of data from a SQL Server production server to the Google's BigQuery. There are a lot of commercial tools for such purpose and most of them use CDC-based methods for propagating changes, examples: Striim (https://www.striim.com/striim-for-google-bigquery/) StitchData (https://www.stitchdata.com/integrations/sql-server/google-bigquery/) Has anyone had a proven experience that […]
SQL Server 2016 - Development and T-SQL
Update table - DECLARE @Name varchar(80) DECLARE @InsuranceReminderDate datetime DECLARE @body varchar(150) DECLARE @Email varchar(100) DECLARE Messaging CURSOR LOCAL FAST_FORWARD READ_ONLY FOR SELECT distinct C.Name,I.InsuranceReminderDate,C.Email from [dbo].[Customer] C inner join [dbo].[Insurance] I on C.ID=I.ID where convert(date,[I.InsuranceReminderDate]) = CONVERT(date, getdate()) I.MsgSent<>1 OPEN Messaging; WHILE 1=1 BEGIN FETCH NEXT FROM Messaging INTO @Name,@InsuranceReminderDate,@Email; IF @@FETCH_STATUS = -1 BREAK; SET @body […]
How to filter out the data? - Hello All, Need your help to filter out the data, please. I couldn't find a better term to describe, but hope the example below will instantly clarify what I need: 1. There is a range of simple physical barcodes, applied on imported products - I am sure you have seen many examples in supermarkets around […]
Populate Several fields of new record with values from previous record - Hello Everyone - I am a newbie to SQL scripting so please don't take anything for granted regarding my knowledge of SQL, bearing in mind that I have had very limited exposure to it. That been said let me explain my challenge as best I can. I am developing an application using a RAD tool […]
real time logging in production enviornment - Hi, What is the best way to do real time logging of SQL server in production environment without affecting the performance of the same. Logging of events like cause of Time Out errors or state of the sql server after the command to exec a stp was called and before that stp was started to […]
Administration - SQL Server 2014
SQLServer won't start? - Hi Not sure what happened, but hoping someone can point me in the right direction. sqlserver won't start, the event log has this error Faulting application name: sqlservr.exe, version: 2014.120.4100.1, time stamp: 0x5535c7e7 Faulting module name: MSVCP100.dll, version: 6.3.9600.19678, time stamp: 0x5e82c88a Exception code: 0xc0000135 Fault offset: 0x00000000000ecf40 Faulting process id: 0x19ec Faulting application start […]
Development - SQL Server 2014
exclude Always On Read-only databases - Hello, I am writing a tsql statement but every time i run it, it comes up with error: The target database ('Database_Name') is in an availability group and is currently accessible for connections when the application intent is set to read only. So i am trying to find a way to exclude Always On Read-Only […]
SQL Server 2019 - Administration
SQL Server 2019 Upgrade Advisor - Hey guys, in the past there used to be an upgrade advisor for SQL Server 2016, which would do a code check, and see if anything is not compatible with the new version. Is there such a thing for SQL 2019, I can't seem to find it.
SQL Server 2019 - Development
Import last CSV file to SQL Server by date (date inside the file) - I have a folder with some files whose contents I need to import to a table in SQL Server. Among those files I need to choose the lastest generated so I can import it to the database.   My problem is that the date and hour I need to consider to select the lastest file […]
Calculate the Difference of two Weeek numbers - Hi ,I have Week_Number and Year_Week  as below ,I need to get a value of 2 every time when i subtract the 2 week number columns . Thank you in advance for the help ;WITH CTE AS ( SELECT 49 AS A1, '202049' AS A2 , 51 AS B1, '202051' AS B2 UNION ALL SELECT […]
Powershell
Using powershell to strip RTF tags and return text. - Hi, We've been looking to pull the text from a table in a vendor DB that stores in RTF format. I found a solution on a site but am having trouble getting it to work. It seems to work ok if I pass a result straight to it but if I try and use SQL […]
Analysis Services
Dimension key problem - Hi, I need to modify an existing dimension that calculates that how late (how many days) shipments are. What the actual shipments (like IDs or weights or whatever) are completely irrelevant in this context. It is late by X days (zero or less than zero = not late) and that's it. I have the expected […]
 

 

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

 

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