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

Staying Active

Today we have a guest editorial from Grant Fritchey as Steve is away on his sabbatical.

Yesterday I tried for a new personal record in the back squat and failed. Twice. I try to work out regularly, at least three times a week for formal workouts. In addition to this, I sometimes do pretty heavy yard work; chainsawing logs, moving logs, splitting logs, in addition to everything else you think of when I say “yard work.” I also try (emphasis on that word try) to eat right. Yet, if you’ve seen a picture of me, I’m more than a little tubby, so this isn’t about bragging.

No, the point here is that in addition to the time I spend learning and doing stuff in and around data and IT, I also spend time trying to stay fit. Why? Well, some of it is purely selfish. Yeah, I’m tubby, but I could be tubbier. Keeping the weight down, I look better and feel better. Some of it isn’t selfish at all. I want to be healthy for my family so I can support them and take part in the things they do. However, one of the most significant driving factors for me is the link between exercise and mental health.

We work in an incredibly comfortable job. We sit inside climate-controlled environments (yes, there are exceptions, but they’re exceptional). We poke at keyboards. Sitting at a computer is not physically demanding work. Yet, we’re also doing things that could affect our organization, our co-workers, even other people’s lives. This work can add a great deal of stress to us, both physically and mentally, and we need to deal with both. Exercise has been proven to help with both.

Today’s suggestion, if you don’t exercise, start. Get up, take a walk. Do a little raking in the yard, assuming you’re not looking at a foot of snow. Start a formal exercise program. Don’t have legs -- do pull-ups or presses. Get active and do something. First, it’ll help you physically. Second, you are thinking about your friends and family who want you around. Finally, you’re taking care of your own stress and mental well being by engaging your physical well being. I’m, of course, not suggesting that anyone do anything that leads to harm, but all of us can do something to be more active and more physically fit. It will help.

Grant Fritchey

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

 
 Featured Contents

Collections

bsahlean 61286 from SQLServerCentral

Problem The usage of a collection of integers in some scenarios is considered to be optimal because of the overhead involved by the creation of another user table used just to store numbers, which is the most common solution. What are collections of integers? They are lists or arrays consisting of integers. The number of […]

Managing SQL Server Docker containers in macOS

Additional Articles from SimpleTalk

In the second article of this series, Carlos Robles explains how to manage Docker images and containers.

PASS Summit 2020

Press Release from PASS

PASS Summit is the must-attend conference for Microsoft data professionals; delivering 3 full days of technical training on data architecture, management, and analytics. Get the skills you need with in-depth sessions created and led by industry experts. Network and problem-solve with peers and Microsoft engineers, and get ahead of the curve with spotlight sessions on today’s hot topics. Join Redgate and the PASS community in Houston on November 10 - 13 to future-proof your data career.

From the SQL Server Central Blogs - Power Platform Quick Tips – Episode 04: Hiding Power BI Visuals Interactivity

Devin Knight from Devin Knight

Welcome back to my series on Power Platform quick tips! In this episode you will learn how to hide the interactive capabilities of your report

From the SQL Server Central Blogs - Using Erik Darling’s sp_pressure_detector to resolve CPU issues

DesertDBA from The Desert DBA

Last Friday I spent my lunch break going through some links I had marked for future reading. One of them was a post earlier this month by Erik Darling...

 

 Question of the Day

Today's question (by Grant Fritchey):

 

Identifying Forced Plans

The Query Store has a number of catalog views that help you to track and understand the behavior of your queries and query plans. When you mark a plan as forced, one of these views, sys.query_store_plan, is updated with the column is_forced_plan being changed from 0 to 1. If you were to retrieve a plan from cache, is there any way to know that the plan was forced and if so, how?

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)

The Dictionary Keys

I have this dictionary in Python:

Teams = {"DEN": "Denver Broncos", "KC": "Kansas City Chiefs", "OAK": "Oakland Raiders", "LAC" : "Los Angeles Chargers"}

What method gives me a list of the keys in the Teams variable?

Answer: Teams.keys()

Explanation: The keys() method will return the key values for a discitonar. Ref: Python Dictionary keys() Method - https://www.w3schools.com/python/ref_dictionary_keys.asp

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
DIff Backup on secondary replica in AG - Why differential backup is not supported on secondary replica in AG?
How to Insert EventViewer records to SQL Server Table - Hello, I developed the below code to scan through cluster error issues happening in the last 48 hrs. But if I need to insert the reocrds to a table, how to achieve the need? Get-EventLog -LogName "system" -after (((get-date).AddDays(-2)).date) | where {$_.InstanceId -eq 1069 -or $_.InstanceId -eq 1045 -or $_.InstanceId -eq 1205 -or $_.InstanceId -eq […]
Administration - SQL Server 2014
ould not open file I:\DataFiles\Alerts.mdf for file number 1. OS error: 3 - Date,Source,Severity,Message 02/07/2020 08:57:48,spid20s,Unknown,File activation failure. The physical file name "L:\LogFiles\Alerts_log.ldf" may be incorrect. 02/07/2020 08:57:48,spid20s,Unknown,FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'L:\LogFiles\Alerts_log.ldf'. Diagnose and correct the operating system error and retry the operation. 02/07/2020 08:57:48,spid20s,Unknown,Unable to open the physical file "I:\DataFiles\Alerts.mdf". Operating system error 3: […]
Development - SQL Server 2014
Group by the messages based on the Column and retrieve the records - Hello All, First of all, I would like to thank you for going through my topic. So the question is I need to compose the message and send it to the recipients based on the Notification Type (Phone, and Email). For that, I have written the below query which basically composes the part of the […]
SQL 2012 - General
Figure out Source of SPID retrospectively - Hi All I am looking for a way to find the source of a SPID that ran a query last night. I have inherited an SQL environment and there are DBCC queries being ran at 10pm each night. They are not being ran as SQL Agent Jobs or scheduled SP's so I assume they are […]
i get error All queries combined using a UNION, INTERSECT or EXCEPT operator mus - problem I get error All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists I need to display data plus one record display as first row as structure of data the following data is desired result bold row i need to added ItemId IPN […]
SQL Server 2012 - T-SQL
What EXACTLY are brain dumps, are "historical questions" illegal and so the VCE - Hello. This is probalby sensitive question, so i will try to explain it as clear and precise as possible. I've read the exam policies and FAQ of MS Server 70-461 exam, spefically the "exam security and integrity process". I am new at this subject, so please help me out. For what i understand, brian dumps […]
SQL Server 2019 - Administration
MS SQL access from Mac - I am trying to access a local MS SQL server (running in a Docker container) on my Mac. I have no trouble if I use sqlcmd but I cannot get Python to work. Here is the beginning of a script: from sqlalchemy import * engine = create_engine('mssql+pyodbc://userid:password@localhost') con = engine.connect() This results in: pyodbc.InterfaceError: ('IM002', […]
SQL Server 2019 - Development
Selecting the results of a Common Table Expression after using INSERT INTO - Here I have a common table expression followed by INSERT INTO.  After that, I want to SELECT the results so I can see the newly inserted data, however I get an error.  I presume this is because after the first occurrence of SELECT, INSERT INTO, UPDATE or DELETE the CTE can no longer be referenced. […]
T-SQL (SS2K8)
Identifying Empty columns - Hi is there a way to identify empty columns. I'm going through a new database right now and dropping columns that have never been used. I've been generating SQL statements to get the max length value of each column and identifying columns that return NULL If there is an easier way to do this I'd […]
Reporting Services
SSRS 2016 Report Server DBs in a Basic Availability - I have a 2 node cluster on which I need to setup AlwaysOn as standalone SQL instance...since it is a standard edition we would be going with Basic AGs. I can easily get the user databases added into the AGs but I am not sure about how it would be if we add the ReportingServer […]
Cached Report Readiness - Hi, I have a report that is pretty complex and performance is not as good as I'd like it to be. Luckily, report is running of data snapshot, so when snapshot is ready, I'm caching report and set it to Always run this report against pregenerated snapshots. creating a snapshot takes 10 to 15 minutes. […]
SSRS 2012
SSRS Table Display - Wanting to do some complex (at least to me) manipulation of data that looks like this: And massage it into an SSRS table that looks like this: I've made the following attempt: And it is doing something close to what I want, but not quite: In cases where there are more than one fees per […]
Powershell
Calling a SQL Server Agent job - Hi, I was looking for a way or possibility to call a SQL Server agent job using a powershell script. And wanted this powershell script to be in a windows task scheduler job. I am pretty new to PowerShell, and so far I was able to get a script as below: (but does not call […]
Integration Services
Zappysys SSIS Send HTML Email Task (FREE) - Does anyone know if the Zappysys SSIS Send HTML Email Task is free to use in VS and SQL Agent forever or just for 30 days without a purchase? The website suggests it is free but they they talk about a 30 trial for some components. SSIS Send HTML Email Task
 

 

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

 

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