locked
DTS error message RRS feed

  • Question

  • Hi,

    I am trying to migrate data from MySQL database into Sql Server 2000 using DTS package. I am getting the following error message.

     

    "HResult of 0x80004005(-2147467259) returned  Unexpected error occurred. An error result was returned without an error message".

     

    Any help please.

     

    Regards,

     

    Gachingiri

    Monday, September 13, 2010 10:25 AM

Answers

  • It might be a drivers issue
    you went into the Data Sources part of Administrative Tools on the Control Panel to set up the mysql driver.

    check the below things also

    Have you applied at least the SP2 service pack?
    We had several problems that cleared up when we applied the service pack. There is now a SP3 out and we applied that one without experiencing any problems.
    I usually get the problem you stated when the SQL Server is failing to connect to the source.  
    To get the ODBC error code refer to Books Online for the following translation of your error:


    OLE Automation Return Codes and Error Information
    The OLE Automation system stored procedures return an int return code that is the HRESULT returned by the underlying OLE Automation operation. An HRESULT of 0 indicates success. A nonzero HRESULT is an OLE error code of the hexadecimal form 0x800nnnnn, but when returned as an int value in a stored procedure return code it has the form –214nnnnnnn.

    For example, passing an invalid object name (SQLDMO.Xyzzy) to sp_OACreate causes the procedure to return an int HRESULT of –2147221005, which is 0x800401f3 in hexadecimal.

    You can use CONVERT(binary(4), @hresult) to convert an int HRESULT to a binary value. However, using CONVERT(char(10), CONVERT(binary(4), @hresult)) results in an unreadable string, because each byte of the HRESULT is converted to a single ASCII character. You can also use the following sample sp_hexadecimal stored procedure to convert an int HRESULT to a char value that contains a readable hexadecimal string.

    CREATE PROCEDURE sp_hexadecimal

        @binvalue varbinary(255),

        @hexvalue varchar(255) OUTPUT

    AS

    DECLARE @charvalue varchar(255)

    DECLARE @i int

    DECLARE @length int

    DECLARE @hexstring char(16)

    SELECT @charvalue = '0x'

    SELECT @i = 1

    SELECT @length = DATALENGTH(@binvalue)

    SELECT @hexstring = '0123456789abcdef'

    WHILE (@i <= @length)

    BEGIN

    DECLARE @tempint int

    DECLARE @firstint int

    DECLARE @secondint int

    SELECT @tempint = CONVERT(int, SUBSTRING(@binvalue,@i,1))

    SELECT @firstint = FLOOR(@tempint/16)

    SELECT @secondint = @tempint - (@firstint*16)

    SELECT @charvalue = @charvalue +

    SUBSTRING(@hexstring, @firstint+1, 1) +

    SUBSTRING(@hexstring, @secondint+1, 1)

    SELECT @i = @i + 1

    END

    SELECT @hexvalue = @charvalue

    • Proposed as answer by Keshav Ramarao Wednesday, September 15, 2010 5:36 PM
    • Marked as answer by Keshav Ramarao Sunday, September 19, 2010 1:09 AM
    Tuesday, September 14, 2010 12:56 PM

All replies

  • It might be a drivers issue
    you went into the Data Sources part of Administrative Tools on the Control Panel to set up the mysql driver.

    check the below things also

    Have you applied at least the SP2 service pack?
    We had several problems that cleared up when we applied the service pack. There is now a SP3 out and we applied that one without experiencing any problems.
    I usually get the problem you stated when the SQL Server is failing to connect to the source.  
    To get the ODBC error code refer to Books Online for the following translation of your error:


    OLE Automation Return Codes and Error Information
    The OLE Automation system stored procedures return an int return code that is the HRESULT returned by the underlying OLE Automation operation. An HRESULT of 0 indicates success. A nonzero HRESULT is an OLE error code of the hexadecimal form 0x800nnnnn, but when returned as an int value in a stored procedure return code it has the form –214nnnnnnn.

    For example, passing an invalid object name (SQLDMO.Xyzzy) to sp_OACreate causes the procedure to return an int HRESULT of –2147221005, which is 0x800401f3 in hexadecimal.

    You can use CONVERT(binary(4), @hresult) to convert an int HRESULT to a binary value. However, using CONVERT(char(10), CONVERT(binary(4), @hresult)) results in an unreadable string, because each byte of the HRESULT is converted to a single ASCII character. You can also use the following sample sp_hexadecimal stored procedure to convert an int HRESULT to a char value that contains a readable hexadecimal string.

    CREATE PROCEDURE sp_hexadecimal

        @binvalue varbinary(255),

        @hexvalue varchar(255) OUTPUT

    AS

    DECLARE @charvalue varchar(255)

    DECLARE @i int

    DECLARE @length int

    DECLARE @hexstring char(16)

    SELECT @charvalue = '0x'

    SELECT @i = 1

    SELECT @length = DATALENGTH(@binvalue)

    SELECT @hexstring = '0123456789abcdef'

    WHILE (@i <= @length)

    BEGIN

    DECLARE @tempint int

    DECLARE @firstint int

    DECLARE @secondint int

    SELECT @tempint = CONVERT(int, SUBSTRING(@binvalue,@i,1))

    SELECT @firstint = FLOOR(@tempint/16)

    SELECT @secondint = @tempint - (@firstint*16)

    SELECT @charvalue = @charvalue +

    SUBSTRING(@hexstring, @firstint+1, 1) +

    SUBSTRING(@hexstring, @secondint+1, 1)

    SELECT @i = @i + 1

    END

    SELECT @hexvalue = @charvalue

    • Proposed as answer by Keshav Ramarao Wednesday, September 15, 2010 5:36 PM
    • Marked as answer by Keshav Ramarao Sunday, September 19, 2010 1:09 AM
    Tuesday, September 14, 2010 12:56 PM
  • check below things also

    a. Register the ODBC connection on your local PC otherwise DTS couldn't find the DSN.

    b. If any server sessions are already open sqlserver windows then close all and check still it is showing same error, restart the sqlservice once and try again it might work.

     

    Tuesday, September 14, 2010 1:03 PM