For my requirement I need to write Script task from One SSIS package to another. As my server is 64bit machine, when I execute the overriden SSIS package, it throws the error "Binary Script not found". Hence I need to compile the script programmatically in the Parent SSIS package and put the binary code into the another one. I dont know how to compile the Script programmatically. Let me know how to do that
1
votes
I doubt very much that's what you need to do. Please narrow this problem down, maybe just to the two packages and the script task. Then post the details necessary to reproduce it. It seems unlikely that Microsoft wants you to build the script task.
– John Saunders
Hi John, Thanks for the reply. I have a Master Package and a script in it. Have to write the script to the Child package and save it. Later My server will execute the Child Package. With my 64 bit machine, the child package could not run as there is no binary code. Hence I need to compile the script from the master package and write to the child package together with the script. This is what I need. Is there any option?
– Jaya
What do you mean, you have to write the script to the child package? Do you mean, at runtime? You can't do that. What are you trying to accomplish?
– John Saunders
Hi John, My Scenario is, I have a Master package.In that I have a script Task. This script task will load a package(child), write the script code to the child package and save the package back to its folder.My SQL job will execute the Child package for ETL task. I could write the script from Master package to child and save it. But during execution of Child package, it raise error that pre-compile option is set to True, but binary code script not found. So I want to know how to compile my script source and save source and binary code to the child package.
– Jaya
2 Answers
1
votes
I don't think you can do this with SSIS. If there's a way to accomplish this using a Parent Package / Child Package architecture, I'm unaware of it.
You can get more flexibility creating packages dynamically in .Net. Although I haven't tried to dynamically compile script task code.
I'm curious: Why not copy the code out of the parent package and paste it into a child package?
:{> Andy