SQL DTS - "Invalid Pointer"

  • Hi All,

    I have two SQL servers, one is running SQLServer 7.0 (7.00.842) and the other is running SQLServer 2000 (8.00.760).  I've linked the servers (on the SQL 7.0 box).

    I need to copy some data from the 7.0 box to the 2000 box on a nightly basis.  I wrote the query, and it works fine in QA when connected to the 7.0 box.  Thinking everything was going ok, I built a DTS package with the same sql code on the same server.

    Strangely, when I run the DTS package I receive an "Invalid Pointer" error.  And of course, when I schedule the job to run, it also fails.

    Any idea why this is happening?  The only information on this "Invalid Pointer" error I can find refers to an older service pack, which is not the problem in this case.

    Any pointers would be much appreciated.  Thanks!

  • Hello,

     

      I was getting "Invalid Pointer" when trying to export results of a query (from a stored procedure) to an Excel spreadsheet.

    The problem was that I had one line in the stored procedure that inserted on record in another table. Then I had set Nocount on. As a result if you ran my qurery Analyzer you would get a message in the message window.

    It truns out that DTS packages do not like messages. Make sure you have Set NOCOUNT ON and SET ANSI_WARNINGS OFF.

     

    It took me half a day to figure this out!

    Shab

  • THANKS!

    "Make sure you have Set NOCOUNT ON and SET ANSI_WARNINGS OFF."

    After including these statements as first two rows in my stored procedure, i was finally able to access two different databases (select from DB1, insert into DB2) in the stored procedure, when called from DTS.

    (SQL Server 2000)

    martin

  • Humm, I am running into the same problem except I am not allowed to set the ansi warnings off... I am hitting a linked table and i dont think this is allowed:

    Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query.

    Bummer :/

  • strange.. when trying to get round my invalid pointer problem from a dts package i deisgned, it said it didnt like the set commands.. but when using the build query in the transform data properties in the dts manager i also found it didnt like the use command.. got rid of that and it was fine!!! If it dont work in the preview here it wont work when running the package. This thing gives better error messages though.

  • SWEET! 😀 Thanks for the post! I was having the same issue.

  • Thanks Much- saved me a few hours as well.

  • Thanks for this post...

    It was the USE command for me.

  • This is exactly why I love this site. I was getting the same error from copying a query from QA to my DTS package. Placed these two commands at the beginning of my DTS query:

    SET NOCOUNT ON

    SET ANSI_WARNINGS OFF

    and viola' it works!

    Thanks for the solution.

    Clarence

  • thanks so much for the info people :-)... i had spent hours rectifying this error...

  • Thank you snaghshineh, really appreciate your reply. Changed my DTS package a number of times thinking it was a temp table issue.

  • Thank you very much! You saved me a lot of work.

  • For any one else who may stumble across this post in their search for an answer:

    Make sure your sql statement does not have a "USE db" clause in it.

    That will also cause this error.

Viewing 13 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic. Login to reply