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

Daily Coping Tip

Eat something healthy today that nourishes you

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.

Are you empowered?

Today, even the most clockwork of tasks, like factory floor labor, can benefit from some degree of innovation and creative thinking. There are even some companies that are taking ideas from individual workers and improving the way things work. This can work well with jobs that are repetitive and subject to automation efforts.

The less people’s jobs can be automated, however, the more you need them to take initiative. When someone's job isn't easily automated, there is a need for innovation and creative thought. Despite the evidence of all these studies, few managers are willing to take this leap. Today, only a small percentage of workers feel empowered and act resourcefully; most feel disenfranchised or locked down.

What might be worse is that CEOs and management often feel they are encouraging innovation and creative work. I think managers, team leads, and even the most productive people realize how they can dampen others' desire or ability to contribute. While some of this might be malicious action on the part of someone, I think often it's just a lack of understanding and empathy for how others view the world.

To make yourself heard, often we expect you to be a loud, strong voice. That doesn't always work, but it also seems to conflate the idea of being loud or forceful with competency.

Some of the smartest people I know are those that are soft spoken, polite, and careful about what comments they make. Allowing them to share their thoughts and provide input has often proved to be a good decision on my part.

Steve Jones - SSC Editor

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

 
 Featured Contents

Power Query or SQL Server? Which, when and why

vsanchezjauregui from SQLServerCentral

When it comes to developing a Power BI report, we can use it for accessing data, transforming the data, and turning the data into information using visuals. With no doubt Power BI can do the job from beginning to end. Now, this is not the only, nor necessarily the best, tool for all the steps […]

SQL Server MSDB Database Tutorial

Additional Articles from SQLServerCentral

In this tutorial we will cover common questions related to the SQL Server msdb database. This is one of the standard system databases that are part of every SQL Server installation.

Heaps in SQL Server: Part 4 PFS contention

Additional Articles from SimpleTalk

When inserting rows into a heap, SQL Server must sometimes update the PFS page which can PFS contention and affect performance. In this article, Uwe Ricken demonstrates how to measure PFS contention.

From the SQL Server Central Blogs - When do Statistics get updated?

matthew.mcgiffen 73574 from Matthew McGiffen DBA

Statistics objects are important for allowing the SQL Server Optimizer to make good estimates and form efficient execution plans. Related to that it's useful for us to understand when...

From the SQL Server Central Blogs - Getting Started with Robotic Process Automation (RPA) Using the Power Automate Desktop

Devin Knight from Devin Knight

There are a lot of hot phrases you’ve likely heard thrown around during various keynote sessions at conferences over the last 5 years. “Digital Transformation”,

 

 Question of the Day

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

 

Strange Code

I see this code in a stored procedure in a git repository for SQL Server 2019:
DECLARE @dbs CURSOR
What happens if this is run?

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)

Amend a Commit

I am working on some code and run this:

git commit -m "tset added for the new user case in #342"

I realize I have a typo in my message. What can I do?

Answer: Run: git commit --amend -m "test added for the new user case in #342"

Explanation: You can run git commit again, but add the --amend flag to change the last message. Ref: git commit - https://git-scm.com/docs/git-commit

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
Measure Latency for Readonly Replica in AOAG - I've SQL 2017 Read Scale availability group setup in our test environment(AOAG configured on two stand alone instances with Readonly routing in Synchronous Commit). Our app uses Read replica for reports and read queries. I've setup performance counters to measure the maximum latency for data loss(Transaction Delay and Mirrored write transactions/sec). But I need to […]
Deadlock - What to do next? - Hi, I have a job that keeps getting a deadlock victim error and  fails. I created a trace in profiler that captured the deadlock. I'll attach a pic of the graph. It looks to me that it is having an issue with the clustered index on the claim table (which is huge). How do I  […]
Development - SQL Server 2014
Select "New Customer" - Hi , Has anyone tried to do this...I'm trying to select only "new customers" revenue, by defining a new customer based on no transaction before the last 6 month. I've looked at using Top 1 and Max , etc. on the ship_date ,  but could use some help here thanks.  
XML Openrowset column Issue - Morning , I'm having an issue returning any records from an xml file,  using an Openrowset query. My purpose is to insert the data from the xml file into a table. When I run the openrowset select portion of the query, I can get the xml data to return in xml format, so I know […]
Transaction was deadlocked on lock resources with another process - I have table in SQL Server 2014. Please find the structure below: CREATE TABLE [dbo].[ProductIMEISerialNoes]( [ID] [int] IDENTITY(1,1) NOT NULL, [IMEI1] [nvarchar](max) NULL, [IMEI2] [nvarchar](max) NULL, [SerialNo] [nvarchar](max) NULL, [ProductModel_ProductID] [int] NULL, [ProcessDate] [datetime] NOT NULL DEFAULT ('1900-01-01T00:00:00.000'), [BoxName] [nvarchar](max) NULL, [BoxNo] [nvarchar](max) NULL DEFAULT ('0'), [Order_OrderID] [int] NULL, [Color] [nvarchar](max) NULL, [BoxSize] [int] NULL […]
SQL Server 2019 - Administration
Staging or UAT Environment - Hi Experts, Currently, we are using the enterprise edition of SQL Server 2014 in our Pre-Prod environment, planning to move it to SQL Server 2019 Developer edition. Will this create any issue in the future wrt to Licensing or issue resolutions. We will be using the same exact upgrade plan of Pre-Prod to upgrade production […]
The media family on device incorrectly formed for read only file group restore - Yes the databases (source and destination) are the same version.  I have checked 3 times.  Both are "Microsoft SQL Server 2019 (RTM-CU8-GDR) (KB4583459) - 15.0.4083.2 (X64)" The database itself restores ok without error.  Only when I try the read-only file group restore does it give the error.   I have redone the back up and attempted […]
SQL Server 2019 - Development
Group By and JOIN within SQL Server (when dealing with multiple columns) - I have 2 tables, df1, and df2. I would like to join the two tables and then perform a GROUP BY aggregation.  I am unsure if I am performing the groupby correctly because my values are not adding up correctly as desired. DATA: df1 host purpose verge name date 123 sub hello hello1 1/1/2021 123 […]
Conditional Column calculation - Hello All, I have the following SQL Query, what I need is to have a column let's Say Shortages. since I arrange or Sort the Query by Item, so If Item No_ = Previous Item No i.e Item No_ of the previous record, the Shortages will Sill shortages - [remaining Qty_] else Shortages will be […]
SQL Server 2008 - General
XML Vs Non-XML - I am using SQL Server 2008 R2. While using XML data type and  XQuery slow (50 Times slow) compare to Non-xml Method(Relational Database Model) even after adding XML Index. So is it ok if we move from XML to Non-XML option?  
T-SQL (SS2K8)
Get local server's alias in T-SQL - Hello, I'm trying to get the server name programmatically. Even after I do this: exec dbo.sp_dropserver 'FQDN\InstanceName' GO exec dbo.sp_addserver 'MURPHY', 'local' GO But @@Servername and SERVERPROPERT('ServerName') both still return FQDN\InstanceName In our code, we do stuff like IF = "FQDN\InstanceName" .... I want to be able to do IF = […]
Get local server's alias in T-SQL - Hello, I'm trying to determine if there's a way to get a server's alias programmatically? Scenario: Using SQL Configuration Manager, I've created an alias for the server FQDN\InstanceName as "Murphy". All well and good. Now, let's say I'm connected to Murphy. When I select @@SERVERNAME and SERVERPROPERTY('ServerName'), I get FQDN\InstanceName I tried exec sp_dropserver " […]
Azure Data Factory
Azure Data Factory Copy Data UpSert with Delete - Hi, I'm having some problems with several Data Factory Copy Data jobs using stored procedures performing an upsert.  I am using the method described on this page by Taygan https://www.taygan.co/blog/2018/04/20/upsert-to-azure-sql-db-with-azure-data-factory I am using this technique to copy data from tables in Azure SQL Server to our On-Prem SQL Server. When I add the delete clause […]
Analysis Services
Issues with multiple SSAS tabular instances on same server - I have created a second instance of a tabular server on the same server but I am having issues processing the data using "process full" from SSMS. I can turn on both instances at the same time, however the first instance that gets turned on is the only one that can be processed. The second […]
Integration Services
XML Load Error - Hello everyone,  I'm attempting to connect to an xml file so I can later load it to a SQL DB, but haven't really been able to get beyond just connecting to it with the XML Source.  So, here's a test xml file I'm currently working with that I got from a client: 418492</Shipper […]
 

 

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

 

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