Avatar of Sandeep rathore
Sandeep rathoreFlag for India

asked on 

SQL server 2005 Job fail

Hi experts
we have Scheduled a Job in SQL Server 2005 ManagementStudio enterprise edition SP2.

Sometimes it fails with error :
Unspecified error occured on SQL Server.Connection may have been terminated by the server [SQLSTATE Hy000][Error 0]. The step failed and job is failing



T-sql script of the Job

update ItemMaster_IN set SKUDescription=
case
when
len
(
  case right(SKUDescription,1)
   when '_' then ltrim(rtrim(SKUDescription)) + ltrim(rtrim(SysSKUCode))
   else ltrim(rtrim(SKUDescription)) + '_' + ltrim(rtrim(SysSKUCode))
  end
) > 50 then
left
(
  case right(SKUDescription,1)
   when '_' then ltrim(rtrim(SKUDescription)) + ltrim(rtrim(SysSKUCode))
   else ltrim(rtrim(SKUDescription)) + '_' + ltrim(rtrim(SysSKUCode))
  end, 50
)
else
  case right(SKUDescription,1)
   when '_' then ltrim(rtrim(SKUDescription)) + ltrim(rtrim(SysSKUCode))
   else ltrim(rtrim(SKUDescription)) + '_' + ltrim(rtrim(SysSKUCode))
  end
end
where
right(SKUDescription,len(ltrim(rtrim(SysSKUCode)))) <> ltrim(rtrim(SysSKUCode))

Thanking in advance,
Microsoft SQL Server 2005

Avatar of undefined
Last Comment
momi_sabag
Avatar of momi_sabag
momi_sabag
Flag of United States of America image

do you have any other message in the alert log?
maybe in the event viewer?
are the failures consistent? how do you fix them?
how many rows are in the table?
Avatar of Sandeep rathore

ASKER

in past 1 month it has come twice only thn it is working fine..well there are not much error and it is not consistent.ItemMaster_IN  has around 1 million rows. thanks
ASKER CERTIFIED SOLUTION
Avatar of momi_sabag
momi_sabag
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Sandeep rathore

ASKER

thanks can you please tell me if there is any problem with this code .

SP-CreateSPR-Textdata.txt
Avatar of momi_sabag
momi_sabag
Flag of United States of America image

what do you mean problem with the code?
the code does not work?
Microsoft SQL Server 2005
Microsoft SQL Server 2005

Microsoft SQL Server 2005 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. It includes support for managing XML data and allows a database server to be exposed over web services using Tabular Data Stream (TDS) packets encapsulated within SOAP (protocol) requests.

72K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo