Questions tagged [truncation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
58 views

Log truncation issue in AlwaysOn AG

We have four nodes in our AG. After the weekly index maintenance job, the log drive became full. We enabled CDC in one of our database, so we disabled CDC to truncate the log. Then we ran 'checkpoint' ...
1
vote
0answers
77 views

String or binary data would be truncated

I'm struggling with SSMS 17 and SQL Server 17 I have just added some data into a row (multiple columns). When I move away from the row in SSMS, it commits fine. If I try to change any column, I get ...
0
votes
3answers
588 views

Does MSSQL Log shipping truncate the transaction log?

I have setup log shipping on a database in Microsoft SQL Server 2012. I was having issues with my secondary server and I found that this was probably due to a scheduled backup job messing up the log ...
0
votes
1answer
145 views

How can I increase the length of the string returned by object_definition in sqlcmd?

I have an sql script that uses select object_defintion(object_id(...)) to extract the definition from a view. This script is run with sqlcmd: sqlcmd -i extract.sql -o %oudir%\extracted.dat. ...
13
votes
2answers
767 views

Is there an efficient way to see the cause for “String or binary data would be truncated”?

This is a follow-up on this question. It is also related to this feature request from Microsoft. However, many years have passed and several major releases reached the market since it was reported. ...
5
votes
1answer
4k views

NVARCHAR(MAX) string appears to have 6326 characters but won't PRINT them all

I am writing a stored procedure to use the sp_send_dbmail system stored procedure to send an HTML email. I have used this procedure before but have not run into this problem before. I am using the ...
1
vote
3answers
20k views

Truncate tables with dependent foreign key constraints

Hi I'm trying to truncate some tables from my db, but they are related with foreign key constraints so every time I try it SQL Server throws an error like this: Cannot truncate table 'Table' ...
10
votes
2answers
4k views

SQL Server Insert Into - How to identify the column that is causing truncation error

I have a stored procedure that inserts 650 fields into a table. The insert is failing with a truncation error. It's a simple INSERT INTO SELECT (a bunch of fields) FROM (a bunch of tables) Below ...
2
votes
1answer
2k views

SQL Server: Transaction log still very large after log backup

I have a database that is on Full recovery mode. I previously made a full backup, and then on a daily basis add differential backups. Now I have backed up the transaction log for the first time, ...
3
votes
1answer
1k views

Howto avoid textdata of trace gets truncated?

I have a trace file including the TEXTDATA column created by a server-side tracing. Some of the traced queries are very long. If I re-open the trace file on Profiler, the relevant long query is ...
4
votes
2answers
94 views

MySQL is trimming my numbers and I can't figure out why

I've got a table with a bunch of decimal(12,2) fields that are supposed to hold money amounts. For some reason which I can't figure out one of them is trimming the value when either inserted or ...