Omit newid Guid
Transferring data from one db to another, the source and destination db's have similar schema with rowguid set to yes and newid set to create a new guid on insert. I'd like to transfer the data so that the original guid is preserved. There are about 400
tables i'd have to script changes to to remove the newid default definition and don't want to have to go that route. Can SSIS ignore the setting and use the guid value from the source tables without writing a huge script? Thanks in advance.Enigmatic One
May 4th, 2011 10:29pm
what is your destination? is it sql server? if yes, did you put a trigger on destination table on insert to create a NewID() ?
if not, you may have no problem here,
but if yes, you can't. you should remove the trigger before ETL and add it again after insertion.
http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2011 12:20am
Hi, The source and destination are both sql server. Both have data in the tables just some minor schema differences. The source and destination both have the ability to create a NewID() and do so successfully. I need the destination 'NOT' create a new
id when transferring as I need to preserve the guid in the source to the destination. After the transfer is complete the table(s) should create new id's as always have been on inserts. Please let me know if anyone has a good approach to this one. Thanks.Enigmatic One
May 5th, 2011 8:53am
alter the destination tables by removing default NewID() on uniqueidentifier column - then mapping with source database tables to preserve the data?
http://uk.linkedin.com/in/ramjaddu
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2011 9:41am
@RamJaddu, Yes that is what I'm currently doing through a script. Do you know if there is a way SSIS can 'ignore/omit' the default NewID() during the transfer process? The script is getting quite large as there are over 400 tables I have prepare in this
manner. Thanks.Enigmatic One
May 5th, 2011 10:05am