Connect
Open a database connection as a named session.
Command in the Database toolkit · id ooa.database/connect · 18 inputs, no outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Database address (JDBC URL) | String | No | JDBC URL, e.g. jdbc:sqlserver://host;databaseName=erp; when empty it is built from database_type and the fields below. | |
| Database type | String | No | Kind 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$]). | |
| Server | String | No | Database server name or address. | |
| Port | Number | No | Server port; the database's usual port when empty. | |
| Database | String | No | Database name (service name for Oracle; for odbc a DSN name, or a connection string such as Driver={SQL Server};Server=db01;Trusted_Connection=Yes). | |
| File | File | No | Database file for SQLite, H2 or Access, or the workbook for excel. | |
| User | String | No | User name, typed or from the vault. | |
| Password | Credential | No | Password from the vault. | |
| Session | String | No | db | Session name for later steps. |
| Driver class | String | No | JDBC driver class to load first, for drivers that do not register themselves. | |
| Login timeout (seconds) | Number | No | 0 | Give up connecting after this many seconds; 0 uses the driver's default. |
| Properties | Dictionary | No | Extra driver properties, e.g. {"encrypt": "true"}; Credential values are revealed only to the driver. | |
| Read only | Boolean | No | false | Open 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 commit | Boolean | No | true | Save each statement at once; false starts in a transaction that needs Commit. |
| Instance | String | No | G2 (AA parity): a named SQL Server instance on the server. | |
| Oracle connect | String | No | service | G2 (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 it | Boolean | No | false | G2 (AA parity): child agents this one runs may use the connection by its session name. |
| Secrets | Dictionary | No | G2 (AA parity): values from the vault for {{name}} places in jdbc_url, e.g. jdbc:sqlserver://db;password={{pwd}}; never logged. |