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 encouraging note to someone who needs a boost

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.

The Struggles to Keep Up with Growing Systems

This isn't related to the sizes of your databases, but rather the wider growth of systems, applications, platforms, and even teams in your organization. In even the smallest companies, there can be an ever expanding list of things to support and manage. Developers aren't immune either, with ever growing numbers of packages, libraries, interfaces, APIs, and more that they might struggle to master.

The cloud adds another dimension as well. Vendors continue to update their systems, which means that your knowledge, scripts, and processes might become out of date without you changing anything. On top of that, the ways in which you manage and tune systems can shift underneath you, necessitating the need to re-learn skills on a platform that you might never actively upgrade or change.

The growing complexity and challenges can lead many technologists to minimize change, and try to limit the ways in which they look at systems. A recent article finds that many teams are being overloaded and not adapting well to the environments. Lots of staff uses tools they are familiar with, in familiar ways, and may not really be observing much of what is happening.

I can see this even in a singular SQL Server instance. While Microsoft has built a number of tools to help us better understand what is happening on the platform, there is great complexity, an ever growing number of DMVs, and even different interfaces that DBAs and developers may not take advantage of A simple example is Extended Events. While Trace/Profiler has been deprecated and doesn't capture a lot of what happens in modern platforms, many people continue to use those tools over XEvents for troubleshooting. Even as I experimented with both, and found the XEvent Profiler to be quicker to get using than Profiler, it more cumbersome and I struggle to think of using it first.

Old habits die hard, and while many of us cling to them, we're not really taking advantage of the modern IT infrastructure. There are new tools and new ways of using them that can help us better understand our environments. While there might be better AI assistance in the future, I don't hold my breath those will solve all the problems. At the very least, however, we ought to be slowly experimenting with better ways of managing our systems and taking advantage of new tools that might give us greater leverage to observe and manage increasingly larger numbers of systems.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

Understanding Azure Synapse Analytics Pricing

arindamxs from SQLServerCentral

Learn about the different parts of Azure Synapse Analytics and what it costs for each of these areas.

External Article

How to Improve the Quality of Database Releases using Clones

Additional Articles from Redgate

This article explains how we can use the ephemeral, containerized databases delivered by Redgate Clone to increase database code quality and therefore the stability, reliability, and performance of the databases we release.

External Article

Creating Animated Line Plots with Python

Additional Articles from MSSQLTips.com

Python has the ability to create many different types of charts and graphs and in this article, we look at how to create animated line plots with Python.

Blog Post

From the SQL Server Central Blogs - A Test Client for Zero Downtime Deployments

Steve Jones - SSC Editor from The Voice of the DBA

I’ll be at VS Live in Las Vegas this March to discuss zero downtime deployments. If you want to come and join me for this session, or any of...

Blog Post

From the SQL Server Central Blogs - Tales From The Field Weekly Wrap Up for the Week of 02-13-2023

SQLBalls from SQLBalls

Josh & myself at Antman & the Wasp Quantumania Hello Dear Reader!  It's the Presidents Day holiday today in America. With it comes a 3 day weekend.  To celebrate Josh...

 

 Question of the Day

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

 

Cross Database Context

I set my context in DatabaseA with this code:
SET CONTEXT_INFO 0x1256698456;
If I change the same connection to DatabaseB, what does this code return?
SELECT CONTEXT_INFO();

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)

Dropping Columns

I have a table in a SQL Server 2017 database that looks like this:

CREATE TABLE ArticleSeries
( SeriesID INT NOT NULL,
  ArticleID INT NOT NULL,
  ArticleOrder TINYINT NOT NULL,
  ArticleAbstract VARCHAR(200),
  ArticlePublishDate DATE
)
GO

I have decided the ArticleAbstract and ArticlePublishDate can be removed as they are stored in another table. Can I delete them like this or do I need two batches?

ALTER TABLE dbo.ArticleSeries
 DROP COLUMN ArticleAbstract, ArticlePublishDate
GO

Answer: Yes, of course you can

Explanation: You can delete multiple columns in the DROP COLUMN phrase. Ref: Drop a column or columns - https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-table-transact-sql?view=sql-server-ver16#Drop

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
slow performing query - Hi All, I am seeing a lot of page splits happening on this table. A lots INSERTS and DELETES happens on this table. Its a very high transactional table. A lot of concurrent operations happens on this table. Is there anything can be done to fix at table level to avoid page splits? CREATE TABLE […]
SQL Server 2017 - Development
How to delete all records if sub query returns no records/values - Good Morning, I have a quick Question Have a table called subtable with column Year(YYYY) format number. so I am doing DELETE FROM ORDERS WHERE YEAR(ORDER_DATE) IN (SELECT YEAR_YYYY FROM subtable) ---> this will do what I need. the quetion I have is How to delete all if the subquery returns no rows. in other […]
SQL Server 2016 - Administration
Multiple Mirroring Entries in Mirroring Monitor for the same DB - Hi there, I just wanted peoples opinion on what I've seen in the Mirroring Monitor. We are encountering a few odd issues where dotnet app seem to intermittently try to connect to our DR DB. Naturally we gone through all of our connections strings. Our current thinking is that sometimes the mirror server is not […]
SSRS folder permissions do not propagate - Hey everyone, I've come across something very strange that I cannot explain in the SSRS web page for SSRS 2016. I have created a folder called "Scheduled Reports" that contains some reports. Recently, I needed to give a user access to them; so I went to the Home folder and gave Domain Users the Browser […]
SQL Server 2016 - Development and T-SQL
How to pull Year from varchar field - Hello, I have a field where I want to pull the year from.  The field unfortunately is an "Intelligent field" and the year is in the middle.  For example, the format is text - year - text.  Is there a way I can extract the year from the field? Here is some sample code: CREATE […]
Get value after certain characters - Hello! I have a column with this data: A~B~C How would I just get the last value "C" select left('A~B~C.ab', LEN('A~B~C.ab') - CHARINDEX('\', REVERSE('A~B~C.ab')) + 1),RIGHT('A~B~C.ab', CHARINDEX('\', REVERSE('A~B~C.ab')) - 1) I am using this and getting Invalid length parameter passed to the right function.   Thanks.      
Writing a line for each day of month??? - I'm looking to write a record or each day of a month(or date range) I have a query that gets a name, and ID and write it to a temp table I'd like to generate output with  record for each date in the date range example I write a temp table with JimJames 901111 Marymaples […]
How to import data from HTML file or page? - Hi all, So I have this html page: https://ofsistorage.blob.core.windows.net/publishlive/2022format/ConList.html On this page there is data that looks like this: I want to import this data to my SQL tables using SSIS or SQL queries. What tasks or queries I can use to complete the import process? Regards
Development - SQL Server 2014
SQL Performance - I have a poorly performing proc, that is called heavily, and is taking around 4 seconds to complete.  I have tuned the worst performing statement, and it appears to be a good improvement.  HOWEVER, the elapsed_time from sys.dm_exec_query_stats is degraded. The question is whether my efforts have been successful or not?  Any thoughts would be […]
SQL Server 2019 - Administration
extended property - We would like to create a data dictionary for our SQL database, with some description for table and columns. As I understand it can be stored in extended property for the table and columns, then we can pull from it. Is there any bad effects for adding extended property to columns and tables  Othan than […]
Pre staging Listener for AG - Hi I'd like to be able to pre-stage AG Listener object using PowerShell. I want to apply the granular permissions to it instead of giving the Cluster Object full control. This means assigning the cluster object the below permissions in Active directory.  Does anyone have any PowerShell to do this. I'm sure I used to […]
Certificate on database servers - We have about 40 SQL database servers in our organization.  They are all behind firewall, and most of them for our intranet applications.    And a couple of them as a database backend for our public websites. We don't configure these SQL servers to use certificate. Recently our developers upgraded frontend application's .net framework from […]
SQL Server 2019 - Development
How to Extract a Substring From a String in T-SQL - Hi SQL Team, May I know how to get the 'ABC123_Clm R' string from the following string in SQL Server? Many thanks. /Opr Rep/Clm R/ABC123_Clm R
SQL Azure - Administration
Linked server - I created linked server from Azure to On prem and when i do a  test connection it fails Named pipes provide could not open a connection to SQL server OLEDB provider MSOLEDB  for linked server returned message login timeout expired. a network or instance specific error occurred while establishing a connection to sql server. server […]
Amazon AWS and other cloud vendors
SAM CLI directory packaging capabilities - Hello! I was simply wondering if when trying to use the SAM cli to create and package lambdas, is there a way to include multiple files not actually related to the lambda handler/body at all? For example could I include a directory of different code with the packaged Lambda?
 

 

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

 

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