Encrypting Column SSIS
I am writing a SSIS package where on of the source column has to be Encrypted after reading from the source,I have taken this approach. 1. Read from the Source, using a DFT. 2. Inside the DFT create a Script task, use a dll which has the Encrypt and Decrypt Functionality. 3. Pass the coulmn to be encrypted, as read write and then change the column inside the script task, and then populate the destination. Now I have the below Problems. 1. My .dll file is not strongly signed, so i cant see it inside my script task, presume script task in SSIS only allows to add references which are in GAC as i cant see an option to add assembly from location, So is there a way i can use the .dll file, as i cant go back to the party who has developed the .dll file and ask them to strongly sign it such that i can add it to my GAC? 2. Is the approach am taking correct? Encrypting using the Script task. FYI, i had a look at the Encrytpion on the SQL side where i can udpate the column, by encrypting it? but that would involve writing a SP or a SQL task on the SSIS, where i have to mention the Certifacte Name, which wasnt desirable as the package users can see the certificate easily and then see the data on the SQL Server, thats the reason i wanted to take the approach of using the dll. Any suggestions ?Abhinav
March 11th, 2011 11:11pm

You seem to be on the right track. Copy the dll into C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727, I and to C:\Program Files\Microsoft SQL Server\100\DTS\Binn. If does not work also try placing the DLL into the PATH or just right beside the package, too. Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
March 11th, 2011 11:44pm

I think you can get away by creating a wrapper .Net signed DLL to call this 3rd party DLL. In short, the trick is in calling a properly registered DLL which calls another DLL. If it is a COM-type of a DLL you can see this http://msdn.microsoft.com/en-us/library/ms404285.aspx, and if not then (I did not try this particular one) this: high level http://msdn.microsoft.com/en-us/library/26thfadc.aspx details http://blogs.msdn.com/b/jonathanswift/archive/2006/10/02/780637.aspx or even try creating a managed DLL from the unmanaged one: http://www.codeproject.com/KB/cs/win32_to_net.aspx Arthur My Blog
March 11th, 2011 11:46pm

Arthur, Thanks for the reply, I have added the assembly as suggested, to the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727, but now I am getting failed to load assembly error, its not able to load my 3rd party .dll file. Also i created a test app to check if there is some problem with the .dll file, i can easily add it fucntioanly works fine on a seperate Console App, but not working in th SSIS script tasks, Also the link below says that the assembly must be added to the GAC for runtime, any ideas if this can be attained without attaching to the GAC http://msdn.microsoft.com/en-us/library/ms136007.aspx Any pointers Abhinav
Free Windows Admin Tool Kit Click here and download it now
March 11th, 2011 11:56pm

I tried this Trcik Arthur where i was trying to call the .dll i want to use via a CLass library project and strongly sign the new dll file, but it fails telliing me that the .dll i want to use is not strongly signed. FYI my .dll file is a mangaed .dll and not unmanged, there is loads of code on to this so i cant go ahead and copy the code, and then try to recreate whole of the logic. Also the assembly i have is delay signed i.e. it signed by public key and not strongly name, i even triedd stronlgy naming by disassembling the same, and looking to strongly name using my keys, but it fails with manifest corrupt error, It seems like i have to abandon the .dll approach as this requires a strongly named assembly to work with :(, do you think otherwise?Abhinav
March 12th, 2011 12:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics