parameterizing a sql server connection

  • I am parameterizing an sql server connection.

    There are the following fields:

    • username
    • password
    • servername
    • initialcatalog (db name)
    • connection string.

    The first 4 fields are most of what makes up the connection string.

    In the connection, do i need to parameterize each of these values, or do i just create an expression that builds the connection string from parameters?

    You must be logged in to view attached files.
  • I, personally, tend to use the expressions on properties of the connection manager, rather than the tool you are using there.


    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.

  • But the question still remains, do the properties initialcatalog, username, password & servername overwrite the values in the connection string?

  • I generally parameterise Connection String and Password and set up environment variables to match. That keeps down the number of parameters.

    And yes they do overwrite whatever is in the package.

    But don't parameterise something twice - don't have server name in connection string and parameterise it and then parameterise server name as well. That could confuse it as to which order to apply parameters.

Viewing 4 posts - 1 through 3 (of 3 total)

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