Skip to main content
Matrix42 Self-Service Help Center

SQL queries limitations in customizations

There are some use cases where you might want to do a direct SQL query to the Production or Archive database. In this case, do not use the connection string directly. It may be changed in the future and then your customization will be broken.

There are some options on how you can achieve the same result without directly referencing the connection string.

  1. Workflow Studio PowerShell activities
    If you need access to the Production database from PowerShell activity, you can use a predefined keyword "m42Store", for instance:
    $connectionString = ([System.Configuration.ConfigurationManager]::ConnectionStrings['m42Store']).ConnectionString
    
      See also, Matrix42 Workflow Studio: General Workflow Activities.
     
  2. Generic Data Import Export with MS SQL source type
    To access the system database from GDIE, enable the "Use application database" option. See also, Create an Import Definition page.
     
  3. History data access
    Avoid using direct queries to a History database and its tables, because in the near future history data will be moved to the new storage, and the history database will be deleted.
     
  4. Avoid using database names directly
    Any system database name can be changed in the future, so it is safer to not use it explicitly.
  • Was this article helpful?