Update connection strings

Use the procedure below to modify (overwrite) connection strings for the project data sources. Connection strings include: Data source type, server name, and credentials for the server.

For example, you may need this procedure to upgrade your analytical project to a newer Insight version and change connection strings to the databases at the same time. You can specify connection strings directly in the dedicated XML file and they will be applied immediately after the silent installation completes. Otherwise, you may change connection strings manually after installation.

Insight supports two type of data sources: with a single connection and with multiple connections.

Important Using this feature you cannot change a data source with a single connection to a data source with multiple connections. That means, if you specify several connections to a data source in the file, while originally this data source was configured to a single connection, only the first connection is used, and the rest are discarded.

The list of data sources that can be updated:

  1. Connections in Admin Console.
  2. Data sources in Admin Console.
  3. Meta database for the project.
  4. Data database for the project.

Define the settings in the XML file

  1. Create an XML file.
  2. Add and modify the following settings in the file:
    1. To update connections in Admin Console:
      For data sources with a single connection
      
      <settings>
        <document name="Connection1" category="Connection">
          <connection databaseTypeName="MS SQL Server" providerName="sql" connectionString="Data Source=myservername;Initial Catalog= Connection1;User Id={your user id};Password={your password};" />
        </document>
      </settings>
      
      For data sources with multiple connections
      
      <settings>
        <document name="MultipleConnection1" category="Connection">
         <connections>
           <connection keyQuery="" keyValue="" databaseTypeName="MS SQL Server" providerName="sql" connectionString="Data Source=myservername;Initial Catalog=MyDBName; User Id=
      {your user id};Password={your password};" />
            <connection keyQuery="" keyValue="" databaseTypeName="MySql 5" providerName="cn" connectionString="Server=myservername; Database=MyDBName; Uid={your user id}; Pwd={your password};" /> 
      	 <connection keyQuery="" keyValue="" databaseTypeName="Oracle" providerName="odp" connectionString="Data Source=MyDBNAME;User Id=myUsername;Password=myPassword;" />
         </connections>
        </document>
      </settings>
      
    2. To update data sources in Admin Console:
      For data sources with a single connection
      
      <settings>
        <document name="Datasource1" category="DataSource">
          <connection databaseTypeName="MS SQL Server" providerName="sql" connectionString="Data Source=myservername;Initial Catalog= Connection1;User Id={your user id};Password={your password};" />
        </document>
      </settings>
      For data sources with multiple connections
      
      <settings>
       <document name="DatasourceName1" category="DataSource">
           <connections>
              <connection keyQuery="Select [EmployeeID] from Employees where [EmployeeID]=1" keyValue="" databaseTypeName="MS SQL Server" providerName="sql" connectionString="Data Source=ru01vmalt10;Initial Catalog=Northwind; User Id=sa;Password=K00fax;" />
              <connection keyQuery="Select EmployeeID from Employees where EmployeeID='2'" keyValue="" databaseTypeName="MySql 5" providerName="cn" connectionString="Server=ru01vmaltdbs; Database=Northwind; Uid=sa; Pwd=123;" /> 
             <connection keyQuery="Select &quot;EmployeeID&quot; from &quot;Employees&quot; where &quot;EmployeeID&quot;=3" keyValue="" databaseTypeName="Oracle" providerName="odp" connectionString="Data Source=TORCL;User Id=myUsername;Password=myPassword;" />
           </connections>
         </document>
      </settings>
      
    3. To update a Meta database:
      <settings>
         <metaConnection> 
           <connection databaseTypeName="MS SQL Server" providerName="sql" connectionString="Data Source=MyDataSourceName;Initial Catalog=MyProjectName_meta; User Id= {your user id};Password= {your password}" />
         </metaConnection>
      </settings>
      
    4. To update a Data database:
      <settings>
        <document category="DataSource" isDataDb="true" >
          <connection databaseTypeName="MS SQL Server" providerName="sql" connectionString="Data Source= MyDataSourceName;Initial Catalog= MyProjectName _data; User Id= {your user id};Password= {your password}" />
        </document>
      </settings>
      
  3. Save the file.

Apply the settings

To apply the connection strings, follow the procedure below.

  1. Open the command prompt or open the batch file created for the silent installation. See the Kofax Insight Installation Guide for more information.
  2. Run the following command or add it to the batch file.
    Altosoft.Insight.ImportExport.EntryPoint.exe -import -projectName="MyProjectName" -login="Administrator" -pwd="MyPassword" -settingsPath="C:\Altosoft Silent Install\Settings\<SETTINGS FILE NAME>.xml"