Skip to main content

Connect

Open a database connection as a named session.

Command in the Database toolkit · id ooa.database/connect · 18 inputs, no outputs

Inputs​

InputTypeRequiredDefaultWhat it is
Database address (JDBC URL)StringNoJDBC URL, e.g. jdbc:sqlserver://host;databaseName=erp; when empty it is built from database_type and the fields below.
Database typeStringNoKind of database, used to build the URL when jdbc_url is empty. odbc: any ODBC data source on a Windows runner (a DSN name or an ODBC connection string in database); excel: an Excel workbook through the Excel ODBC driver (sheets are tables, e.g. [Sheet1$]).
ServerStringNoDatabase server name or address.
PortNumberNoServer port; the database's usual port when empty.
DatabaseStringNoDatabase name (service name for Oracle; for odbc a DSN name, or a connection string such as Driver={SQL Server};Server=db01;Trusted_Connection=Yes).
FileFileNoDatabase file for SQLite, H2 or Access, or the workbook for excel.
UserStringNoUser name, typed or from the vault.
PasswordCredentialNoPassword from the vault.
SessionStringNodbSession name for later steps.
Driver classStringNoJDBC driver class to load first, for drivers that do not register themselves.
Login timeout (seconds)NumberNo0Give up connecting after this many seconds; 0 uses the driver's default.
PropertiesDictionaryNoExtra driver properties, e.g. {"encrypt": "true"}; Credential values are revealed only to the driver.
Read onlyBooleanNofalseOpen the connection read-only, so the agent cannot change data by mistake: the database enforces it where it can (PostgreSQL, MySQL/MariaDB, Oracle), and otherwise OOA refuses statements that change data.
Auto commitBooleanNotrueSave each statement at once; false starts in a transaction that needs Commit.
InstanceStringNoG2 (AA parity): a named SQL Server instance on the server.
Oracle connectStringNoserviceG2 (AA parity): what database names for Oracle: a service name, a SID, or a TNS alias from tnsnames.ora (its folder in properties as oracle.net.tns_admin).
Agents this one runs may use itBooleanNofalseG2 (AA parity): child agents this one runs may use the connection by its session name.
SecretsDictionaryNoG2 (AA parity): values from the vault for {{name}} places in jdbc_url, e.g. jdbc:sqlserver://db;password={{pwd}}; never logged.