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

Data Flow Destinations - Insert Only? Expand / Collapse
Author
Message
Posted Monday, April 14, 2008 12:29 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, November 13, 2009 8:29 AM
Points: 22, Visits: 45
Question:

If I do, for example, a Data Flow task where I have an OLE DB Source, a Script Component task, and an OLE DB Destination, am I ONLY allowed to do INSERTS into the destination in that fashion, and not updates or anything else?



Post #484592
Posted Monday, April 14, 2008 12:52 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, August 10, 2010 5:07 AM
Points: 2,732, Visits: 23,078
Technically, the OLEDB Destination supports any T-SQL statement by using the Advanced Editor. It does not work well though. If you manage to get this to work, it will update a single row at a time.

If you want to do an update or run a procedure, the OLEDB Command object (in the transformation section of the toolbox) is far better suited and easier to use. It is still a one-row-at-a-time update, but that is what SSIS is designed for and it often manages a cursor-style update pretty well. Although it is a transformation component, you do not need to use the output. If you really do not like to leave the data flow arrow hanging (like me), you can delete the output or download the Transh Destination Adaptor from www.sqlbi.com.

Interestingly, I have found I could improve OLEDB Command update performance using a conditional split and multiple updates. It makes sense that running parallel updates could improve performance, but until I tried it I was not really confident that it would really work correctly.
Post #484595
Posted Monday, April 14, 2008 5:11 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, November 13, 2009 8:29 AM
Points: 22, Visits: 45
I think i see what you're talking about - the AccessMode property.

Thanks for the tip - I'll read up on the conditional splitting you referred to.



Post #484706
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse