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

Daily Coping Tip

Be curious. Learn about a new topic or an inspiring idea

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.

Collecting Toxic Waste

I was listening to someone talk about software development recently and they used this phrase: "are you collecting toxic waste?". In this case, they were discussing technical debt, but I found the analogy to be good. I've often thought that long term technical debt can make a software project extremely question.

The speaker in this talk had two questions, which I found to be good ones for software developer. The first was are you optimizing individual projects at the expense of longer term technical debt? This is a good way to think about each decision you make about how to build a feature. Asking yourself about short term, or limited scope thinking v longer time thinking is important. Often if we take fifteen minutes and discuss the future of a decision with colleagues, we can better view the trade-off. There are good reasons to sometimes implement something in a short term, fashion, but not every time.

Even if we discuss with ourselves, perhaps by writing down the pros and cons, you might think through your issues. I often find that forcing myself to explain a concept helps me better understand it. It also helps me communicate better with others when I have to work through the issues. Of course, it is very easy to miss something or skip steps when you do this for yourself, I really, really recommend you get feedback from another person.

The second question is are you tracking technical debt or finding ways to pay this down? I think this is one that you need to periodically revisit. Between sprints, maybe after mid length period of time has passed, review the items in your system that you've compromised on. Maybe you look at code no one wants to touch, or is afraid to touch. Maybe this is examining inefficient code, which is something that is crucial in a database. While a poor query might suffice with low volumes or data, or limited numbers of executions, this can quickly become a problem, especially as the number of inefficient items grow.

The database suffers from often being a bottleneck, a single place where all clients connect. We often do have powerful systems here, and the platforms like SQL Server make efficient use of resources, but bad code and technical debt become problems. I often find broken code in database that can't even be executed, and along with poorly written queries, this can hamper future development and flexibility.

Periodically review your code, looking for things to remove or improvements to be made. Your future developer self will thank you.

Steve Jones - SSC Editor

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

 
 Featured Contents
Stairway to Database Design

Stairway to Database Design Level 8: Cursors

Joe Celko from SQLServerCentral.com

This final level to the first landing completes the basics of a SQL database, by explaining what cursors are and why you should never use them.

What is database continuous integration?

Additional Articles from SimpleTalk

Have you ever longed for a way of making the delivery of databases more visible, predictable and measurable? Do you ever wish that they would be of better quality, quicker to change, and cost less? Grant Fritchey explains some of the secrets of doing Continuous Integration for Databases to relieve some of the pain-points of the Database Delivery process.

Free eBook: Performance Tuning with SQL Server Dynamic Management Views

Additional Articles from Redgate

Dynamic Management Views (DMVs) are a significant and valuable addition to the DBA's troubleshooting armory, laying bare previously unavailable information regarding the under-the-covers activity of your database sessions and transactions.

From the SQL Server Central Blogs - PowerShell Arrays and Hash Tables–#SQLNewblogger

Steve Jones - SSC Editor from The Voice of the DBA

I was watching the GroupBy talk the other day and noticed that Cláudio Silva was using arrays, or what appeared to be arrays, in his talk. That was an...

From the SQL Server Central Blogs - Monitoring and Tracking SQL Server Blocking & Deadlocks process

Mustafa Elmasry from DB Cloud Tech

Introduction SQL Server deadlock one of the issues that can be happened in any SQL Server, today in this article I will not explain what is Deadlock and How...

 

 Question of the Day

Today's question (by BTylerWhite):

 

Decoding ROT13 in Python

I'm working with an encoded string in Python. I know I can use the "codecs" module to decode an encoded object by providing the appropriate codec. What will be the output of executing the following code?
import codecs

encoded_string = "FDYFreirePrageny"

decoded_string = codecs.decode(encoded_string, "rot13")

print(decoded_string)

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 Max Log File

What is the maximum log file size for a transaction log .ldf file in SQL Server 2019?

Answer: 2TB

Explanation: A log file has a maximum size of 2TB. If you set this to unlimited for a file, it gets reset to 2TB. Ref: ALTER DATABASE Files and Filegroups - https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-file-and-filegroup-options?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
AG Issues (one node is down) and all but 2 databases is accessible - we have an AG of 4 nodes.  Node1 being the primary, (has about 27 databases in the AG). Node2 went down for some reason (VM is toast?) But being a 4 node AG, i would expect that the environment or the databases will still be accessible from the primary.   Unfortunately this is not the case.  […]
SQL Server 2017 - Development
Create DB List of latest Cumulative Updates - Hi. How can i webcrawl the internet to get the latest CU details and store them in a database. Instead of me tediously manually doing this, i want to automate it, is this possible? I can use either .net, jquery or can it be done in
Stored procedure that runs quickly in SSMS hangs up in SSRS - I'm attaching a WORD document that lists the T-SQL code in the stored procedure that runs in SSMS, but gets "stuck" in SSRS.  I don't see the problem.  Most of the stored procedures I write for my reports are similarly written with 1 or more #temp tables and I don't have problems with them.  Any […]
How do you convert a timestamp into a date - Hi all Can anyone help me turn a timestamp that looks like this: "1994-10-07 00:00:00.0000000" into "10-07-1994",  then into 10-94? I tried cast(DOB as date) and it came back as 1994-10-07.   Any assistance would be appreciated.  
SQL Server 2016 - Administration
Fragmentation & Statistics - Hi All Was approached with a slow running query. First thing I did was update statistics on the entire DB which improved the performance drastically. The problem is that the performance starts to degrade after about an hour or so at which point I update stats again - I've set up a job to update […]
Sql error log - We have job which is configured to recycle the sql error log on daily basis and its failing with the error DBCC execution completed. If DBCC printed error messages, contact your system administrator. [SQLSTATE 01000] (Message 2528) SQLServerAgent Error: 32. [SQLSTATE 42000] (Error 22022). The step failed. we renamed the sql error log out file […]
Development - SQL Server 2014
Docusign API different UI - We have Apttus via which we use docusign and they use the classic UI of docusign. Now we have enabled embedded signing for certain users and when we invoke the docusign URL, the UI is of the new docusign which is not a consistent User experience. We are using the same account so wanted to […]
Addition of values from two fields - I have an inventory usage table that holds values for different locations and periods. The values are calculated by the ERP so I cannot change the SQL values, but in certain instances, I want to combine the values for two locations into one location and zero the usage for the original location. This would be […]
Incrementing ID by one on change of value - Hi I have a table as below, with example data in it ID           Name 2346       M Smith 2346       M Smith 2346       M Smith 2347       M Wilson 2347       M Wilson 3347       M Wilson I want to add another column called […]
SQL 2012 - General
can't get Numbers from Name to prevent conversion failed ? - I work on SQL server 2012 I Face issue as below : Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the nvarchar value '1.2kV' to data type int. this error done where converting Name to number but it is failed . as Example Name have value 1.2v then if i get […]
SQL Server 2019 - Development
PA 640 file - Has anyone imported the file they received? It comes as a .rpt but I've changed it to a txt. How would I import it? It seems to be on multiple lines. Thanks
Execution plan flips from "good" to "bad" at a certain threshold - We've got a particular stored procedure that's been a perennial problem performance-wise since it was written (in 2009). It's in my crosshairs once again and I've at least found out what appears to be going on but I'm at a loss in terms of bending it to my will. Here's the query: select CTR.WorkingID, CTR.WorkingID2, […]
Reporting Services
? on Setting default value to Year of previous month - Hi, I know =Year(Today) will get me the current 4 digit year. What I need is the Year of the previous month. So if the report is run in January 2021, then the default value is 2020, if it is run in December of 2020, then its 2020   Thanks  
SSRS 2016
SSRS 2019 reports are painfully slow - Hi. I'm migrating reports from an SSRS implementation on SQL Server 2012 to SQL Server 2019, and the reports render painfully slow on 2019.  We're talking minutes.  I've scoured the internet and it seems like this is a common question, but the answers point toward making the DB queries more efficient, using Stored Procedures, etc […]
Analysis Services
SSAS Dimension Wizard - name column list missing - I tried to carry out out the instructions in the paragraph entitled "Defining the Internet Sales Orders Fact Dimension" in the  Adventure Works Multidimensional Modeling Tutorial. In Solution Explorer, right-click Dimensions, and then click New Dimension. On the Welcome to the Dimension Wizard page, click Next. On the Select Creation Method page, verify that the Use an […]
 

 

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

 

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