C-Sharp code being removed when deploying server to server or Devops to server

  • Good morning smart people,

    I am running into an issue that I have yet to find any resolution to or reason for. We have many SSIS packages and some have c# code in them to perhaps read a sensitive password or to delete files, etc. The issue we run into is we can deploy the project from Visual Studio 2019 just fine however when we deploy from 1 SQL Server to another SQL Server, the c# code removes any variables we have passed in and also removes any of the code we put in. So it looks like this the attached images.c#_1c#_2

    We thought well maybe it was an issue with Visual Studio and we are moving to utilizing Azure Pipelines however, we had the issue there as well. First thing I thought of was possibly our security was blocking something or removing bits of code but we disabled the security on the source and target servers but still had the issue. I tried playing around with the protection level settings but that didn't help either.

    All of our servers are SQL Server 2019 using data tools 15.0.2000.170 because of our oracle connections.

    I don't know if this is an issue with SQL Server 2019 or not because it worked before we had 2019 that I am recalling (it has been a while). Also, the project settings are all set to the target server version of 2019.

    Does anyone have any insight into this?

    Thank you,

    Chris

    Attachments:
    You must be logged in to view attached files.
  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • How - and why - are you deploying from SQL Server to SQL Server?

    Instead of trying to extract from SQL Server using SSMS - build the project in VS - take the .ispac that is generated and use that to deploy to each server.

    This is almost certainly an issue with extracting and loading using SSMS - but should be resolvable by either deploying directly from VS to each instance or using the .ispac that is generated in VS.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Hi Jeff,

    Thank you for your comment. While this gave us an alternative, it didn't solve the problem we had. We know how to do that but the main reason we didn't is we many times work on multiple releases at the same time and until we can get pipelines up and running, it was more of a challenge for us to manage the code that way than to deploy what we have been testing which is on the server currently. Either way, I appreciate the feedback.

    We did however find the solution. The issue was that while our users were set up as a sysadmin or at least had the appropriate sql server permissions, they did not have the same permissions on the actual server. We ended up using a different account that did have permissions to all the folders on the server itself.

    Thanks again for your help!

  • Hello everyone,

    I hope I'm in the right place here. If not, please let me know where I can post this question.

    Here's my question:

    With this call dtsRuntime.Package package = app.LoadPackage(Etl_package, null, false);, I load the package to read all the defined components and the defined variables.

    However, for a component of the ExecutePackageTask type, I can't access the ParameterAssignments.

    When I try to read the defined ParameterAssignment in the component with a foreach loop, it is not found, although parameters are being passed.

    Can anyone give me a tip on how to read the ParameterAssignments or how to add a parameter?

    The very last solution would be to search through the XML of the DTSX package.

  • frank.kress wrote:

    Hello everyone,

    I hope I'm in the right place here. If not, please let me know where I can post this question.

    Here's my question:

    With this call dtsRuntime.Package package = app.LoadPackage(Etl_package, null, false);, I load the package to read all the defined components and the defined variables.

    However, for a component of the ExecutePackageTask type, I can't access the ParameterAssignments.

    When I try to read the defined ParameterAssignment in the component with a foreach loop, it is not found, although parameters are being passed.

    Can anyone give me a tip on how to read the ParameterAssignments or how to add a parameter?

    The very last solution would be to search through the XML of the DTSX package.

    You should raise this as a separate question at the root level of this particular forum (https://www.sqlservercentral.com/forums/forum/data-warehousing/integration-services)

    It would be helpful if you would also mention why you need/want to do this. Is this something which you need to check while the packages of interest are executing?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Thank you Phil

    I remove to the root level of this particular forum.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply