June 21, 2005 at 5:21 am
Hello all,
I'm totally at a loss here:
I created a DTS with two create view statements (via Execute SQL Task). When I run this DTS it works fine.
Now I place another Execute SQL Task in between the create view statements; this new Task does a shrink of tempdb.
When I run the DTS again it fails on the second create view Task, saying:
Invalid object name dbo.table1
Table1 being the table that I use to create the view from.
Anybody seen this before behaviour before?
tia
Hans
June 21, 2005 at 6:55 am
Stupid question warning : Does the table exists (on that connection) when you try to create the view?
June 21, 2005 at 8:53 am
Yes, the table exists. The task that creates the first view uses it also, and it succeeds; it's only after the 'shrink tempdb' task, and then trying to create the second view, that the error appears.
When I remove the 'shrink tempdb' task and run the DTS without it the two 'create view' tasks run without any problem.
Unfortunatly I need the 'shrink tempdb' task in order to finish the whole DTS.
June 21, 2005 at 8:56 am
Is the table permanent or temps?? Have you tried using the other version?
June 22, 2005 at 2:15 am
i know it sounds stupid, but are you using the proper 3 part nameing conventions for your tables in the view
e.g. master.dbo.sysusers
if your create view statement is attempting to run in either the master or the tempdb after you have swithced database context then that may be the reaseon
MVDBA
June 22, 2005 at 2:26 am
Thanks Michael,
this was indeed the case; the database name was never explicitly mentioned. After correcting this it works.
Also thanks to all others who replied.
Hans
June 22, 2005 at 7:00 am
HTH.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply