SMTP Connection Manager

  • Hi,

    Within my SSIS packages, I currently have a various connection managers. One constant CM is a SMTP connection manager that references a network exchange server. This currently works fine but I am thinking about creating a configuration table/file within SQL Server 2005 that would contain references to this and other server names as well as folder locations etc, in case these values change in the future. Therefore I would be able to change these without having to alter each package.

    Within the SMTP Connection Manager, I have tried to enter the package variable '@[User::SMTPServer]' that contains the current server name but the package fails. Is it possible to do this using a variable?

    If so, can this be applied to other types of connection manager.

    Thanks in advance,

  • Hi,

    Yes, you can do this . You have to setup SSIS expression, which modifies the SMTP connection manager properties. Here is how to do it:

    1. Right-click on the SMTP connection manager and select Properties.

    2. Scroll-down and find ConnectionString property. This is the property that you have to dynamically modify. Check step 3 what to do next.

    3. Scroll-down and find Expressions. This is where you setup your dynamic expression.

    4. Open the Expressions editor (...) and select ConnectionString property.

    5. Setup the dynamic expression which modifies the property based on your variable.

    Voila! Use similar approach to modify dynamically other SSIS connection managers.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • Brilliant!! I'll try this out.

    Thanks a million

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

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