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

Daily Coping Tip

Plan something fun and invite others to join 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.

The Complexity of Metrics

Monitoring your SQL Server instances is important to ensure you can meet your SLAs. Availability, performance, reliability, quality, whatever you care about, it's important that whoever is responsible is looking at how the database is performing. At Redgate, we have multiple teams working on SQL Monitor to enhance and grow it to meet your needs.

A short while ago there was an internal conversation recently about page life expectancy. We've had some customers ask about this and setting alerts to watch this value. Our developers and sales engineers asked for a few thoughts from Grant and others on how to respond. There are a variety of opinions, some saying monitor it, some saying don't bother.

I think both pieces of advice have merit, which is to say that this isn't a metric that you can look at in isolation. There is no value of PLE that is good or bad, or that says x is wrong or y is right. There is both a subtlety and a complexity to understanding what PLE is telling you about your system. If PLE is growing, you have to look deeper. If it's falling, same thing. If it suddenly drops, there are multiple possible causes, and you need to examine other things. However, in many cases, this isn't an actionable metric, but one that provides context about what might be happening in the database when combined with other values you monitor.

This certainly isn't a metric that you want to set an alert on because it can rise or fall and many times the change isn't indicative of an acute problem.

This is just one metric of many that are available in SQL Server, and knowing which ones to monitor is something good administrators learn. They know that very few values they instrument have a good or bad value, and often the rate of change needs to be combined with the actual reading to determine if there is a problem. We also often want to know if a high (or low) reading appears for an extended period of time. Having 100% CPU being used for 3 minutes likely isn't an issue. If it lasts for 3 hours, I might feel differently.

Metrics have more complexity than just having a range in which we ignore them and a limit at which we alert people. They are intended to be combined with each other, with observations by clients, and with the experience of looking at past observations over time. Our systems often develop patterns, and we don't get too concerned about any values when the pattern repeats. It's when something new happens and someone complains that we dig in to determine if there is a problem or the start of a new pattern.

We definitely need monitoring of our database metrics, but we also need to understand why values move and the implications of them doing so. That's something which isn't as simple as setting alert for each one based on some value we think should never be exceeded.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

Backup Directly to a GCS Bucket in SQL Server 2022

abair34 from SQLServerCentral

Learn how you can back up your SQL Server 2022 databases to Google Cloud Storage.

External Article

Dealing with Mutually Dependent Databases in Flyway

Additional Articles from Redgate

How to create and manage 'stub' objects, in Flyway migrations, in order to overcome build failures caused by circular, or mutual, dependencies between objects in different databases. The technique should be applicable to any RDBMS.

External Article

Encrypt SQL Server Stored Procedures to Protect Source Code

Additional Articles from MSSQLTips.com

In this article, we cover how to encrypt a SQL Server stored procedure and how SQL Server hides the source code for these objects once encrypted.

Blog Post

From the SQL Server Central Blogs - EightKB 2023

dbafromthecold@gmail.com from The DBA Who Came In From The Cold

EightKB is back! The biggest online SQL Server internals conference is back in 2023…happening on May 24th. We’ve open our call for speakers, you can submit here: – https://sessionize.com/eightkb-may-2023/...

Blog Post

From the SQL Server Central Blogs - Logic App errors out when using variables in a SharePoint Action

Koen Verbeeck from Koen Verbeeck

I have a Logic App that reads out a SharePoint library and stores all the documents found into Azure Blob Storage (ADF only supports Lists). I was trying to...

SQL Server 2022 Revealed

SQL Server 2022 Revealed: A Hybrid Data Platform Powered by Security, Performance, and Availability

Steve Jones - SSC Editor from SQLServerCentral

Know how to use the new capabilities and cloud integrations in SQL Server 2022. This book covers the many innovative integrations with the Azure Cloud that make SQL Server 2022 the most cloud-connected edition ever. The book covers cutting-edge features such as the blockchain-based Ledger for creating a tamper-evident record of changes to data over time that you can rely on to be correct and reliable.

 

 Question of the Day

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

 

Backup to Object Storage

In SQL Server 2022, there is a new Backup to URL feature that allows backups to which cloud storage types?

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)

Automatic Formatting of Code

I have a repository in Git where I am keeping my SQL Server code. I want to ensure that all code changes are formatted. I have a formatting tool that I can run from the command line on my files. How do I ensure that all changes made to code files are formatted in the repository.

Answer: Use a git pre-commit hook to run the code formatter.

Explanation: The way to ensure a process runs before committing code in a git repository is to use a pre-commit hook. 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 - Administration
SQL Server has encountered [x] occurrence(s) of I/O requests taking longer - Hi, We have this error from time to time, not all the time but when it does SQL is reporting as high as thousands of occurrences. It happens on random days, but when it does happen the timestamp is always within a couple of minutes of the same time. We never had it from go-live […]
SQL Server 2017 - Development
Problem with a SQL Server Proxy account - I am using an Application which  accesses certain registry hives. the application runs fine as long as I am logged in with a specific user (which was made especially for this purpose) Now the task is, to run this appliation unattended via sql server agent or from SSIS. To do this , I set up […]
SQL 2012 - General
Safa Insert - Hello, i'm looking a way to make safe insert in a table avoiding PK problems. I have a table like this CREATE TABLE [dbo].[Passaggi]( [Code] [varchar](6) NOT NULL, [DataPassaggio] [datetime2](7) NOT NULL, [idServizio] [smallint] NOT NULL, CONSTRAINT [PK_Passaggi] PRIMARY KEY CLUSTERED ( [Code] ASC, [DataPassaggio] ASC, [idServizio] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, […]
SQL Server 2019 - Administration
Access to Jobs history - bug? - Hi all, A few of my users reported a weird issue with access to agent's jobs. I wander if that's the bug in management studio and what I can do about that. If I go with my account with SA privileges to SQL Server Agent > right mouse click on any job > Properties at […]
Append data using migration assistant - Hi friends, I'm migrating data from Oracle to SQL server 2019 using SSMA for Oracle. Faced a lot of hiccups in the process, finally data is migrating however it is very slow (source DB is 500G).  Migration is at 80% but we are running out of memory on the target server. There are a few […]
Table permission grantor - Hi, fn_my_permissions show me grant 'insert' for db user but I couldn't find who is grantor. It looks it's granted from the schema on the whole , where table is located . database_permissions and sp_helprotect couldn't help me. Can it be hidden for sysadmin ? See attach with output. Thank you  in advance for your […]
SQL Server 2019 - Development
Subtract time passed midnight - Hello all! I hope everyone's great I have these columns here that are hour and minute for entry and for exit. I also have a column that let us know if it passed midnight or not. I would like to know the time spent. Here's what I have: My first approach (and I don't know […]
How to Reseed an Identity Column on Temp Table After data has been removed - Hi there We have a temp table in our code that contains an Identity column. Now data will get removed from this table and I want to reorder the ID Column sequentially , so that ID appears as 1,2,3 , 4 etc... /****** Table and Data re-creation script ***********************************************************************************************************************************************/ DROP TABLE IF EXISTS [#zzitems] CREATE […]
SQL Server 2019 Agent Execution of SSIS Package with UNC Paths to Flat Files - I am in the process of migrating my SSIS packages from SQL Server 2016 to 2019.  This is generally a pretty tedious, but fairly simple process.  I am taking the time to move my SQL connections from the classic SQL Native Client driver to the new SQL Server OLE DB driver so I have to […]
SQL Azure - Development
JSON formatting output nested array - Hi Guys, Apologies if this is posted in the wrong forum, but I have a query that moves data from a 'flat' table to a JSON formatted one. Query=========== insert into [SDB].[JSON].[RawJson]([results_incident_OSVC_Incident_ID],[results_incident_OSvC_Refnum],[JsonPayload]) select b.[results_incident_OSVC_Incident_ID], b.results_incident_OSvC_Refnum, (select a.results_incident_OSVC_Incident_ID as 'incident.IncidentID', a.results_incident_OSvC_Refnum as 'incident.RefNum', a.results_incident_Learner_OSvC_Learner_ID as 'incident.Learner.LearnerID', a.results_incident_subject_SUBJECT_CODE as 'incident.subject.SubjectCode', a.results_incident_schools_OSvC_SchoolAppID as 'incident.schools.SchoolAppID', a.results_incident_PrimaryParent_OSvC_P_ParentID as 'incident.PrimaryParent.PrimaryParent', a.results_incident_Application_OSvC_ApplicationID […]
SQL Azure - Administration
Looking for a DML script running tool - My company is still in start-up mode.  Because of this, we have a lot of holes in things like "Administrative Apps".  Right not, service tickets to fix data in the back end are completed by our engineers creating SQL scripts and editing live data.  I want to stop that practice. Does anyone know of any […]
Amazon AWS and other cloud vendors
Can't figure why i extend EBS free tier limit. - To introduce myself, i'm math student (last year), and i would say something between begginer and intermediate programmer. So i made bot that runs 24/7 on EC2 back in November. And i'm updating it since. I had no problem with free tier prior to this month. My EC2 instance have 8gb volume attached on it, […]
Reporting Services
Report server configuration manager question - Hi all, have query related to Report server configuration manager. Click on Report server configuration manager. Server Name is loading, but Report Server Instance is not loading . could you please me to solve this regards            
SQLServerCentral.com Website Issues
Old QotD's Are Crosslinked - I just noticed that when I go to the forum for one of my old question of the day, the link in the first post of the forum goes to another QotD not the actual question for the forum. If you go to this forum.   https://www.sqlservercentral.com/forums/topic/are-we-in-all-these-cities Click the link in the first post "Are we […]
SQL Server 2022 - Development
Select values from second table that are not linked to first table - This is a simplified version of the actual tables and query I'm working with. I feel like it shouldn't be that difficult, maybe i'm not seeing the forest for the trees. I have a product table with 3 products in it. I have a product_user table with  "links" to the products. An entry for each […]
 

 

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

 

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