I have moved the database from Server 2005 to Server 2012. While running Stored Procedures I get consistent error:
Msg 50000, Level 16, State 1, Procedure sp4_rec_declare_email, Line 77
OLE Automation Error Information
Creating object(lkDeclareDocSrvr.lkDeclare) failure
Source: ODSOLE Extended Procedure
Description: Invalid class string
I have tried to activate OLE Automation Procedures
sp_configure 'show advanced options', 1
GO
RECONFIGURE;
GO
sp_configure 'Ole Automation Procedures', 1
GO
RECONFIGURE;
GO
sp_configure 'show advanced options', 1
GO
RECONFIGURE;
I enclose the code below
EXEC @vHr = master..sp_OACreate 'lkDeclareDocSrvr.lkDeclare', @vObject OUT, 4
IF @vHr <> 0
BEGIN
/* instance failed; get error info */
SET @vOutput = 'OLE Automation Error Information' + Char(13) + 'Creating object(lkDeclareDocSrvr.lkDeclare) failure'
EXEC @vHr = master..sp_OAGetErrorInfo @vObject, @vSource OUT, @vDescription OUT
IF @vHr = 0
SET @vOutput = @vOutput + Char(13) + ' Source: ' + ISNULL(@vSource, '') + Char(13) + ' Description: ' + ISNULL(@vDescription, '')
ELSE
SET @vOutput = @vOutput + ' sp_OAGetErrorInfo failed.'
RAISERROR (@vOutput, 16, 1)
RETURN @LK_ERR_FOR_INNER_USE
END