Search code examples
sql-serverssisssis-2012msbi

How to change the Database table name in SSIS through XML configuration file


I can able to change the Database name through the connection string which has been defined in SSIS XML configuration file. But how can i able to change the destination table name through XML configuration file (version used is Data tools 2012). Please advise, thanks in advance.


Solution

  • In XML Configuration file, we are having the option to mark Variables and Properties.

    Variables:

    All the variables we used in our SSIS Package.

    Properties:

    1. Connection String
    2. Description
    3. InitialCatalog
    4. Name
    5. Password
    6. ProtectionLevel
    7. RetainSameConnection
    8. Scope
    9. ServerName
    10. UserName

    enter image description here

    So In Data Flow task, If we use Table or View - fast load then changing destination table name through XML Configuration file is not possible even you select all the options is Properties.

    enter image description here

    Possible Way:

    For achieving this, we can add a variable name as Table name and Pass it to Destination Block. Use Table name or view name variables - fast load instead of Table or View - fast load.

    enter image description here

    Then select the variable name in XML Configuration page. and finish the configuration.

    After doing the above open the Config file in Notepad and check the table in notepad itself. In such case, you can modify the table name in config file itself.

    https://learn.microsoft.com/en-us/sql/integration-services/lesson-1-4-adding-package-configurations

    The above link will help you in case if you need clarification related to XML Configuration.