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

Daily Coping Tip

Challenge negative thoughts and look for the upside

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.

Artist or Scientist?

Today's editorial was originally published on 19 Aug 2014. It is being re-run as Steve is on vacation.

Which are you, an artist or a scientist? If you automate, you're the latter. If you are a scientist, you can go on vacation. You can be more productive. People can count on you. You get things done quickly, consistently, and reliably. Everyone knows what to expect when you're done with a task. They can expect things to be completed a certain way.

If you manually run installation programs, click GUIs to configure options from memory, and customize each system you work on, you're an artist. Artists build works of art, each of them unique. I know some incredibly talented artists working in technology, people who duplicate their work over and over extremely consistently. However at some point they'll make a mistake, and then I'll never know what state the system or code is in.

While we need artists to push boundaries and experiment with new techniques, we don't want them managing production systems or writing production code.  I want production code to use well known and proven techniques, best practices, good error handling, application of standards, logging and more. I want production systems to be stable, not with a lack of change, but with a lack of issues. I need scientists that produce work that can be counted on.

Don't build works of art. In development you must be an artist at times, but when you solve problems, ensure that the code contains best practices (secure coding and error handling among them), and make sure that your team understands and can reproduce the code later. In production, ensure you learn automation (PoSh, scripting, templates) and can build, or rebuild, your systems quickly and consistently. Deploy your builds to QA and development so that all the environments are the same.

Become more of a scientist and not only will people depend on you, they'll be less worried when you go on vacation because there will be fewer surprises for the person covering your work.

Steve Jones - SSC Editor

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

 
 Featured Contents
Stairway to Advanced T-SQL

Stairway to Advanced T-SQL Level 9: Compare, Modify, Derive and Validate Date and Time Values

Greg Larsen from SQLServerCentral.com

When you build applications that store data in SQL Server you will most likely have to store dates and times, and you’ll call functions to do date manipulations. It is important to understand the different date and time data types, and when to use one data type over another. In this level I will be exploring the different date and time data types and discussing when each type is appropriate.

CRUD Operations in SQL Server using Python

Additional Articles from MSSQLTips.com

This article goes through a process to show how you can use Python to perform create, read, update, and delete (CRUD) operations on SQL Server data.

Managing database changes using Flyway: an Overview

Additional Articles from Redgate

This article describes the principles of using Flyway migrations to build a database from scripts, to a specified version, and to track, manage and apply all database changes.

From the SQL Server Central Blogs - Server Review Essentials for Accidental and Junior DBAs—Setting Up (Part 2)

Kevin3NF from Dallas DBAs

Welcome back to my Server Review Essentials for Accidental and Junior DBAs series. Last week, we took a closer look at the first steps of getting your environment set...

From the SQL Server Central Blogs - One Chart at A Time Video Series

Meagan Longoria from Data Savvy

Jon Schwabish over at PolicyViz has created great initiative called the One Chart at a Time Video Series. It’s an effort to expand readers’ graphic literacy through short videos...

 

 Question of the Day

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

 

The preloaded data in R

How can I get a list of the preloaded data sets in R?

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 Default Severity

I am using THROW in my application like this:

THROW 51000, 'The record does not exist.', 1;

What severity level does this report to the user?

Answer: 16

Explanation: THROW reports a severity level of 16. Ref: THROW - https://docs.microsoft.com/en-us/sql/t-sql/language-elements/throw-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
[ODBC Error] - When backup job runs we are receiving the below error and database connection closes. [Microsoft][ODBC SQL Server Driver]Communication Link Failure
SQL Server 2017 - Development
REPLACE 2 lines CR+LF by 1 line CR+LF - In a table, I have a field (text format) which contains sometimes 2 or 3 consecutive empty lines of Carriage return + Line feed I would like replace these 2 or 3 lines by only 1 line CR+LF   Could you help me to build the sql query?   Many thanks
SQL Server 2016 - Administration
PBM policy to check empty passwords - Dear friends, Please, could you give me some ideas, how to implement SELECT count(*) FROM sys.sql_logins WHERE PWDCOMPARE('', password_hash) = 1 ; As a Policy Based Management to check in our instances, currently the empty value could not be evaluated. I'm using an ExecuteSQL expression, but it looks like there are an error due to […]
SQL Server 2016 - Development and T-SQL
SQL 2016 - Need help reorganizing the output - Hello Gurus, Looking for some help to manipulate output data. Here is my SQL WITH SampleData (MAINJOB,JOB1,JOB2,JOB3,JOB4,JOB5,JOB6,JOB7,JOB8,JOB9,JOB10,JOB11) AS ( SELECT 'ABC4013','ABC4014','ABC4067','ABC4099','ABC4098','ABC4060','ABC4071','','','','','' UNION ALL SELECT 'DEF4061','DEF4062' ,'','','','','','','','','','' UNION ALL SELECT 'GHI4003','KLM4068','KLM4053','KLM4061','KLM4064','KLM4062','KLM4050','KLM4087','KLM462T','KLM4085','KLM4011','KLM4076' ) SELECT * FROM SampleData ORDER BY 1 Current SQL output MAINJOB JOB1 JOB2 JOB3 JOB4 JOB5 JOB6 JOB7 JOB8 JOB9 JOB10 JOB11 ABC4013 ABC4014 […]
need help with T-sql - Hello my dears,   Please help with the query to retrieve  the data as my mamager want in this format : ID,,cm_id, Date, .NextDate, status , DateDiff("n",Date,NextDate) AS DateDiff_mins, next_status   where next_status is linked with next_date  and also next_status    equal with every changed in Status  from pending to add tatachemnt .(for example). Bst  Wishes, […]
Accessing a RESTORING database for test refresh - I have a requirement whereby testers on ServerA need a copy of the production database from ServerB which is refreshed on a two-day basis. The source database is nearly 400Gb and is in simple recovery mode. Full backup is made on a weekly basis with differential on the remaining days. At the moment I'm doing […]
Development - SQL Server 2014
Balance is not calculating correctly,when date get change in transection. - Below is data in which two different date are coming,01/19/2021 and 01/18/2021 , Date 01/19/2021 transection amount is not getting minus (Credit ) From Balance ,but 01/18/2021 amount is getting Less from balance. Secondly,i want ,Order by trans_date asc, Create table #tbl_COA (Level_Four_ID int,Level_Four_Name varchar(50),Opening decimal(10,2)) Create table #tbl_trans_type (Trans_Type_ID int,trans_type_name varchar(50)) Create table #tbl_transection […]
SQL Server 2019 - Administration
How to find index usage by stored procedure? - Hi all, We have 2 DMV's: sys.dm_db_index_usage_stats sys.dm_exec_procedure_stats And they don't look they can be joined between each other. One shows index usage, and another shows procedures executions statistics. But is there a way to find index usage by procedure? Thanks  
Reporting Services
How to set the value of a parameter that is passed via a URL - I may have had this originally in the wrong forum. I found this category, so I will try here. I have been looking of a good example of how to accept a parameter value in SSRS via a URL but I cant find an example that fits. A URL carries the Parm value.  I can […]
How to create a gantt chart for event rooms during a day - Hi all, This will be my first ever post in a forum like this. But searching around the web and been spending to many hours allready, I tried finding a great community to join. Scenario - I`m working for a customer that are running some big event properties, they are lacking a good gantt chart […]
Error: The size necessary to buffer the XML content exceeds the buffer quota - Hi Guys, I have a report named Master and a report named Child, Child is added to the Master report as a sub report 11 times with a different Location parameter being passed in for each report. This is obviously running 11 queries against the server and causing issues. Each sub report has two tables […]
SSRS 2012
Odd things with Report Builder (also tried VS 2019) - This is kinda hard to explain, maybe I can make sense of it. So I had to add an column to the report which meant modifying one of the four data sets for the report.  I was getting data and it was correct in the Tablix.  But if I changed the date range then the […]
SSRS 2014
SSRS passing parameter via a URL - Hello, I have been looking of a good example of how to accept a parameter value via a URL but I cant find an example that fits. The stored Procedure that is used as the dataset into the report needs a parameter.  We need the ability to pull the parameter from the URL which is […]
Integration Services
Issue in using Smartsheet CSharp SDK in SSIS Package - Hi, I am using Smartsheet CSharp SDK in SSIS Script Task. I added it by nuget package, but getting error as below : Error CS0246 The type or namespace name 'Smartsheet' could not be found (are you missing a using directive or an assembly reference?) Then, I downloaded Smartsheet CSharp SDK and added reference to […]
converting smallint to int in ssis - Hi clever guys   I have two tables named dbo.jade.store and dbo.stage.Store.  The first has a column called store_number, PK smallint, not null and the other storeNumber, PK, INT not null. For some reason I cannot use a derived column or data conversion to change the store_number from smallint to int as the mapping won't […]
 

 

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

 

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