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

Daily Coping Tip

Connect with someone near you, share a smile or chat

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.

Most of Us Are Vulnerable

I saw this study recently, where most people think they are better-than-average drivers in the US. I thought about it myself afterward, and I think I'm maybe average. I do pay attention most of the time, I try to be more careful when it's wet or snowy and give myself more time to slow down. I  try to be aware of the other cars and obstacles on the road. I also usually have a drink with me, and I certainly mess with music. The Tesla reminds me constantly when I've strayed near a line, so a few months of driving seems to tell me I'm not great. Certainly not above average.

I would expect that most of us think we've done a good job with security for our systems.  We don't expect to get hacked or deal with ransomware. I don't know how realistic that is, as a recent set of penetrations tests shows the vast majority of networks are vulnerable.

It sounds bad, and it is. It also is not likely to change as the complexity of many networks is high. There are so many devices, constant additions and changes to services and applications, and regular requests to grant access to a new group. It's amazing there is any security at all, given how quickly people want to access systems and how impatient they are when they can't connect.

The data doesn't show that every system is wide open, but there are ways in which every network can be disrupted. Whether this is significant or not is hard to assess, but given the reports I see in media, as well as private notes from friends, I suspect that most companies have plenty of work to do.

It's not all had work, however. I think many people that configure networks are careful and are wary of opening firewalls. The bigger problem, which continues to exist, is likely simple passwords from far too many people. That, combined with a lack of multi-factor authentication being rolled out, means that there a lot of simple changes that could make a big difference. I know my company rolled out a corporate password manager recently to all employees. This, combined with our MFA app on mobile devices means that we should have strong passwords and better verification of legitimate access for most systems.

At least, I hope we do.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

Playing popular game of Wordle using T-SQL

tomaz.kastrun from SQLServerCentral

Popular and addictive game of Wordle is now written in Transact SQL script. With this script, you can now  play this game on Microsoft SQL Server, using your favourite editor - SSMS, ADS, VS Code, and enjoy playing the game during free time, or whilst waiting for the other SQL query to complete.

External Article

Reporting on Changes Made by Flyway Migration Scripts

Additional Articles from Redgate

Phil Factor demonstrates some PowerShell tasks that will produce a high-level overview, or narrative, of the main differences in the metadata between two versions of a database, during Flyway Teams migrations.

External Article

SQL Identity Column Gaps and Conversion in SQL Server, Oracle and PostgreSQL

Additional Articles from MSSQLTips.com

Learn about identity column sequence gaps and changing an existing column to an identity column in SQL Server, Oracle and PostgreSQL.

Blog Post

From the SQL Server Central Blogs - What permissions are required for temporary tables?

DesertDBA from The Desert DBA

Managing permissions is a constant issue for Database Administrators, but rarely do DBAs consider permissions for tempdb. Everybody’s looking for something, but how often do you get requests for...

Blog Post

From the SQL Server Central Blogs - Finding the First Day of the Year–#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. While working on the question from Monday, I...

 

 Question of the Day

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

 

Endpoint Authentication Order

If I want to specify that my database mirroring endpoint for an Availability Group uses Windows authentication first and then a certificate, how do I specify this in the CREATE ENDPOINT statement?

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)

Adding Time

I've got two columns in my table. One has a datetime value and the other has a time value. The data is something like this:

empidshiftstart        shiftlength
12022-01-02 08:00:00.00008:00:00.0000000
12022-01-03 08:00:00.00004:00:00.0000000
12022-01-04 08:00:00.00006:00:00.0000000

If I want to get the end time for shifts, which of these calculates this value:

Answer: SELECT ws.shiftstart + CAST(ws.shiftlength AS DATETIME) AS shiftend FROM dbo.WorkShift AS ws;

Explanation: You can CAST a TIME datatype to datetime and then add this to another datetime. This will add the time to the existing datetime value. Ref:

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
default values on table - I'm rewritting some data warehouse load procs. The current process is filled with isnull(name,'n/a') on the select that is inserting. They are wrapping all the values in the insert with isulls and setting to 'n/a' if null. Is this faster than simply having a default value set to 'n/a' on the table that we are […]
SQL Server 2016 - Administration
Moving DB file - Can I attach DB in another server  on different drive?? For Example Server: AAA , Database Name: DB_1 the MDF and LDF file is located on C drive Now I want this data file to copy on another Server: BBB on D drive and than attach the DB. How Can I do this?? It didn't […]
Administration - SQL Server 2014
Named Instance SQL server - Hi, I have a SQL server that has two instances. However remotely it only recognises the first instance but without the name. For example Servername\instance1 and Servername\instance2 is on the server but it only recognises Servername. When I connect to that remotely I can see that it's the first instance only. Is there some setting […]
Development - SQL Server 2014
SSRS Rendering format Excel Change ? - I was wondering if anyone knew how I can change the Excel rendering format in the reportserverconfig file so the default cell format is text and not General. If not, is there any way to format my fields in the stored procedure so when I download to Excel it formats as text? Thanks
SQL 2012 - General
Voice-Based Transport Enquiry System - Hello All, I am working on SQL project which is a Voice-Based Transport Enquiry System and I am looking the source code of this project. I have found one code from with the help of this post. Basically, This project is while traveling, you may have come across a long queue of commuters waiting for […]
SQL Server 2019 - Administration
Multiple instances to an OS using Always ON - This is for a sanity check to make sure I am correct in my thinking - Current Set up - Server farm 80GB memory on server 2 discs - C:OS E:Data - This is many drives with guaranteed specific performance threshold (I may not be saying that correctly) The discs on the SAN are setup […]
Do you need a process server w/ Tabular AS when processing during the work day? - We have multidimensional cubes that need to be refreshed throughout the day. We have a process server that process the cubes and then we sync the cubes to a business user facing server. We do this because business users are not able to query the cube while it is processing. We plan to migrate our […]
ownership chain - I am reading microsoft doc about owner chain, it says : quotes: --- USE AdventureWorks2016; GO CREATE USER [DP300User1] WITH PASSWORD = 'Pa55.w.rd'; GO CREATE ROLE [SalesReader]; GO ALTER ROLE [SalesReader] ADD MEMBER [DP300User1]; GO GRANT SELECT, EXECUTE ON SCHEMA::Sales TO [SalesReader]; GO CREATE OR ALTER PROCEDURE Sales.DemoProc AS SELECT P.Name, SUM(SOD.LineTotal) AS TotalSales, SOH.OrderDate […]
how many ways i can encrypt data in my tables in sqlexpress 2016 and 2019 - I have used xml for clause , varchars and image cols q1) Please tell me how many ways i can encrypt data in tables in sql express 2016 and 2019 yours sincerely
SQL Server 2019 - Development
Help with query - Hello! I'm trying to query between 2 tables: one contains companies (each with a number of keywords separated by commas) and another table that contains the results of user searches in the database (each word that was searched and the number of searches for it ). As a result I want to get: a table […]
General Cloud Computing Questions
Anyone taking CS-8803-Systems Issues in Cloud Computing? - Curious if anyone it taking this class and how many hours you guys are spending per week and what you guys think about it. EDIT: I should share my experience. I am currently taking the course and spending maybe around 20~30 hours per week. The whole class is basically a group project as well. Have […]
SSRS 2016
How to eliminate NULL data from columns in a tablix? - I have several columns in a row. I am not able to modify the query to eliminate NULL data. How do i eliminate data where only certain columns are NULL. If any of those columns I want to filter on have data, then I want the column to be show the data (even if some […]
General
Posted in the Wrong Forum - .
Layouts using flexbox - I am learning flex-box right now , i just wanted to know how do you guys implement it and where it can be used? And if you guys know how to make layouts using flex-box that would be great. I know that grid is more popular than flexbox but still i would like to learn […]
Security and Auditing
GDPR and Backups - Although GDPR has been in place for some time, my organisation has had a dispensation to essentially ignore it up until now. The dispensation was because the contract from the government we were on was an interim basis while a new provider got their system online. The thinking was we'd be turning off our system […]
 

 

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

 

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