April 24, 2012 at 1:10 am
Hi All,
When i am executing DB Reindex in pre production environment..this job is getting failled and writing bellow error in history but same job is exeuting successfully in local.
Message
Executed as user: VOCPP\svc_visqlv02-pp-me_s. SQL ReIndexing Script Version 1.2 [SQLSTATE 01000] (Message 0) @DBName="" [SQLSTATE 01000] (Message 0) @ObjectName="" [SQLSTATE 01000] (Message 0) @HighFragLevel="10" [SQLSTATE 01000] (Message 0) @MinFragLevel="10" [SQLSTATE 01000] (Message 0) @ReOrganizeLevel="30" [SQLSTATE 01000] (Message 0) ReIndex_History Table Does Exist [SQLSTATE 01000] (Message 0) ReIndexing Started At Apr 24 2012 7:40AM [SQLSTATE 01000] (Message 0) String or binary data would be truncated. [SQLSTATE 22001] (Error 8152) The statement has been terminated. [SQLSTATE 01000] (Error 3621). The step failed.
Msg 8152, Level 16, State 2, Procedure sp_ReIndex, Line 77
String or binary data would be truncated.
April 24, 2012 at 1:23 am
can you post the DDL statements for all objects involved, tables procedures triggers etc
April 24, 2012 at 1:47 am
Simha24 (4/24/2012)
Msg 8152, Level 16, State 2, Procedure sp_ReIndex, Line 77String or binary data would be truncated.
Please check Line 77 of procedure sp_ReIndex
April 24, 2012 at 2:41 am
Please check i have attached complete procedure.
Thanks in advance
April 24, 2012 at 2:47 am
what is the largest name of a database on the instance?
on first glance it looks that you have a DB name larger than 25 and its failing inserting into the temp table
select max(len(name)) from sys.databases
April 24, 2012 at 3:09 am
select max(len(name)) from sys.databases
Result
32
April 24, 2012 at 3:13 am
Change the DBName in the temp table to a data type of SYSNAME this will then eliminate this error from happening.
April 24, 2012 at 3:46 am
Thanks for providing....
i will update u
April 24, 2012 at 4:20 am
i understand the issue...now the problem is resloved....
Thanks for your guidence
April 24, 2012 at 4:22 am
happy to help
November 29, 2012 at 9:43 pm
is it the same for Index name? because I received the same error but my DB name is not more than 32 but index name is 64 and 47?
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply