how to access the package level variables within a script component in SSIS 2008
View Complete Post
it is possible to start ssis packages with dtexec and set variables as package configuration like this:
dtexec.exe /SQL "\mart1\import_fact_calls" /SERVER "R08" /SET \package.variables[FullImport].Value;True
Now I'm trying to start a package via script task with this code:
Public Sub Main()
Dim pkg As New Package
Dim app As New Application
Dim pkgResults As DTSExecResult
If Dts.Variables("package").Value <> "" Then
pkg = app.LoadFromSqlServer(Dts.Variables("package").Value, "R08", "USER", "PASS", Nothing)
pkgResults = pkg.Execute()
Dts.TaskResult = ScriptResults.Success
How can I add a package configuration like the one with dtexec to the script code?
I like any ideas, links, docus ... Thanks!
I am trying to use a custom assembly (compiled with VS 2005 framework 2.0) with SSIS 2008. I understand that I need to put this Assembly in the GAC. I initially attempted to do this using the GACUtil, but I apparently only have version 1.1
of GACUtil intalled on my development PC. Shouldn't version 2.0 have been installed as part of VS 2005?
So I then tried simply copying the dll into the GAC folder using windows explorer. Well, the dll is now visibly in the GAC folder, but I cannot see it from either VS 2005 or BIDS 2008. Does that mean I do need to use GACUtil 2.0 or higher to
install the DLL into the GAC? If so, is there any place on the Web that I can download it?
I have the requirement like read all the Variables in
Script Component Task, which includes variables available at package level and their values, global variables declared at package.
Currently are two ways to read the variables but which are not suitable for my requirement
1) Mentioning the variables at Script designer window as ReadOnlyVariables or ReadWriteVariables
after installing SP2 instance starts and stops with error:
Script level upgrade for database 'master' failed because upgrade step 'sqlagent100_msdb_upgrade.sql' encountered error 5831, state 1, severity 16. This is a serious error condition which might interfere with regular operation and the database will be taken
offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that
the script upgrade steps run to completion.
Already tried without success:
- enabled SA account (was disabled)
- uninstalled SP2 -> other error, but same problems with running the script
I have a question relating to the variables in SSIS.
I have an existing etl package with data flow components. One of the column is System_id to identify the Source System, the package is pulling the data from. I plan to create a component which will validate the data based on the Rules stored in the
database. These rules will be accessed based on the System_id + Target combination which needs to be set by the user at design time when the component is dropped.
In design time, i want to access this System_id field for the Custom data flow component so that i can access the database table and display the available Targets for this System_id which the user can set so that i can run the rules against this data.
I understand that i cannot access the value of the data flow at design time. My question is there other way, where i can set the variable value and access it at design time ?
Please let me know
I am trying to develop a SSIS package which will read the records from the flat file and insert them into a destination table. I have some validations written in script component. I have declared two Read Write variables with package level scope. when i try to assign a value to the variable in the script component and run the package, the package throws me an error "The collection of variables locked for read and write access is not available outside of PostExecute".
What should be done to over come the problem please help me on this regard
In my Data Flow, I am sending errors to a Script Component.
How can I access the error Description and Code in the following override to do row by row error handling?