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

Daily Coping Tip

Do three things to bring joy to other people today

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.

It Depends

This editorial was originally published on Mar 25, 2009, and is being re-run as Steve is on vacation.

No, it's not a comment on Andy Warren's blog (which used to be called It Depends), but rather a note that the title of this editorial, which DBAs are famous for uttering in response to most any question, also applies to much of life.

I was reading one of Joel Spolsky's columns Inc. Magazine article, and it struck me that "it depends" applies here very well.  He was talking about management and the decision of when to implement middle management for his company, Fog Creek Software. They had been a small company, primarily being run by Joel and his partner, Michael Pryor, as co-CEOs. They made joint decisions and tried to keep an open door policy and encourage people to come talk to them.

It didn't work out so well, and I can certainly understand that. Even when I've had a good relationship with management, I've found that there are times you're hesitant to talk to them about something. After all they don't really mean they have an "open door policy" all the time.

We all think that we have hard and fast rules, and we do, but we don't have as many as we'd like to think we have.  Often what we really have are hard-like rules, that we try to enforce as fast as we can, but sometimes bend or break in response to some situation.

In other words, what we do "depends" on what situation. And that's how it should be. We need some rules, we need to enforce them, but we also need exceptions to those rules. We need flexibility in how to apply them, recognizing that the rule exists to handle one, or many situations, but not all of them.

Steve Jones

Steve Jones - SSC Editor

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

 
 Featured Contents

SSIS Variable and Parameter Analysis

Phil Parkin from SQLServerCentral

Use T-SQL to analyse the usage of all variables and parameters in an SSIS project, including the identification of any unused variables and parameters.

How to Find the Estimation Cost for a Query

Additional Articles from Database Journal

Discover how to estimate the cost of a query. Read on to see an example of how to extract the Estimated Cost for execution plans stored in the procedure cache.

Take our short readers’ survey and win a $50 Amazon voucher

Additional Articles from Redgate

Could you spare 3 minutes to help us out at SQL Server Central/Simple Talk? Take this short survey, tell us about who you are and why you come to Simple Talk/SQL Server Central, and you could win a $50 Amazon voucher.

From the SQL Server Central Blogs - T-SQL Tuesday #127 – Non SQL Tips and Tricks, Referencing Multiple PowerShell Array Elements

david.fowler 42596 from SQL Undercover

This month’s T-SQL Tuesday invitation is from Ken Fisher and he’s asking about non-SQL tips and tricks. This had me thinking for a bit and then something popped into...

From the SQL Server Central Blogs - Power BI FAQ

James Serra from James Serra's Blog

Power BI has become hugely popular and I find common questions about functionality and features, so I thought I would put in this blog some of those questions with...

 

 Question of the Day

Today's question (by Greg Larsen):

 

SQL Server 2019 Feature

Which feature introduced with SQL Server 2019 improves the performance of large analytic queries?

Think you know the answer? Click here, and find out if you are right.

 

 

 Yesterday's Question of the Day (by Greg Larsen)

Memory Grant Feedback

Memory grant feedback tunes the memory requirements for batch mode queries beginning in 2017 and row mode queries beginning in 2019. In which situations will this feature be helpful? (More than one answer is correct)

Answer: When SQL Server incorrectly calculates the estimated row size, Incorrect cardinality estimates

Explanation: The answers are 1 and 4. One reason that the memory grant may be incorrect is when SQL Server incorrectly calculates the estimated row size. This might be due to having varchar(MAX) columns that are NULL in the query. SQL Server may also incorrectly estimate the number of rows due to a bad cardinality estimate and then also incorrectly size the memory grant. Answer 2 is incorrect because SQL Server will disable memory grant feedback for the query if the memory grant must be changed over and over. Answer 3 is incorrect because it doesn’t matter if there is a table variable involved. References:

 

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
SSMS: How to save multiple resultsets from same query into 1 result or 1 file? - I am submitting an official request for DBA of certain servers to run a script on those servers and give me back the resultset. However the script (the actual script is 3 times larger than the attached and returns 20 more results) returns multiple results, so a DBA will not be copy/pasting each resultset into […]
Availability Groups for failover AND mirror - I've got a 2-node failover AG setup. I want to add a 3rd node to be used as a reporting server. That could be read-only, but has to be available all the time. For reasons beyond my control, I can't use replication. The database has no primary keys indexes (3rd-party software design). So, it all […]
SQL Server 2017 - Development
SQL Server Fragmentation- Defragment - The table consist of around 2 billion record on an average there are 1000K inserts happening daily , we see some slowness in recent days , so while checking the table we saw some fragmentation information. Above is the query i used against my dataware database and observed some fragmentation in the index for some […]
SQL Server 2016 - Administration
Creating DB diagram - Hi, I was planning to create a DB diagram of a user DB to better understand the relationship however when I right-click on database diagram (please expand the user DB to see this option) I see an alert window saying 'This database does not have one or more of the support objects required to use […]
SQL server 2016 SP2 error - Hi All,   am trying to update my 2016 SQL server instance to the SP2. the current version is Microsoft SQL Server 2016 (SP1-GDR) (KB4505219) - 13.0.4259.0 (X64) Jun 15 2019 19:20:12 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows 10 Enterprise 6.3 (Build 18363: ) SP2 setup file : SQLServer2016-KB4549825-x64.exe for some […]
SQL Trace Not Capturing Database Events....EXEC, INSERT, UPDATE... - I want to see what Stored Procedures are run when users enter data in a 3rd party product we use. I would also like to see INSERTS & UPDATES to tables. I set up a trace that I have used elsewhere with success, but in this case, it's not capturing any of the events I […]
SQL Server 2016 - Development and T-SQL
Help with T-SQL - I have a web interface for managing tool rentals for our chapter members. I have a display page that will list all of the tools we have and to flag those tools that are currently being rented out to include the expected return date. The important thing is to know which are available and which […]
How to optimise the table performanace (90 lacs records) - Hi, I have a table with 5000 users along with 6 years of attendance data. If I want to retrieve user data from the table it takes time to load. Table Structure Usercode, Rosterdate, Shift code, AttendanceCode Case 1 If i want to retrieve the shift information from 1-jun-2020 to 10-jun-2020 for 5000 users, would […]
Help in Date spans for continuoes and regular dates spans - Hello all, I would like to take input scripts and generate output data as given below. output is expected as if member is continuously enrolled without any gap in enrollment get min and max and if there is enrollment gap leave as is. for any given member there are no multiple spans just leave as […]
Administration - SQL Server 2014
OPENQUERY giving wrong result on linked server - I have setup linked servers on my SQL Server and choose Oracle as a linked server. SOMETIMES, When I run the query below under the SA username, I get different result. However when I run under my own username I get correct result. I Can't understand this anomaly. The below query returns only one row. The difference occurs in […]
Sum of all Memory Clerks and Total Server Memory (KB) - I am trying to understand the memory management of SQL Server. I have a Windows Server 2019 on virtual environment with 64 GB of RAM. I also have SQL Server 2019 installed with Max Server Memory 59776 MB. By using the following query I found the list of all memory clerks: SELECT [type] AS [ClerkType], […]
SQL Server 2012 - T-SQL
? ON Parsing an XML Field - Hi, I know I've asked this before and got a good link , but can't figure out how to parse this XML field. I would usually parse something like Data.Value('Data/.../..) But not sure how to parse out say "Case" from the field below(SqlParameters)?
SQL Server 2019 - Administration
How do I count the objects (tables,views,indexes) for a database? - Is there any simple script which I can use to count the user objects in a database? Reason is, I'm planning to do an upgrade from SQL 2008R2 to SQL 2019 & my plan is to take a count of the objects on the old SQL and 2019 so I can compare and see if […]
Anything that is NOT about SQL!
SSC Traffic Declining ? - Are there fewer posts & replies on SSC these days ? It seems like it. Or are they just spread over more sub forums of the various SQL versions ?
COVID-19 Pandemic
Daily Coping 16 Jun 2020 - Today’s tip is to find the joy in music today: sing, play, dance, or listen. http://voiceofthedba.com/2020/06/16/daily-coping-16-jun-2020/
 

 

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

 

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