Skip to main content
Version: 8.1

system.db.setDatasourceMaxConnections

This function is used in Python Scripting.

Description​

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

Client 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.

Syntax​

system.db.setDatasourceMaxConnections(name, maxConnections)

Parameters​

TypeParameterDescription
StringnameThe name of the database connection in Ignition.
IntegermaxConnectionsSets the Max Active and Max Idle parameters of a given database connection.

Returns​

Nothing

Scope​

Gateway, Vision Client, Perspective Session

Code Examples​

Code Snippet - Setting the Max Connections of a Data Source
# Example 1: Enable a connection
system.db.setDatasourceMaxConnections("MySQL", 20)

Keywords​

system db setDatasourceMaxConnections, db.setDatasourceMaxConnections