Is this really true, the length of a stored procedure cannot be > 32 characters for SQL Server 2005
ERROR:
Msg 103, Level 15, State 2, Procedure PricingDrugIMSMappingBrandGenericUpdate, Line 8
The identifier that starts with 'PricingDrugIMSMappingBrandGenericUpdate' is too long. Maximum length is 32.
ERROR:
Msg 103, Level 15, State 2, Procedure PricingDrugIMSMappingBrandGenericUpdate, Line 8
The identifier that starts with 'PricingDrugIMSMappingBrandGenericUpdate' is too long. Maximum length is 32.
Code:
USE [DR_ForecasterTest]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [MarketForecaster].[PricingDrugIMSMappingBrandGenericUpdate]
@PricingDrugIMSMappingID INT,
@BrandGeneric VARCHAR(7)
AS
BEGIN
BEGIN TRANSACTION PricingDrugIMSMappingBrandGenericUpdate;
BEGIN TRY
UPDATE dbo.PricingDrugIMSMapping
SET BrandGeneric = @BrandGeneric
WHERE PricingDrugIMSMappingID = @PricingDrugIMSMappingID
END TRY
BEGIN CATCH
-- Error information is always stored to be referenced later in the
-- event other errors are thrown while trying to resolve them.
DECLARE @ErrNumber int,
@ErrSeverity tinyint,
@ErrState smallint,
@ErrProcName nvarchar(128),
@ErrLineNumber int,
@ErrMessage nvarchar(4000) ;
SELECT @ErrNumber = ERROR_NUMBER(),
@ErrSeverity = ERROR_SEVERITY(),
@ErrState = ERROR_STATE(),
@ErrProcName = OBJECT_NAME(@@PROCID),
@ErrLineNumber = ERROR_LINE(),
@ErrMessage = ERROR_MESSAGE() ;
ROLLBACK TRANSACTION PricingDrugIMSMappingBrandGenericUpdate ;
-- If the error is not gracefully handled, we will raise the error, log
-- it in the Application Event Log and return the Error Number as the
-- return value.
-- Default RAISERROR
RAISERROR ( 101211299, 16, 1, @ErrNumber, @ErrSeverity, @ErrState,
@ErrProcName, @ErrLineNumber, @ErrMessage ) ;
RETURN 101211299 ;
END CATCH
COMMIT TRANSACTION PricingDrugIMSMappingBrandGenericUpdate ;
RETURN ;
END