Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Prevent sql job failure. Expand / Collapse
Author
Message
Posted Wednesday, May 21, 2008 12:34 PM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, November 29, 2012 5:04 PM
Points: 76, Visits: 619
hi
Post #504746
Posted Wednesday, May 21, 2008 1:04 PM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 9:16 AM
Points: 4,064, Visits: 5,340
What kind of help do you need?

Greg
Post #504770
Posted Wednesday, May 21, 2008 2:21 PM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, November 29, 2012 5:04 PM
Points: 76, Visits: 619
how to prevent this?...they told me the tables should be drop at anytime.
Post #504836
Posted Wednesday, May 21, 2008 2:38 PM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 9:16 AM
Points: 4,064, Visits: 5,340
You could add a check to see if each table exists before attempting to import it. I could either be a step in the job before the step that runs the DTS package or it could be an Execute SQL task in the package itself.

Something like:

if exists (select * from dbo.sysobjects where id = object_id(N'tablename[i]) and objectproperty(id, N'IsTable') = 1)
[i]go to the step that imports the table




Greg
Post #504846
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse