SSIS ProtectionLevel - sql-server

So SSIS 2012 requires all your packages and your project to have the same ProtectionLevel. We have a workflow where we can't store secrets in our packages but configure all our connection strings at runtime. T
The tricky part is debugging these packages in Visual Studio requires you to either exclude all packages you are not working on and manually setting ProtectionLevel on the working packaging and project, or the more cumbersome approach of setting ProtectionLevel on all packages every time. In a project with 20 packages like we have this is a chore. Anybody have any good workflow for debugging SSIS packages while maintining a DoNotSaveSensitive ProtectionLevel?

I would create Project Parameters to store the connection strings:
http://technet.microsoft.com/en-us/library/hh213214.aspx

Are you working in project deployment model?
https://msdn.microsoft.com/en-us/library/hh213290.aspx
It should just work this way.
All packages same level and you set the connection strings in the environment on the server. I deploy mine to prod with localhost connection using Windows auth and the server magically does the rest.

Can you just create a test project with just the package you want to test? Then you don't have to change protection level for each package.

The simple way is to have two projects in Visual Studio: one with DontSaveSensitive and another one with the protection level desired.

Related

Converting 2008 ssis to 2019 - package configuration not working in debug

I have been using XML config files for a long time. I know there are thousands of post on this. Most are not about SSIS VS2019. The ones that I found that do stop at how to setup packages. None explain what happens if it doesn't work. Upgraded all my packages from SSIS 2008 to 2019. Everything converts good except scripts. I setup my package configuration and try to run in debug it is still using the values in the package not the config file. I Also tried running them in Server Agent with the same results. Not sure where I went wrong or if its a SSIS BI issue. Please help, Thank you.
Add a existing 2008 package to my project
Had to rewrite all the scripts by copping the code. Create a new Script task\component. Paste the code in the new script close the window. Ran the project on my local DB. Everything worked.
Click on the packages background and then in the properties window open Configurations collection selected enable configurations.
Add a new configuration. Select values for Initial Catalog, Server Name, StartupDir, InputDir, ArchiveDir. Now points to Dev server and input directories.
Save the configuration.
In the package, I can now right click on the back screen and see Package Configurations as a selection. I open it and package configuration's is enabled and the file is visible.
Close the configuration put a breakpoint in the package.
Click Start, Check the variables in the locals window. They do not have the configured values.
If i let it run it updates my local db not the DEV one.
I ended up having to change the protection level to DontSaveSensitive and changing the target version to 2019. My local server is 2016 so not sure why DEV and Prod are 2019 so if I can debug on 2016 with a 2019 target I'm good with that.
Warning for anyone trying this. After doing this I received a bunch of errors when I tried to open packages with scripts. I had to open the script and close it to rebuild. Then it worked and the massage went away.
And before I forget there's this annoying little message. I just ignored it.
Please try to change SSIS Project/Package(s) ProtectionLevel setting to DontSaveSensitive.
Starting from SSIS 2012 onwards the preferred way is to use Project/Package level parameters instead of XML config files.

SSIS - package works in VS, fails with "Failed to compiled scripts contained in the package". There are no script objects in the package

VS2017, Deploy to SS2016. Package runs without any errors from VS. Project deployment to a server that previously had package deployments only - we're moving to project deployment, and DBAs said to use that.
Getting many errors like:
Get Error Information:Error: Failed to compiled scripts contained in the package. Open the package in SSIS Designer and resolve the compilation errors.
The package has absolutely no script objects. I've checked with the package explorer, and there isn't even a scripts section. To verify, I added an empty script, and then the explorer did show that section.
Other info: Package deployment is new to our DBAs. They are completely mystified by this, and other errors, like:
Get Error Information:Error: CS2001 - Source file 'C:\Windows\TEMP.NETFramework,Version=v4.0.AssemblyAttributes.cs' could not be found, CSC, 0, 0
My opinion, unexpert in SSIS as I am, is that these servers are not set up or configured properly in some way, but I am out of my depth in this, and DBAs are floundering. What might I do to get to the root of this?
I ended up side-stepping the issue by essentially recreating the package. Even XML search revealed no scripts, so the assumption was some kind of corruption. The package was recently upgraded to package-deployment - perhaps that action had a hand in the problem.
We had the same issue and isolated the problem to a Script Task (regardless of language) that existed in a Sequence Container. Placing the Script Task outside the Sequence Container, and upgrading the package to 2016 worked. The package was originally 2012 (as far as I can see) and the server side SSIS was 2016 13.2.5426.0. We were using VS 2017 as well.
For me this was happening because I was targeting the wrong database version. in your SSIS Package project go into properties and set the TargetServerVersion appropriately And then recompile the project and redeploy to sql server.

How to create software .exe file attached it with database which can able to run on different machine?

i have developed application using vb.net for windows system. which have sql server 2008 database and also includes crystal reports. and i want to create .exe of project. For distribution.Then how can i do that. Please help.. I am trying to do this with visual studio 2010.. Using traditional method...
1.Go to File | Add and click New Project.
2.In the Add New Project dialog box, select Other Project 3.Types and choose the Setup And Deployment Projects folder..and so on..till adding project output and primary output.but after clicking on primary output it give message like..The following files may have dependencies that can not be determinited automatically. Please confirm that all dependencies have been added to the project c:\windows\system32 \macromed\flash\flash.ocx.. Please help me to solve this..
Your question and your error arent related.
For your client, you need to install Sql Express.
LocalDB deployment on client PC
For the flash error, you need to check where you are using flash and make sure is also installed.

Visual Studio Published Project Crashing when trying to access Database files

This is the biggest problem I've had with my project so far. Every time I try to publish it, I get hangups and crashes whenever the project tries to access a database file (which is fairly often).
I have two database objects, both created as part of my Visual Studio project under the main solution, as BUILDERDATA.mdf and CHARACTERS.mdf. When I access them during test builds, everything functions just fine. However, they always fail in the published project.
I get the feeling either they're not exporting correctly, or the act of publishing the project is breaking the connection strings, so I'm hoping someone can help me pinpoint the issue.
Under my project settings, I have a connection set up to each database. They're both Connection Strings, their scope is Application, and the value is this:
Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\BUILDERDATA.mdf;Integrated Security=True;Connect Timeout=30
Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\CHARACTERS.mdf;Integrated Security=True;Connect Timeout=30
Under Project Properties -> Publish -> Application Files, both databases and their log files are set to Data File (Auto) for Publish Status, Required for Download Group, and Include for Hash.
Under my Prerequisites, I have SQL Server 2012 Express LocalDB marked, as well as Microsoft .NET Framework 4. Part of my code uses .NET, so that's required anyway, and I included SQL Server Express so it can access the database files. However, 2012 is the newest version available for me to include, so I'm not sure if there's an issue with that version?
If there's anything else you guys would need to see, please let me know. I just want to get this figured out and fixed so I can have my friends start testing my program. :(

How to transfer a ssis package from Dev to Prod?

I'm trying to move my packages to production using a configuration file, but file is changed only partly and the results go still to DEV server.
Does anybody know what to do?
It is difficult to isolate the cause of your issues without access to your configuration files.
What I suggest you do is make use of package configurations that reference a database within your environment. The databases themselves can then be referenced using environment variables that are unique to each environment.
This a brilliant time saver and a good way to centrally manage the configuration of all your SSIS packages. Take a look at the following reference for details.
http://www.mssqltips.com/tip.asp?tip=1405
Once configured, you can deploy the same identical package between dev and production without needing to apply a single modification to the SSIS package or mess around with configuration files.
You could still have hard-coded connections in your package even though you are using a configuration file. You'll need to check every connection as well.
You can also go the long way around. Go into Integration Services and Export the stored package to its dtsx file. Then you can pull open the file in any good text editor, do a find/replace on your server name and then go back into Integration Services and Import the updated package. Alot of times it's just easier...
everybody and thanks for answering. I'd managed to solve this problem in an ugly way - editing packages on server, but I'd like very much more elegant solution - now I'm trying with environment variable,it seems great, but the wizard that I'm getting is different from that is given in link - and I don't know how to continue.(I'm using VStudio 2005) Besides, I tried configuration file as XML, but package run fails even on the source machine, so I'm stuck !
My personal technique has been to first have a single config file that points the package to a SQL Based Package Config (the connection string to the config DB). Subsequent entries in the package config use the SQL store to load their settings. I have a script that goes into the XML of the package and preps them for deployment to stage or prod. A config file holds the name of the Package Configuration's initial file config entry and where the stage and prod configuration db configruation file is located. The script produces two subdirectories for stage and prod. Each directory has a copy of the solution packages modified for their particular deployment.
Also! Don't forget to turn off encryption in the package files!

Resources