| A community of more than 1,600,000 database professionals and growing |
| | Revving the Error I was pleased to see the fix for the string or binary data truncated error saw some development work in SQL Server 2019. If you haven't read about this, the changes are described on MSDN and I thanked the development team. What's even better news is that the fix has been ported to SQL Server 2017 in CU12 is is also slated to appear in an upcoming SQL Server 2016 CU. In working on this error, Microsoft provided some guidance about where the first occurrence of the truncation would occur, in the column and which data value. This is invaluable in troubleshooting data movement, though this could be a trial and error process if you have lots of possible errors in different rows and columns. I could see us working our way through the list of problem data cell by cell. Microsoft didn't change the error message, as that might have broken code. Instead, we get a new error message, number 2628, which allows us to slowly rev our error handling code. To me, this was a much better solution than merely revving the old error. We have a trace flag to turn the behavior on and off, so we can work through the places our code is affected. The plan is that at some point this will become default behavior, and error 2628 will replace that the all too familiar and frustrating error 8152. That makes sense, and I like the idea of limiting how long we can control behavior of our systems. While we might have code that needs to be fixed, we need to fix the code, and sooner rather than endlessly deferred. Even if you have an existing SQL Server 2016 or 2017 system, I'd hope that you'd be looking to patch your system at some point, perhaps to a level where this is the default behavior. There are many reasons why and when we patch, but we might be forced to because of some security issue. If that happens, I hope you've been working to fix code that is looking for error 8152 and are prepared to have SQL Server behavior changed. Steve Jones from SQLServerCentral.comJoin the debate, and respond to today's editorial on the forums |
| The Voice of the DBA Podcast Listen to the MP3 Audio ( 3.2MB) podcast or subscribe to the feed at iTunes and Libsyn. The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. | |
|
|
| ADVERTISEMENT | | How to track every change to your SQL Server database See who’s changing your database, alongside affected objects, date, time, and reason for the change with SQL Source Control. Get a full change history in your source control system. Learn more |
| | CI/CD for your SQL Server database Feeling the pain of managing and deploying database changes manually? Redgate SQL Change Automation completes your database delivery process by building, testing, and deploying the database changes you and your team check into version control. Try it free |
|
|
|
| | | SQL Provision allows teams to create a secure, scalable and repeatable process for managing data as it moves through your SQL Server estate, without causing administrative burdens. To find out more and how it can work alongside your existing database DevOps practices, check out this article. More » |
| Additional Articles from Database Journal Information protection becomes one of the dominant factors that drive modern database design and implementation. This becomes particularly evident when operating in a cloud computing environment, with Azure SQL Database serving as one of the prime examples of this trend. Microsoft delivers relevant features by leveraging several different security-related Azure services. In this article, we will provide an overview of this functionality. More » |
| Rayis Imayev from SQLServerCentral Blogs (2018-Nov-20) After working and testing the functionality of variables within Azure Data Factory pipelines, I realized that it's worth to explore... More » |
| david.fowler 42596 from SQLServerCentral Blogs This is going to be a quick look at an issue that we recently encountered, I’m not going to go... More » |
|
|
| | Today's Question (by Steve Jones): What is returned from this code? DECLARE @s VARCHAR(10) = '1' SELECT @s += 1 SELECT @s |
Think you know the answer? Click here, and find out if you are right. We keep track of your score to give you bragging rights against your peers. This question is worth 1 point in this category: T-SQL. We'd love to give you credit for your own question and answer. To submit a QOTD, simply log in to the Contribution Center. |
|
|
| |
ADVERTISEMENT | Expert T-SQL Window Functions in SQL Server Expert T-SQL Window Functions in SQL Server takes you from any level of knowledge of windowing functions and turns you into an expert who can use these powerful functions to solve many T-SQL queries. Replace slow cursors and self-joins with queries that are easy to write and fantastically better performing, all through the magic of window functions. Get your copy from Amazon today. | | |
|
|
|
|
|
| Yesterday's Question of the Day |
| Yesterday's Question (by Kendra.Little): How many missing index requests are in the execution plan below, seen in SQL Server Management Studio? Answer: We can't tell from this information Explanation: The green hint in execution plans shows a maximum of one missing index request – and only one will be scripted if you right click and script out that index request. The execution plan may have more index requests, however – potentially with a greater estimated impact than the green hint. To view all missing index requests reference in a plan, either look at the properties pane of the leftmost operator in the plan, or into the plan XML itself. Ref: How to Quickly Tell if an Execution Plan as Multiple Missing Index Requests - click here » 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. Entity-Attribute-Value is evil ? how to avoid... - Hi all consider the following scenario:I have a FILE table with known attributes (size, creation date, ...)The user needs to add... Update Row for same ID - Hi, I have a table that holds data where for some of the identical IDs the names are different . One real name... adding each row incremental - Hello, sadly i am at my witts end with this complicated problem, and i know you guys are smart than i... Request code review for UDF: ContainsControlChar and CleanString - Hi, I have a lot of dirty data in my upstream data sources. I've written two UDFs to assist in my... How to run procedure from remote server without linked server - Hello, I need to run a t-sql batch that will run a stored procedure procedure at a remote server. But i don't... Problem with executing SSIS Container, when not executed as standalone - Ahoi, Short introduction: I had a procedure that truncated and inserted a view into a table. The procedure is part of the... Inquiry about table design - Hi All, I have a table which is supposed to save in one of it's field, huge amount of text data... Need index suggestion - Hi All, Need index suggestion for the below query which can improve the performance. (Assume that table has enough data) SELECT... Left Join with View taking more time in SQL Server - The below query is taking twenty seconds to display 53,000 records. This query has five left joins with views. But... Pseudo code help - Need a little guidance regarding a personal project. I don't want any actual code, just pointers in the right direction. There... Calculate future dates which excludes weekends and holidays for few columns - Hello Gents I have task to calculate future dates which excludes weekends and holidays for few columns. Example is below. workdb contains... Remove non alpha chars from a column - Hi there, How to remove non alpha chars from a column ? I googled the following code Create Function .(@Temp VarChar(1000)) Returns VarChar(1000) AS Begin ... Index and Search help - Hi, The belwo is my sample table structure and I will be buildinga sample website to test the search feature. Basically... SSRS installation - It has been a while since I have had to use SSRS and have gone through some iterations of both... How do I know what my Report Server is called (i.e. when prompted in Report Builder) - This is a dumb question from a newbie .. sorry .. How do I know what my Report Server is called? (i.e.... My subreport only shows 1 record, even when there are more. Why? - I've got a main report, which is a detail report. And a smaller report, that's used by the main report... How to split comma separated values stored in XML node Without using function- SQL Server 2012 - I have a requirement to split a csv data inside a xml node column. I am using SQL server 2012.... Writing to multiple XL spreadsheets of the same workbook within same workbook - I need to produce 100s of .xlsx files via the foreach loop from which the dataflow source gets parameter for... Off-site backups - I've recently started in a new organisation and found that 2 local SQL Servers Backups are not going off-site at... Error on Performance Counters disabled after adjusting Service accts permissions - Our SQL service account was incorrectly a Domain admin account. As per best practices and give only the minimum rights... |
|
| This email has been sent to [email protected]. To be removed from this list, please click here. If you have any problems leaving the list, please contact the [email protected]. | This newsletter was sent to you because you signed up at SQLServerCentral.com. Feel free to forward this to any colleagues that you think might be interested. If you have received this email from a colleague, you can register to receive it here. | This transmission is ©2018 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. Contact: [email protected] |
|
|