0

In my Python script, I established the SQL Server DEV connection and I am calling this script in my SSIS package, so now I want to deploy the project on Production server.

Q: How SQL server connection should be changed to Production from Development automatically/dynamically without editing the script manually? Is there a way that it should get/read Production environment?

Please help me out with this, thank you.

Dale K
  • 25,246
  • 15
  • 42
  • 71

1 Answers1

1

sys.argv and pass it as a command line parameter.

Pull it from an environment variable value os.environ

Read from a config file with configparser

Without any sample code, it's hard to say what the right approach should be but I would favor a command line parameter as that allows you to provide the value from the SSIS package (instead of defining configurations in both SSIS space and python space)

billinkc
  • 59,250
  • 9
  • 102
  • 159