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

Daily Coping Tip

Make a plan to connect with others and do something fun

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.

Making Guesses

This editorial was originally published on 11 Aug 2015. It is being republished as Steve is on holiday.

I was reading a bit about the design and planning stage for a new database that will support some random application. The piece isn't important, but I did notice one thing. The guidelines are generic, encompassing most of the things we might want to think about: structure of data, constraints, volumes of data and rate of growth, and more. It's a good list, and one many of you have probably considered at some point if you've designed a system.

However, I've rarely been able to actually do more than guess at many of the answers. Even much of the data I can write down is often little more than a guess. Even when I know the DRI constraints, I hesitate to document them separately from the code itself. Mostly because I find designs change early and often, and the documentation is rarely able to keep up with code. The same thing applies with the administrative type decisions I make.

I'm also nervous about documenting guesses.   I find that far too often any answer I give takes on some level of truth with the developers, often being considered an immutable fact. The assumption that an early guess will match reality later seems to often blind everyone and limits the level to which we can adapt to changing situations.

As an example, if I tell a SAN admin that we think we need 5GB of space, but we find that we need 20GB in a short period of time, I meet resistance. A debate, or argument ensues, we search for evidence that we need to change, and a very inefficient process ensues. The same thing occurs when developers, security admins, and especially managers hold too tightly to estimates and guesses.

Certainly some guidelines are needed, but when I'm not sure, I tend to give wide ranges, just to prevent too many expectations from taking hold in people's minds. We should know that our plans will rarely survive production deployments and workloads, but somehow we forget that when looking at the guesses we make early on.

Steve Jones - SSC Editor

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

 
 Featured Contents

A Sudoku Solver for Ordinary folk

RevOX11 from SQLServerCentral.com

Solving Sudoku in smaller, simpler steps

Power BI Small Multiples Visual Example

Additional Articles from MSSQLTips.com

Power BI has a new feature which is the Power BI Small Multiples visual. In this article we cover how to enable this feature and also walk through an example of how to use this in a Power BI report.

Catch-up on Redgate Summit

Additional Articles from Redgate

Did you miss the excellent presentations from DevOps experts Pramod Sadalage, Kellyn Pot’Vin Gorman, Samir Behara, and Kendra Little? Good news – all Redgate Summit sessions are available on-demand now. Choose from ‘the future of database DevOps’ keynote, latest DevOps trends, Q&A discussion, and demos.

From the SQL Server Central Blogs - Power BI and a Star Schema

James Serra from James Serra's Blog

I sometimes get asked from customers if they should use a star schema or should they use one large single table/flatfile for their dataset in Power BI. The answer...

From the SQL Server Central Blogs - A Biography Template for New Presenters

DesertDBA from The Desert DBA

Presenting is difficult, and you already know that. It is also incredibly rewarding and beneficial to your career, but that’s not important for this post. As difficult as it...

 

 Question of the Day

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

 

Azure SQL Managed Instance Features

Which of these are allowed in an Azure SQL Managed Instance? (choose 2)

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 Managed Instance Audit Targets

I have a Azure SQL Managed Instance on which I want to create a SQL Server Server Audit. However, I want the audit data to go to an Event Hub in Azure. What is the target I specify in the CREATE SERVER AUDIT syntax?

Answer: Use TO EXTERNAL_MONITOR

Explanation: The EXTERNAL_MONITOR target was added specifically to allow Event Hubs to be an external target. 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 2016 - Administration
Distributed AG DB movement - I have a DAG between On prem and Azure. We have a maintenance window coming up next week where networking team will be replacing some switches. It will cause internet outage for 4 hours. It will disrupt data movement between 2 servers. I have a plan where I pause DB movement in Azure before they […]
SQL Server 2016 - Development and T-SQL
Question about deadlock - Hello DBAs, I am facing some deadlock issue and after investigation from trace flag capture, found the processes involved. Both processes are running update but based on the parameter which defines different targets ( for eg. One update works on condition "where column1 = 'abc'" and other one on "where column1 = 'def'"). First Question […]
SQL 2012 - General
How to Update field updatedStuffDiff when i have different values for parts exis - I work on sql server 2012 I face issue I can't update column name updatedStuffDiff with different feature value for every feature based on partid so when i have two part have same feature but different values then display it as result on column updatedStuffDiff based on partidc and partidx on table #temp so result i […]
Get Date Based on TimeOffSet and Day - Team I have a table which carries the below columns and values TimeOffSet Column > Values are : +00:00, -05:00, -04:00, -08:00, -07:00, -05:30 WeekDay Column > Values are: Sun, Mon, Tue, Wed, Thu, Fri, Sat, Sun Time Field  Column> 02:00, 10:00, 23:00 Expected : I want to O/P which is the Date Field, Time […]
SQL Server 2012 - T-SQL
pivot on 2 fields - I'm trying to create a query that pivots on 2 fields(entity,channel) and produce a daily sum of charges per day. This gives me a daily total( I would like to remove any Null values from the display) for the month, but I want to break it down by channel within the entity, Data: src,200,02,01,400.00 xrb,200,02,01,500.00 […]
SQL Server 2019 - Administration
Name of the remote server in a query - Hi, I want to retrieve the name of the remote server in my SQL server query: exec ('CREATE OR ALTER PROCEDURE ins_tmp_proc AS BEGIN INSERT INTO dbo.tmp (job_id, name, ..., server) SELECT job_id, name, .., @@SERVERNAME from msdb.dbo.sysjobs UNION SELECT job_id, name, .., @@SERVERNAME from .msdb.dbo.sysjobs END') I tried executing just the SELECT statement by […]
Problem with creating query for allocating amount - good day i came a cross of a problem I have a query that takes one line in table and if it math the condition in my situation is if Date and Tracking_Category_1 in table OLAP.VW_CUBE_Finance equal Date and Tracking_Category_1 in OLAP.test2 then it take line that have both condition and braek it in 3 […]
MSDTC and Always On AG - Hi Experts, We are planning to implement 2 Node AO SQL Server 2019. For MSDTC what is the best practice? Do we need a cluster disk for MSDTC alone in this setup? https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/msdtc-best-practices-with-an-availability-group/ba-p/909429  
Remove Carriage Returns / Line Breaks / Any other reason the "text" moves down - I know this has been covered ad nauseum all over the internet for years. But I have literally tried a dozen different possible queries to remove these and the scripts either run and do nothing, or remove WAAAY too much information. I am working with a company to extract data from a program that was […]
Why are DBAs not paid for knowledge and other IT Professionals are? - DBAs are being asked to know everything for 6 figures which cap out for most at 135k a year with Senior experience. So, what does this mean, you get a DBA who knows a lot of everything,  from hardware to development on all levels and certified but DBAs get little to nothing in return for […]
SQL Server 2019 - Development
Logic is not wokring - hi, I have 3 types of invoices , INNU,INN1, INN2 I am trying to filter out invoices that are "INN1" and "Unpaid" ( I dont want INN1  Unpaid invoices ) I tried to use the following condition but Its taking out all the "Unpaid" invoice. where [Invoice Class] IN (@invoice) and ( invoice_cl <> 'INN1' […]
poor query performance by joining large table and new CE - We have a complex stored procedure working in our database. Some of the statements are executed with different query plans depending on database compatibility level / Trace Flags. The different query plans leads to very significant differences in execution time of that stored procedure (some seconds to more than one hour). See the linked QueryPlans. […]
Problem with Logic for new column - Hi guys, I have the following table DDL/DML CREATE TABLE #DailyOnHandForecast (Id INT, ItemNo_ NVARCHAR(24), OH_Qty INT, OH_CONT Decimal (38,20), OH_$ Decimal (38,20), [Date] Date, Arrival_Date Date, [Forecast Daily Qty Sold] Decimal(38,20), [Forecast Daily COG] Decimal(38,20), [Forecast Daily Sales] Decimal(38,20), [Forecast Daily Container Sold] Decimal(38,20), [DayOOS] INT ) INSERT INTO #DailyOnHandForecast VALUES (387909,50363,29,0.08065,3042.05418,'2021-02-26',NULL,2.333,246.222,547,0.006489,NULL), (387910,50363,26,0.074161,2797.2912,'2021-02-27',NULL,2.333,246.222,547,0.006489,NULL), (387911,50363,24,0.067672,2552.52822,'2021-02-28',NULL,2.333,246.222,547,0.006489,NULL), […]
Help query to select latest date row - Hi Guys I have the data below  ( this is an example) and i am trying to create a query to pull the data to show the latest status of the city, i am struggling to do this so from the data above (this is an example , new daily data is added every day) […]
SQL Server 2008 - General
Better query to get count based on column value - I am using SQL server 2008 R2 express edition. Out of below 3 method which method is efficient to fetch count  ? 1.select name,count * from table where name contains 'raj' and P = 1 select name,count * from table where name contains 'ram' and P = 1 merge result in code vs 2.select name,count […]
 

 

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

 

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