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

Daily Coping Tip

Send an uplifting message to someone you can’t be with

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.

Celebrating Lives

I set up the sqlmemorial.org site earlier this year. It's not quite complete, with some networking and process to work out, but it's there, which is the important thing. The site gives us a way to remember  celebrate those that we've known as a part of our SQL community.

There are only a few people that I've personally known well, and fewer still that I've met. As a result, there are only a few people about whom I can write something about from my own memories.

I'd like to know more about the others we've lost.

It can be difficult to write a memorial to someone's life, especially someone that is close to us. It is a sad moment to think that you'll never get the chance to spend time with a friend again. The few times I've had to put words down are upsetting, but they are a bit cathartic.

The site runs from a GitHub repo, and I have a page on how to add a thought, a note, or a picture. If you have a link, a note, or a picture, please think about adding a pull request to add some depth to the description of someone's life. Leave a note for them, for others, or for yourself. If you are unsure how to do this, feel free to email me something and I'll add it in your name, or anonymously.

I'm saddened when I run across a message or note from someone that's gone, but I also have some happy memories that I hold on to. If you have any memories, please consider adding something in tribute to sqlmemorial.org.

Steve Jones - SSC Editor

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

 
 Featured Contents

SQL Features Explorer

Thirunavukkarasu from SQLServerCentral

Working as a DBA or developer, one needs to check from time to time about the availability of a particular feature on different SQL Server versions and editions. Hence to avoid the complexity of the search process we have developed a tool that helps DBAs and developers to verify the selected features' availability on all […]

SQL Server High Availability and Disaster Recovery Plan

Additional Articles from SimpleTalk

Microsoft provides quite a few features for high availability and disaster recovery. In this article, Priya describes the HA/DR options.

Managing, Editing and Comparing SQL Code Analysis Settings

Additional Articles from SQLServerCentral

If you need to manage multiple code analysis settings files, per team or database, you'll want a good way to document and manage the files, and to compare two files to see what changed.

From the SQL Server Central Blogs - Container Limits and SQL Server

aen from Anthony Nocentino's Blog

Limits in Containers Docker gives you the ability to control a container’s access to CPU, Memory, and network and disk IO using resource constraints, sometimes called Limits. You define...

From the SQL Server Central Blogs - Using Aggregates in Calculations with Other Columns Functions–#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. In the last post on Window functions, I...

 

 Question of the Day

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

 

Default OPENJSON

If I run the OPENJSON() in a SELECT without any additional clauses, as in this:
SELECT * FROM OPENJSON(@d) AS oj
What columns are returned by default?

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)

Multiple Lambda Parameters in Python

I want to create a python lambda expression that will concatenate two parameters into a string with proper casing. I want the parameters to be givenname and surname. The formula I will use is:

f'{sname.title()}, {gname.title()}'

How do I define a lambda with two parameters?

Answer: name = lambda gname, sname: f'{sname.title()}, {gname.title()}'

Explanation: Separate the parameters with a comma. Ref: Lambda Functions - https://realpython.com/python-lambda/#first-example

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
Replace hexidecimal value wih '§' or blank in a TEXT field - I have a DB with a field defined as: dag_text text allow nulls I have an hexadecimal value (0x15) placed some hundred places in the table. It should be replaced with '§' . In comes REPLACE, but it does not work on text fields. the offending tekst look like(Its the that should be replaces with […]
Conditional Update of Column - I can't remember ever trying this before, but I have need to do it now. I need to update a specific column in a table based on data in another table. The column to be updated varies. Some code will explain better: DROP TABLE IF EXISTS #sample; CREATE TABLE #sample ( PK CHAR(3) NOT NULL […]
SQL Server 2016 - Administration
How to limit SQL Job Success events - Hi, We have a monitoring tool that reads Windows Event Log entries for Failure and Success of SQL Job executions. So, we have setup MSSQL jobs to write to the Windows Event Log when they fail or complete successfully. This works okay, however for jobs that run at a very high frequency I find that […]
CPU and Memory issues - I am a DBA  trying to get to the bottom of some instances when we have hit high CPU for a sustained period impacting performance. On our spotlight monitoring tool we use, when we hit 100 CPU for a sustained time I see that the procedure cache has dropped significantly from 5GB down to MBs, […]
SQL Server 2019 - Administration
Batchmode on rowstore: deadlock - Are there known issues with Batchmode on rowstore in CU11? One specific complex query is getting "Transaction (Process ID 65) was deadlocked on generic waitable object resources with another process and has been chosen as the deadlock victim. Rerun the transaction." The deadlock sofar triggers when the optimizer decides to go for BatchModeOnRowStoreUsed="true" OPTION(USE HINT('DISALLOW_BATCH_MODE')) […]
Error shrinking database - While trying to shrink a database using the command "dbcc shrinkdatabase ([db_name])", I get the following message "DBCC SHRINKDATABASE: File ID 1 of database ID 13 was skipped because the file does not have enough free space to reclaim." That seems to be case with few other DBs too. I was web searching and came […]
Are Powerplans still relevant for VM servers? - Hello, I am rolling out a new monitoring environment.  While in testing, it is alerting on high performance plan not enabled. I did some research and found a lot of articles on improving SQL Server performance changing the powerplan from balanced to high performance. When I asked our platform team about the power plans, they […]
Login failed: Password did not match that for the login provided. - I just installed a new instance of SQL Developer Edition - All my apps run on SQL Express and I am testing them on the new Edition. My Web Service connects to the new instance, my integration tests can access the new instance... However For a Windows Service - I get this error every time […]
SQL Server 2019 - Development
Having sum(amount) = 0 returns negatives as well. - Hello all, I'm trying to get a list of ID's that have a total sum of their amount column = to zero... But I'm getting a lot of negative numbers, but no positives. So, for example, I might get an ID that has two rows in total which if you add up their amounts it […]
Monitor data and update it conditionally - Hi, Is there a way for monitoring data in a table and update it when it exists in the table longer than a period of time? For example, a table has a column called "measure", if the column contained value > 0 longer than 15 minutes then update it to be 0. Any help would […]
Azure Data Factory
Extract bearer token from a string ADF and APIs - Hi all I just wondered if there was a way to extract only the bearer token of the below string into a variable. I have a variable @activity('GetToken').output.accessToken When I run the task I get the following value into my variable. { "name": "token", "value": "eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI0MDAiLCJpYXQiOjE2Mjc1NTM1MTcsImlzcyI6ImF" } What I want to do now though is […]
Reporting Services
Aging report with days parameter - I created an aging report for a case management system with a single parameter @days with values 30,60,90 etc. and the following where clause WHERE DateOpened <= Getdate() - @days This worked fine but the user rather than return rows for the last 60 or 90 days wants cases between 30-60 days or 60-90 days. […]
General
SELECT records from table 1 that does not exist in table 2 via UNION - Sorry if this seems too beginner; I have been stuck at this for days and for some reason couldn't figure out the answer. Suppose I have tbl Customers and tbl Orders.  The relationship is that 1 customer can have many or no orders. I have to use UNION, to retrieve customer records that does not […]
Powershell
SQL Server Agent producing unreproducible error - I've built a Powershell script, which I want to run through SQL Server Agent. The script works fine in multiple environments: My own local environment using Powershell 7.1 My own local environment using Powershell 5 SQL Server host using Powershell 4 As soon as, however, I ask the script to be run through agent it […]
BulkCopy error - I'm trying to load a csv to SQL using the BULKCOPY, but running into a issue load the string value into a Float within SQL I build a Data Table then load from there. The data from the csv has values like .247888 Thanks.
 

 

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

 

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