--- title: "system.db.closeTransaction" description: "Closes the transaction with the given ID." --- # system.db.closeTransaction > Closes the transaction with the given ID. This function is used in **Python Scripting**. ## Description Closes the transaction with the given ID. Note that you must commit or rollback the transaction before you close it. Closing the transaction will return its database connection to the pool. The transaction ID will no longer be valid. ## Client Permission Restrictions [Permission Type](projects\project-properties\project-properties.md#client---permissions): Legacy Database Access 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.closeTransaction(tx)` ### Parameters Type | Parameter | Description ------- | ------- | ------ String | `tx` | The transaction ID. ### Returns Nothing ### Scope All ## Code Examples There are no example available for this function.