SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL DTS - "Invalid Pointer"


SQL DTS - "Invalid Pointer"

Author
Message
Brian Stanley
Brian Stanley
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 1

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!


snaghshineh
snaghshineh
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 1

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





martin-346677
martin-346677
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 1

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


Rico D
Rico D
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 33
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 :/
labrys
labrys
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 1
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.
Nelson-290515
Nelson-290515
Grasshopper
Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)

Group: General Forum Members
Points: 16 Visits: 16
SWEET! BigGrin Thanks for the post! I was having the same issue.
Steven McKenna-317587
Steven McKenna-317587
Grasshopper
Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)Grasshopper (22 reputation)

Group: General Forum Members
Points: 22 Visits: 110
Thanks Much- saved me a few hours as well.
J Wright
J Wright
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 Visits: 24
Thanks for this post...

It was the USE command for me.
Clarence VanDyke
Clarence VanDyke
SSC Rookie
SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)

Group: General Forum Members
Points: 34 Visits: 55
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
rohit.anshu
rohit.anshu
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 Visits: 80
thanks so much for the info people :-)... i had spent hours rectifying this error...
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search