Disconnect action

Use the Disconnect action in the Database package to disconnect from a database.

Settings

Select any of the following tabs to create a database session:
  • Session name: Enter or select a local or global session name variable.
  • Variable: Enter or create a session variable of subtype Database session.

A record set is returned when you run a stored procedure or a query. To use the record set stored in the memory even if the session is disconnected, select Keep database schema in cache until bot finishes running. By using this option, you can enable the Loop action to iterate the record set by using cached schema after disconnecting from the database.

This capability becomes ineffective in the following conditions:
  • The option Keep database schema in cache until bot finishes running is selected.
  • A new database session is created after the Disconnect action.
  • The name of the session is same as the previous session.

In this scenario, an error occurs stating a session already exists, and the new database session is not created. To avoid this, you can leave the Keep database schema in cache until bot finishes running unchecked.

Note: You cannot delete any files used in a database connection such as xlsx, csv, or mdb. To delete these files, you must not select the Keep database schema in cache until bot finishes running check box to disconnect the session without keeping the connection in the cache.

The Snowflake database using the ODBC driver is supported.