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

Too Tired to Work Smart

Today we have a guest editorial from Andy Warren as Steve Jones is on vacation. This editorial was originally published on Feb 16, 2012.

You’ve all been there, the incident that turns into a debugging session that turns into a marathon call. Or the project that grows, morphs, stalls into something that demands more and more time with no end in sight. The series of long nights applying the latest service pack. It’s one thing to be tired, but the danger zone is when you’re too tired to work smart.

For most of the mental equivalent of muscle memory keeps us safe when we’re tired – as long as we’re doing things that match the patterns we’ve developed we do ok. When we hit something new, or unexpected, we power through. More often than not we solve the problem, even if we don’t do so efficiently or elegantly. Sometimes we get it wrong. If you’re thinking that elegance is nice but results matter, you’re right. We don’t often have the luxury of waiting for a good nights sleep before continuing.

So what can we do? Mostly it’s to recognize that we’re in that place of being too tired to work smart. You know the symptoms. Guessing. Trying the same thing over even though it didn’t work last time. Wanting to scream at someone “just tell me what to do!”. The urge to make a decision just to be done with the discussion. If you can see that you’re in that place, you can tell the group “I’m too tired to work smart and we need help”.

It doesn’t change being tired and it won’t make you smarter, but knowing that you’re in that place and sharing it, recognizing the stress, it might get you through without making things worse instead of better.

Andy Warren

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

 
  Featured Contents
Stairway to Database DevOps

Stairway to Database DevOps Level 1: Setup a Local Git Repo with Azure DevOps

Erin Dempster from SQLServerCentral

In this first level of the Stairway to DevOps, you will learn how to get version control set up on your local machine and connect to an Azure DevOps repository.

External Article

One use case for NOT using schema prefixes

Additional Articles from SimpleTalk

I’ve long been a huge advocate for always referencing objects with a schema prefix in SQL Server.

In spite of what may be a controversial title to many of my regular blog readers, I don’t really want you to stop that practice in most of your T-SQL code, because the schema prefix is important and useful most of the time. At Stack Overflow, though, there is a very specific pattern we use where not specifying the schema is beneficial.

Technical Article

Arrays and Lists in SQL Server

Additional Articles from Erland Sommarskog's SQL Page

Several methods on how to pass an array of values from a client to SQL Server, and performance data about the methods.

Blog Post

From the SQL Server Central Blogs - Windows Hello may cause a “SSPI Context” error

Kenneth.Fisher from SQLStudies

I’m going to start out by saying I don’t know a tremendous amount about this subject. I’ll tell you what ... Continue reading

Blog Post

From the SQL Server Central Blogs - Restoring SSAS Cubes to a SQL 2022 Server with CU5

Meagan Longoria from Data Savvy

I have a client who was upgrading some servers from pre-2022 versions of SQL Server to SQL Server 2022 CU7. They had some multidimensional SSAS cubes that were to...

Expert Performance Indexing in Azure SQL and SQL Server 2022

Expert Performance Indexing in Azure SQL and SQL Server 2022

Site Owners from SQLServerCentral

Take a deep dive into perhaps the single most important facet of query performance―indexes―and how to best use them. Newly updated for SQL Server 2022 and Azure SQL, this fourth edition includes new guidance and features related to columnstore indexes, improved and consolidated content on Query Store, deeper content around Intelligent Query Processing, and other […]

 

  Question of the Day

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

 

Using the OPENJSON Type

I run this code:
SELECT * FROM OPENJSON('{ "key":1 }')
and I get these results:
key value type ---- ------- --------- key 1 2 
What is the type?

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)

OPENJSON and Versions

OPENJSON is a SQL Server 2016 TVF. I have a database on an SQL Server 2019 instance that is set to compatibility level 120. What happens when I run this command:

SELECT openjson(oj.myjson) FROM mytable AS oj

Answer: I get an unknown function error

Explanation: When we set the compatibility level to 120, this is SQL Server 2014, which means this function doesn't exist. Despite this being SQL Server 2019, the code is processed as it would be for SQL Server 2014. Ref: Compat Levels and upgrades - https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-compatibility-level?view=sql-server-ver16#compatibility-levels-and-database-engine-upgrades

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 2016 - Administration
BCP with ODBC 18? - Hello all.  My org has identified ODBC driver version 17 as having security vulnerabilities.  It looks as  though 17.10.4.1 remedies these, but we're considering v18 anyways.  It looks as though bcp requires version 17.  Is this the case?  Surely not, though I don't see otherwise.
Administration - SQL Server 2014
Maintenance Task Failed - how to log the error - I've a Multi step Maintenance plan of 5 steps called "Reindex". This automatically created an Agent job called "Reindex..Subplan_1" There's an email alert on failure of the Agent job. Is there any place in maintenance task design to put an alert in or do I always have to use add the alert to Agent task […]
Development - SQL Server 2014
Replace bad characters - Hi all I need help to replace bad characters with space  in string. select col1, patindex('%[^ !-~]%' COLLATE Latin1_General_BIN,col1) as [Position], substring(col1,patindex('%[^ !-~]%' COLLATE Latin1_General_BIN,col1),1) as [InvalidCharacter], ascii(substring(col1,patindex('%[^ !-~]%' COLLATE Latin1_General_BIN,col1),1)) as [ASCIICode] from myTable where patindex('%[^ !-~]%' COLLATE Latin1_General_BIN,col1) >0 Here is the result: Col1                    […]
SQL Server 2019 - Administration
Error 500 when accessing SQL Server 2019 database - Need help! - I've recently set up a SQL Server 2019 database for a project I'm working on. The issue I'm encountering is that whenever I try to access the database, whether it's through my application or directly using SQL Server Management Studio, I'm getting an "Error 500" message. This error appears to be quite generic and doesn't […]
Event ID 17806 - We have had SSPI errors across a dozen servers in an hour span. SQL error 17806 : Error code 0x8009030c – How to fix Per the above link : Stuck at the very first point... Cause of SQL error 17806 1.SQL Server engine account running with a Domain service account, and that account locked at […]
disable seeding mode - hello , On one of our servers with 4 Replicas 2 synchronous and 2 asynchronous we see too many waits with the "VDI_CLIENT_WORKER" type almost 93% of the wait statst do you have to deactivate the seeding mode to minimize these times ? What do you think of this recommendation?
SQLPackage Import Error - Hi After 1h the import fails with the error: Error SQL72014: Core Microsoft SqlClient Data Provider: Msg 155, Level 15, State 1, Line 3 'AUTO_DROP' is not a recognized CREATE STATISTICS option. SQL Server 2019: 15.0.4316.3 sqlpackage.exe: 162.0.52.1 May the sqlpackage is to new but I didn't find the one who fits exactly. Thanks for […]
SQL Server 2019 - Development
MS Sync Framework Error - Failed to Execute the command BulkUpdateCommand - It turns out that the error is in a trigger on the Transfers table, so this can be ignored. Sorry if you've wasted your time reading this.   Hi, I've got two databases at distant locations that sync evey few minutes using the Ms Sync Framework 2.1. I'm getting this error occurring: ERROR , SyncBPO, […]
Odd columns datatype precisions showing in SSMS View... - Okay... haven't posted in a long time and was hoping I'd have a better topic to share but... we're seeing issues when expanding the view columns in SSMS and it's showing the wrong precision.  The view is pulling from underlying tables using DECIMAL(11,2) but the view shows the columns as DECIMAL(12,2) - what would cause […]
SQL code help to get one row for each sequential entry - Hi, I am looking for a sql help to generate one row per each sequental door_area, for a given employee, based on the sample data that looks like this: Current Output: Desired Output: Here is my code to test for sample data. CREATE TABLE dbo.emp_seq ( emp_id int, product_code int, clock_in datetime, clock_out datetime, door_area […]
SQL Azure - Administration
Connecting to SQL Azure - Best practice / method? - New to Azure SQL, so I'll start with that! We've had SQL on-premise for years and we're exploring moving to a SQL Instance in Azure (not a VM). A lot of our apps are desktop .Net apps that connect very simply over our internal network currently or VPN. We'd like to ditch that approach and […]
Reporting Services
Migrating Reports from SQL Server 2014 to SQL Server 2022 via Visual Studio 2022 - Migrating Reports from SQL Server 2014 to SQL Server 2022 via Visual Studio 2022 with Reporting Services extension installed. I am having trouble with parameters and the error message: "Must declare the scalar variable @TellMeWhyIdontlikeThisMonday". I'm also getting the error message: "Custom parameter layout was removed from the report. SQL Server 2014 Reporting Services and […]
SQL Server 2022 - Administration
Having problems with SQL Server 2022 CU5 (docker ubuntu image) - is it ready? - Ubuntu image came from here - https://hub.docker.com/_/microsoft-mssql-server?tab=description DBCC is failing - "can not create database snapshots" syspolicy_purge_history is failing due to a missing PowerShell installation master.sys.dm_server_services - is not listing the engine at all while listing agent running? Can't enable SQL Server Agent Alerts - most likely due to master.dbo.sp_MSsetalertinfo and msdb.dbo.sp_set_sqlagent_properties usage of registry
SQL Server 2022 - Development
Running 32 bit SSIS package - This is my first post in this forum, so hello everyone! Would be most grateful for help with the following issue: a simple SSIS package (created in Visual Studio 2019) imports a table from an ODBC Source (MySQL Server 5.xxx) into a database in a SQL Server 2022. ODBC Source is 32-bit, the package runs […]
Searching in date field provides inconsistent results - I have been working with SQL Server for too many years to count and this is baffling; perhaps someone has a clue on the cause.  I am running this on SQL Server 2022.  I put together a simple function to return a primary key integer for a lookup table that has mileage rates that are […]
 

 

RSS FeedTwitter

This email has been sent to newsletter@newslettercollector.com. 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

 

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