March 30, 2005 at 6:34 pm
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!
April 1, 2005 at 12:16 pm
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
July 7, 2006 at 7:14 am
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
August 17, 2006 at 11:46 am
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 :/
February 2, 2007 at 3:48 am
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.
December 18, 2008 at 2:36 pm
SWEET! 😀 Thanks for the post! I was having the same issue.
December 29, 2008 at 1:36 pm
Thanks Much- saved me a few hours as well.
December 30, 2008 at 10:24 am
Thanks for this post...
It was the USE command for me.
November 12, 2009 at 9:22 am
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
February 8, 2010 at 2:03 am
thanks so much for the info people :-)... i had spent hours rectifying this error...
January 18, 2011 at 3:15 pm
Thank you snaghshineh, really appreciate your reply. Changed my DTS package a number of times thinking it was a temp table issue.
October 3, 2012 at 12:47 pm
Thank you very much! You saved me a lot of work.
January 15, 2013 at 11:02 am
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