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

Daily Coping Tip

Decide to look for what’s good, even on difficult days

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.

Stress Testing

This editorial was originally published on 29 Apr 2016. It is being re-run as Steve is on vacation.

Many of the DBAs that manage production systems will at some point determine what level of hardware is needed to support a workload. Whether this is a physical server purchase or a cloud "rental", someone has to decide what hardware is needed. How many cores, the amount of RAM, the number of disks, which hopefully correspond to some level of IOPs, and more. Even in the Azure SQL Database world, you must decide what database capacity you will pay for.

Since this is a big decision, and changes can be hard to make, many DBAs overbuy hardware. After all, no one wants to have a slow server. This is true for Azure as well, at least for many people I know. While changing from an S3 to a P2 is quick and easy in the Azure portal, it's not such an easy sell to management. If they've budgeted $150/month and you tell them we want to go to $900/month, the technical change is the easiest part of this.

As a result, I'm surprised that we don't really have better ways to determine if hardware will support our workload. I see this question asked all the time, and although there are tools and techniques suggested, I've yet to see many people that have a set, known standard way of evaluating hardware and a particular workload.

One one hand, I think there should be better tools to do this, whether from Microsoft or someone else. I suspect since this is such a rare activity and businesses have been willing to overbuy hardware (or deal with substandard performance), that there isn't any large impetus to solve this issue. It's probably not a commerically viable product, so either Microsoft or the open source community would have to tackle this problem.

However I wanted to ask if any of you actually stress test hardware? Either your current hardware or new purchases. If you don't know what your level your current hardware performs at, how do you compare that to new hardware?

Do you have a way to replay and measure a workload? Do you have the time to do so when new hardware arrives? Meaning time is set aside before the system is put into production. Is there a documented method you use? Apart from discussing this today, I'd love to see some articles that detail exactly how you test hardware from a technical tool perspective, and then a followup that examines and evaluates the results.

Steve Jones - SSC Editor

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

 
 Featured Contents

3 Things I Wish I Knew When I Started Using Entity Framework

Bert Wagner from SQLServerCentral.com

Coming from a SQL developer background these few inner workings of Entity Framework caught me by surprise.

Migrating SQL Monitor’s Base Service to .NET Core

Additional Articles from Redgate

Josh Crang explains why SQL Monitor will be switched to run on .NET Core, and how the team tested the potential performance improvements in the monitoring service.

Storage 101: Modern Storage Technologies

Additional Articles from SimpleTalk

In this article of the series, Robert Sheldon discuses emerging trends in storage like virtual SANs, intelligent storage, computational storage and storage-class memory.

From the SQL Server Central Blogs - A Byte of Redgate–Bonus Queso Recipe

Steve Jones - SSC Editor from The Voice of the DBA

As part of the Community Circle effort at Redgate, we’ve released a cookbook: A Byte of Redgate. You can read about the story in this blog, and it was...

From the SQL Server Central Blogs - 3D Printing Ear Savers

Tim Radney from Tim Radney - Database Professional

On April 5th, I started printing ear savers for healthcare workers. I started with a single Ender 3 Pro printer with a .4 nozzle. When I made a post...

 

 Question of the Day

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

 

Database Extended Properties

How do I add an extended property on my database with the name, 'Database Use', and the value, 'Test location for scripts and objects'? I am working in the Sandbox database.

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

 

 

 Yesterday's Question of the Day (by khwabekhan)

Minus Query

I have the below data set:

Employee Table-

INSERT INTO EMPLOYEE (PERSONID,FIRSTNAME) VALUES ('1','ANNE')
INSERT INTO EMPLOYEE (PERSONID,FIRSTNAME) VALUES ('2','DRIAAN')

Person Table-

INSERT INTO PERSON (PERSONID,FIRSTNAME) VALUES ('1','ANNE')
INSERT INTO PERSON (PERSONID,FIRSTNAME) VALUES ('2','GERRY')


I have written this query to fetch the firstname, which is/are present in the employee table but not in the person table and vice versa.

Query:

(SELECT FIRSTNAME
 FROM EMPLOYEE
 ORDER BY FIRSTNAME
 EXCEPT
 SELECT FIRSTNAME
 FROM PERSON
 ORDER BY FIRSTNAME)
UNION
(SELECT FIRSTNAME
 FROM PERSON
 ORDER BY FIRSTNAME
 EXCEPT
 SELECT FIRSTNAME
 FROM EMPLOYEE
 ORDER BY FIRSTNAME);

Which of the following is the correct output for the above query

Answer: An Error Message

Explanation: This will throw an error as the ORDER BY cannot be used with EXCEPT() for both query expressions. You can have a single ORDER BY after the right query. Ref: EXCEPT and INTERSECT - https://docs.microsoft.com/en-us/sql/t-sql/language-elements/set-operators-except-and-intersect-transact-sql?view=sql-server-ver15  

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 Auditing and threat detection - Hi all, I wondered if anyone had any experience,words of wisdom, comments on a way to achieve threat detection with SQL Server 2017+. I'm looking at how we can detect things like, an authorised user or activity out of normal hours, anything thats not a norm. I can kind of doing this using audit specifications […]
DPA for monitoring ? - Hi guys, any one using DPA to monitor their SQL 2017 servers? I am planning to implement this on one SQL server to monitor performance, since this SQL Server always reports slowness from users. Mainly CPU going high. Management gave me 1 license to use SolarWinds DPA, so I can monitor this server. If anyone […]
Assignment Help - I was wondering if anyone would be kind enough to help me with a couple of queries in my assignment that I have not been able to solve. Consider the following schema for a simple social network. User(uid, first_name, last_name,home_city, bio) Friend(uid_1, uid_2) Message(uid, text, from_city) c)Find the uids of users who are friends with […]
SQL Server 2016 - Administration
SQL Agent Jobs running 2 instances at once - I'm having an issue which I'm struggling to find an answer to because the only search terms I can use are too generic.  Hopeful this forum will be able to help. I have a server instance running in the simplest of setups (ie no replication)  but I'm finding that between 2am and 3am some SQL […]
SQL Server 2016 - Development and T-SQL
SQL account for restoring database - I have a script that restores a database and runs some post-restoring actions, mostly fixing the database users. The scripts runs under SQL account ScriptRunner. The RESTORE is fine since ScriptRunner is assigned the dbcreator server role. But how can I run the post-restore script if all database users, including the one for ScriptRunner, are […]
Administration - SQL Server 2014
Nutanix - 'misaligned log IOs which required falling back to synchronous IO’ - Hi I have restored a SQL database onto a nutanix VM, the disks are formatted to 64k. When restoring or running I get error Error: ‘misaligned log IOs which required falling back to synchronous IO’ The database was restored off an old Dell physical 710 server that had disks set to bytes per sector &physical […]
Development - SQL Server 2014
Secured connection to AD with linked server (LDAPS) - Hi, Our system team warn us they detected unsecured connections when one of our linked server try to connet to the AD. We managed to find the concerned request : SELECT * FROM OPENROWSET('ADSDSOObject', 'adsdatasource';'LDAP_LOGIN';'Password', ' SELECT SAMAccountName FROM ''LDAP://ServerName'' WHERE SAMAccountName = ''NameTest'' and objectClass = ''user'' ') After some research, we should use […]
Index fill factor - Hi Experts , We have around 3000 indexes in our database . We have introduced a index maintenance plan to rebuild the indexes . Now while rebuilding the indexes we have option to specify the FillFactor  . My question is that , Is there a way to identify ideal FillFactor for all the 3000 indexes […]
SQL 2012 - General
2012 SQL Agent: Reloading agent settings - My SQL Agent 2012 log file is being filled with messages that say "Reloading agent settings".  What does this mean and how do I stop it? Some jobs did not run last night and I don't know if this is just a coincidence or is a cause.
SQL Server 2019 - Administration
How do I reattach my databases? - Yesterday I went through the process of replacing an old, failing hard drive, out of my Windows 10 Pro machine. I replaced it with an SSD. It gives my old desktop another couple years of use, I hope. I had SQL Server Developer Edition on a second hard drive. Naturally the .MDF and .LDF […]
SQL Server 2019 - Development
Integer convert to percent - Having trouble with the below formula. Technically I want to display it by a percentage with two decimal points but when I run the below I get it with over ten numbers to the right. Please help. Seems like a simple thing but I am off with something. ((CAST(COLUMNA as decimal(10,2)))/CAST(COLUMNB as decimal(10,2))) *100 as […]
Processing Build Item Orders -- do I need a cursor? - say I'm working on a database like AdventureWorks2017 - the standard SalesOrderHeader, SalesOrderDetail (ProductID, QtyOrdered).  Then Parts and PartInventory (PartID, LocationID, QtyOnHand)... and I want to know if I have all the "pieces" to build all the items in a SalesOrder. Writing a query to get the quantity of each Part that's required is trivial. […]
DB Design/Normalization Question - Hello, I've read the posts on this site and elsewhere about normalization -- I have a scenario in a db I'm currently working on where I'd like to get some advice. I am using an Azure SQL Back End/MS Access Front End.  About 35 end users. The primary function of the database is to keep […]
SSRS 2016
Sorting by is not giving the expected results - Hello, Im new to SSRS and I was trying to order by SUM(linetotal) in my chart but its not working as expected, even though the query looks fine when I execute it in SQL. im using the advantureworks database and below what I have so far and this is the results that im getting, the […]
COVID-19 Pandemic
Daily Coping 1 Jun 2020 - Today's tip is to tell someone about an event in your life that was really meaningful. http://voiceofthedba.com/2020/06/01/daily-coping-1-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

 

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