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

A Clock With Benefits

This editorial was originally published on Aug 26, 2015. It is being re-run as Steve is traveling.

One of the difficulties I think that developers face is that so few people understand what actually goes into producing software. The end result that a user sees can mask the effort and complexity of the underlying code. A person might see one application that required months of effort and not understand how it's different than a similar (in their view) application that was prototyped and completed in a week.

I've seen a few efforts to try and explain how code is written, and I think the huge piece by Business Week was a really good explanation for the layman. It tries to simplify concepts, and does so in a humorous way. I suspect that this piece might actually help our clients and customers gain some appreciation for the difficulty of producing a basic application.

However I think we need some additional articles like this to help explain our database world. While there are some good, basic pieces on what a database is, we don't necessarily help anyone understand the complexity of assembling disparate data, especially at scale.

I don't think end users would care much about why database performance can be an issue, but I do think that some well written, easy to read, enjoyable pieces on the issues of writing poor database code might give developers some appreciation for why indexes matter, what RBAR does to performance, and what solutions might help their code shine.

No one wants software written poorly, and no one wants deadlines missed. However the world of software development is complex and the more that we can help our clients understand this, the less time we waste on explanations.

Steve Jones - SSC Editor

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

Redgate Webinars
 
 Featured Contents

Cross Database Queries in Azure SQL Database

Steve Jones - SSC Editor from SQLServerCentral

Cross database queries in Azure SQL Database aren't as straightforward as you might think, but they aren't hard to implement. Follow along to learn how to implement them.

Modeling Time

Additional Articles from SimpleTalk

There are those who argue that time doesn’t really exist; it’s just an illusion. That debate won’t keep you from storing and manipulating dates and time in SQL Server. In this article, Joe Celko discusses some of the many ways that SQL Server treats temporal data types.

Static Data and Database Builds

Additional Articles from Redgate

Whichever way you wish to ensure that a database, when built, has all the data that will enable it to function properly, there are reasonably simple ways of doing it. Phil Factor explains the alternatives.

From the SQL Server Central Blogs - Create New Azure VM with PowerShell

Bradley Schacht from Bradley Schacht

Every so often I set out to create new resources in my Azure subscription using the command line tools (PowerShell or CLI) just to keep up to date on...

From the SQL Server Central Blogs - Learning More about Kubernetes (K8s)

Steve Jones - SSC Editor from The Voice of the DBA

I know a bit about this, but I’m always looking for more. I had the chance to see Brendon Burns recently and I was impressed. That is one seriously...

 

 Question of the Day

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

 

Azure VM SQL Database Backups

As a contractor, I have set up a SQL Server instance inside of an Azure VM. I am a little worried about support from the organization that needs this, since they have accidental DBAs that work on the systems. I want to make the backup process simple and easy for them, while ensuring they can have a point in time recovery to an hour. They are comfortable in the Azure Portal, and a solution that works in the Portal is preferred. Which of these should I choose?

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)

Going from long to wide

I have a dataframe of speakers and events across years.

> speaking <- data.frame(ID = 1:3, expand.grid(Name = c("Steve", "Grant", "Kendra"), Year = 2015:2017),
+                        Events = round(runif(9, 18, 35), 0)
+ )

I have the tidyverse library loaded and want to use the wide() command to change my dataframe. I run this.

> widespeaking = speaking %>% spread(Year,Events)

What size and shape of dataframe does this give me?

Answer: 4 columns, 3 rows

Explanation: This will pivot the data on the columns spreading the years out to columns and the events to the cells. There will also be a first column with the names. The results look like:

> widespeaking
  ID   Name 2015 2016 2017
1  1  Steve   30   30   24
2  2  Grant   29   22   34
3  3 Kendra   31   31   27

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
Existing logins get mapped to new databases - Pretty new with SQL but working my may up:-) When I create a new database all existing SQL-logins automatically get mapped to the new database. How to avoid that? I can remove them afterwards but since I'm about to add 60+ databases I will be a pain in the ass to remove them manually or […]
Grant permissions to execute jobs owned by user - Hey gurus, I'm novice to SQL Server and in need of your help! I need to create a SQL Login for use by few people to run jobs created by 'xyz' account. Is there an easy way to do this? I don't want to add them to the SQL Agent roles in MSDB as I […]
SQL Server 2016 - Administration
SSMS connection attempt results in "Errors in the metadata manager. ..." - Hello experts, I have a colleague who's trying to connect to one of our dev database servers, and when they launch SQL Server Management Studio, they see this error after clicking connect: Errors in the metadata manager. Either the trace with the ID of 'MicrosoftProfilerTrace156...' does not exist in the server with the ID of […]
Db went to suspect in AG - One of my db went to suspect in secondary replica  when i checked in  events  lock_redo_blocked , how can i trouble shoot these issue . In sql Logs we find deadlock info at that time  
Query to check the latest windows patch detaisl and last reboot - i need a query to check the latest windows patch details and last reboot  of the server .any one help ?   Thanks
Geography methods causing syntax error in job - So...I'm trying to work with some geography in a job step. The entire step runs fine in the query window, but when put into the job the step fails. Here are a few examples from the job...does anything jump out? SET @point = (select "geo" FROM "objectLocation" where "objectId" = @objectId).MakeValid() SET @objarea = (select […]
Administration - SQL Server 2014
Non-yielding scheduler error in SQL-2014 with SP-3 - Every once in a while we receive a "non-yielding scheduler" error in SQL Server 2014.  We already upgraded to SP-3 which is suppose to resolve this issue.  What exactly this error means? SQL Server doesn't crash immediately, but natively compiled stored procedures start faltering about 1-2 days following this error.  What should be done to […]
AG secondary TEMPDB growing hugely - Hi, We configured the Alwayson on 3 servers. A -primary(Synchronous),B-Secondary-(Async-Readable),C-Secondary(Asyn-Not readable).Fail over mode is Manual. from 2 days the secondary server tempdb is growing hugely. When we checked the Primary server the tempdb is fine.Not growing. i am not able to understand why secondary server tempdb is growing hugely. Yesterday night we restarted the Secondary […]
SQL Server 2012 - T-SQL
Convert smallint to Date - Hello! I have column in SQL 2012 DB of datatype smallint. Could you please let me know how to convert smallint to date? Here's the example of smallint data "12940".   Thanks.
TempDB filling up - Hello all, We have a SQL Server 2012 Enterprise SP1 running our ERP system.   We have 15 production databases with approx 570GB in size.  Our Tempdb has an initial size of 100GB and sits on a 450GB drive.  Every day it seems to grow in size until all 450GB is consumed in approx. 2-3 weeks.  […]
SQL Server 2008 - General
Remove SQL Server from Failover Cluster - Hi, I'm having a problem with a Windows Server 2008 R2 Failover Cluster with a SQL Server 2008 Instance losing connection to the shared storage disks. It's an all flash netapp san which has been working fine. To solve I was thinking about removing the SQL Instance from the failover cluster and just running the […]
T-SQL (SS2K8)
Upsert operation between servers - Hello Everyone, We need to perform UpSert operation between multiple tables belongs to different server , can you please suggest any Technical design for this. Suppose a consultant made some changes in UAT  at some point of time then later he wants to migrate same in Production. It may be a new records , updated […]
SQL Azure - Administration
Managed Instance Error Creating Recurring Schedule - BUG??? - When we try to create a SQL Server Agent job schedule that has a recurring frequency type we get the following error: SQL Server Agent feature Schedule job ONIDLE is not supported in SQL Database Managed Instance. Review the documentation for supported options. If we click ok to the message and then edit the unsaved […]
SSRS 2014
Page can't be displayed while accessing the Report server in other Computer - I have set up a Report Server in a Windows 10 client, everything is fine when you try to access it locally, but when I try to access it using another computer, "This page can't be displayed" is the only result that I get. I can ping the computer where the report server is installed, […]
SQLServerCentral.com Website Issues
Unable to subscribe to newsletter using the email entered - I am one of those users that have not received a newsletter since the new site went active.  Can you please reset my email to be OK? Thanks.
 

 

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

 

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