Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: edits/style, verified params with dev


Scripting_function



Panel
titleDescription

Sets the Max Active and Max Idle parameters of a given database connection.


Panel
titleClient Permission Restrictions

Permission Type: Datasource Management

Client access to this scripting function is blocked to users that do not meet the role/zone requirements for the above permission type. This function is unaffected when run in the Gateway scope.


Panel
titleSyntax

system.db.setDatasourceMaxConnections(name, maxConnections)

  • Parameters

String name - The name of the database connection in Ignition.

Integer maxConnections - The new value for Max Active and Max Idle.

  • Returns

Nothing

  • Scope

Gateway, Vision Client, Perspective Session



Panel
titleCode Examples


Code Block
languagepy
titleCode Snippet - Setting the Max Connections of a Data Source
# Set the max connection count for the "MySQL" database to 20.
system.db.setDatasourceMaxConnections("MySQL", 20)



Panel
titleKeywords

system db setDatasourceMaxConnections, db.setDatasourceMaxConnections