1"use strict";(self.webpackChunkshaft_user_guide=self.webpackChunkshaft_user_guide||[]).push([["11781"],{20184(e,n,s){s.r(n),s.d(n,{metadata:()=>r,default:()=>h,frontMatter:()=>t,contentTitle:()=>c,toc:()=>d,assets:()=>l});var r=JSON.parse('{"id":"reference/actions/DB/Connection_Strings","title":"Database Connection Strings","description":"JDBC connection string examples for MySQL, PostgreSQL, SQL Server, Oracle, and other databases with SHAFT Engine.","source":"@site/docs/reference/actions/DB/Connection_Strings.md","sourceDirName":"reference/actions/DB","slug":"/reference/actions/DB/Connection_Strings","permalink":"/docs/reference/actions/DB/Connection_Strings","draft":false,"unlisted":false,"editUrl":"https://github.com/ShaftHQ/shafthq.github.io/blob/master/docs/reference/actions/DB/Connection_Strings.md","tags":[{"inline":true,"label":"database","permalink":"/docs/tags/database"},{"inline":true,"label":"jdbc","permalink":"/docs/tags/jdbc"},{"inline":true,"label":"connection","permalink":"/docs/tags/connection"}],"version":"current","lastUpdatedAt":1790975565000,"frontMatter":{"id":"Connection_Strings","title":"Database Connection Strings","sidebar_label":"Connection Strings","description":"JDBC connection string examples for MySQL, PostgreSQL, SQL Server, Oracle, and other databases with SHAFT Engine.","keywords":["SHAFT","database","connection string","JDBC","MySQL","PostgreSQL","SQL Server","Oracle"],"tags":["database","jdbc","connection"]},"sidebar":"docs","previous":{"title":"Terminal","permalink":"/docs/reference/actions/CLI/Terminal_Actions"},"next":{"title":"Database Actions","permalink":"/docs/reference/actions/DB/DB_Actions"}}'),a=s(74848),i=s(28453);let t={id:"Connection_Strings",title:"Database Connection Strings",sidebar_label:"Connection Strings",description:"JDBC connection string examples for MySQL, PostgreSQL, SQL Server, Oracle, and other databases with SHAFT Engine.",keywords:["SHAFT","database","connection string","JDBC","MySQL","PostgreSQL","SQL Server","Oracle"],tags:["database","jdbc","connection"]},c,l={},d=[{value:"JDBC Connection Strings",id:"jdbc-connection-strings",level:2},{value:"Standard Connection String Patterns",id:"standard-connection-string-patterns",level:2},{value:"MySQL",id:"mysql",level:3},{value:"Basic Connection",id:"basic-connection",level:4},{value:"With SSL",id:"with-ssl",level:4},{value:"With Additional Parameters",id:"with-additional-parameters",level:4},{value:"PostgreSQL",id:"postgresql",level:3},{value:"Basic Connection",id:"basic-connection-1",level:4},{value:"With SSL",id:"with-ssl-1",level:4},{value:"With Schema",id:"with-schema",level:4},{value:"Oracle",id:"oracle",level:3},{value:"Basic Connection (SID)",id:"basic-connection-sid",level:4},{value:"Service Name",id:"service-name",level:4},{value:"TNS Names",id:"tns-names",level:4},{value:"Microsoft SQL Server",id:"microsoft-sql-server",level:3},{value:"Basic Connection",id:"basic-connection-2",level:4},{value:"Windows Authentication",id:"windows-authentication",level:4},{value:"With Encryption",id:"with-encryption",level:4},{value:"MariaDB",id:"mariadb",level:3},{value:"Basic Connection",id:"basic-connection-3",level:4},{value:"SQLite",id:"sqlite",level:3},{value:"Basic Connection",id:"basic-connection-4",level:4},{value:"In-Memory Database",id:"in-memory-database",level:4},{value:"IBM DB2",id:"ibm-db2",level:3},{value:"Basic Connection",id:"basic-connection-5",level:4},{value:"Custom Connection String Patterns",id:"custom-connection-string-patterns",level:2},{value:"Using Properties File",id:"using-properties-file",level:3},{value:"Environment Variables",id:"environment-variables",level:3},{value:"Connection String Builder",id:"connection-string-builder",level:3},{value:"Multiple Database Connections",id:"multiple-database-connections",level:3},{value:"Connection Parameters Reference",id:"connection-parameters-reference",level:2},{value:"Common JDBC Parameters",id:"common-jdbc-parameters",level:3},{value:"Combining Multiple Parameters",id:"combining-multiple-parameters",level:3},{value:"Best Practices",id:"best-practices",level:2},{value:"Security",id:"security",level:3},{value:"Connection Management",id:"connection-management",level:3},{value:"Configuration",id:"configuration",level:3},{value:"Related",id:"related",level:2}];function o(e){let n={a:"a",code:"code",div:"div",h2:"h2",h3:"h3",h4:"h4",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h2,{id:"jdbc-connection-strings",children:"JDBC Connection Strings"}),"\n",(0,a.jsx)(n.p,{children:"SHAFT uses JDBC (Java Database Connectivity) to connect to various databases. Each database type requires a specific connection string format."}),"\n",(0,a.jsx)(n.h2,{id:"standard-connection-string-patterns",children:"Standard Connection String Patterns"}),"\n",(0,a.jsx)(n.h3,{id:"mysql",children:"MySQL"}),"\n",(0,a.jsx)(n.p,{children:"MySQL is a popular open-source relational database."}),"\n",(0,a.jsx)(n.h4,{id:"basic-connection",children:"Basic Connection"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:mysql://localhost:3306/database_name",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.h4,{id:"with-ssl",children:"With SSL"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:mysql://localhost:3306/database_name?useSSL=true&requireSSL=true",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.h4,{id:"with-additional-parameters",children:"With Additional Parameters"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:mysql://localhost:3306/database_name?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Connection String Pattern:"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"jdbc:mysql://[host]:[port]/[database]?[parameters]\n"})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Default Port:"})," 3306"]}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.h3,{id:"postgresql",children:"PostgreSQL"}),"\n",(0,a.jsx)(n.p,{children:"PostgreSQL is a powerful open-source object-relational database."}),"\n",(0,a.jsx)(n.h4,{id:"basic-connection-1",children:"Basic Connection"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:postgresql://localhost:5432/database_name",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.h4,{id:"with-ssl-1",children:"With SSL"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:postgresql://localhost:5432/database_name?ssl=true&sslmode=require",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.h4,{id:"with-schema",children:"With Schema"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:postgresql://localhost:5432/database_name?currentSchema=myschema",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Connection String Pattern:"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"jdbc:postgresql://[host]:[port]/[database]?[parameters]\n"})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Default Port:"})," 5432"]}
1),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.h3,{id:"oracle",children:"Oracle"}),"\n",(0,a.jsx)(n.p,{children:"Oracle Database is a multi-model database management system."}),"\n",(0,a.jsx)(n.h4,{id:"basic-connection-sid",children:"Basic Connection (SID)"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:oracle:thin:@localhost:1521:ORCL",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.h4,{id:"service-name",children:"Service Name"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:oracle:thin:@//localhost:1521/service_name",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.h4,{id:"tns-names",children:"TNS Names"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL)))",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Connection String Patterns:"})}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"SID:"})," ",(0,a.jsx)(n.code,{children:"jdbc:oracle:thin:@[host]:[port]:[SID]"})]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Service Name:"})," ",(0,a.jsx)(n.code,{children:"jdbc:oracle:thin:@//[host]:[port]/[service_name]"})]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Default Port:"})," 1521"]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Note:"})," Oracle JDBC driver requires additional setup. See ",(0,a.jsx)(n.a,{href:"/docs/reference/actions/DB/Oracle_JDBC_Setup",children:"Oracle JDBC Setup"})," for detailed instructions."]}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.h3,{id:"microsoft-sql-server",children:"Microsoft SQL Server"}),"\n",(0,a.jsx)(n.p,{children:"Microsoft SQL Server is a relational database management system."}),"\n",(0,a.jsx)(n.h4,{id:"basic-connection-2",children:"Basic Connection"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:sqlserver://localhost:1433;databaseName=database_name",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.h4,{id:"windows-authentication",children:"Windows Authentication"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:sqlserver://localhost:1433;databaseName=database_name;integratedSecurity=true",\n "",\n ""\n);\n'})}),"\n",(0,a.jsx)(n.h4,{id:"with-encryption",children:"With Encryption"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:sqlserver://localhost:1433;databaseName=database_name;encrypt=true;trustServerCertificate=false",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Connection String Pattern:"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"jdbc:sqlserver://[host]:[port];databaseName=[database];[parameters]\n"})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Default Port:"})," 1433"]}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.h3,{id:"mariadb",children:"MariaDB"}),"\n",(0,a.jsx)(n.p,{children:"MariaDB is a community-developed fork of MySQL."}),"\n",(0,a.jsx)(n.h4,{id:"basic-connection-3",children:"Basic Connection"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:mariadb://localhost:3306/database_name",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Connection String Pattern:"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"jdbc:mariadb://[host]:[port]/[database]?[parameters]\n"})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Default Port:"})," 3306"]}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.h3,{id:"sqlite",children:"SQLite"}),"\n",(0,a.jsx)(n.p,{children:"SQLite is a lightweight, file-based database."}),"\n",(0,a.jsx)(n.h4,{id:"basic-connection-4",children:"Basic Connection"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:sqlite:/path/to/database.db",\n "",\n ""\n);\n'})}),"\n",(0,a.jsx)(n.h4,{id:"in-memory-database",children:"In-Memory Database"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:sqlite::memory:",\n "",\n ""\n);\n'})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Connection String Pattern:"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"jdbc:sqlite:[path_to_database_file]\n"})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Note:"})," SQLite doesn't require username and password."]}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.h3,{id:"ibm-db2",children:"IBM DB2"}),"\n",(0,a.jsx)(n.p,{children:"IBM DB2 is a family of data management products."}),"\n",(0,a.jsx)(n.h4,{id:"basic-connection-5",children:"Basic Connection"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:db2://localhost:50000/database_name",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.strong,{children:"Connection String Pattern:"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"jdbc:db2://[host]:[port]/[database]\n"})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Default Port:"})," 50000"]}),"\n",(0,a.jsx)(n.hr,{}),"\n",(0,a.jsx)(n.h2,{id:"custom-connection-string-patterns",children:"Custom Connection String Patterns"}),"\n",(0,a.jsx)(n.h3,{id:"using-properties-file",children:"Using Properties File"}),"\n",(0,a.jsx)(n.p,{children:"You can externalize connection strings using SHAFT properties:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-properties",children:"# shaft.properties\ndb.url=jdbc:mysql://localhost:3306/mydb\ndb.username=testuser\ndb.password=testpass\n"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'String dbUrl = System.getProperty("db.url");\nString dbUser = System.getProperty("db.username");\nString dbPass = System.getProperty("db.password");\n\nSHAFT.DB db = new SHAFT.DB(dbUrl, dbUser, dbPass);\n'})}),"\n",(0,a.jsx)(n.h3,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,a.jsx)(n.p,{children:"Using environment variables for sensitive data:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'String dbUrl = System.getenv("DB_URL");\nString dbUser = System.getenv("DB_USERNAME");\nString dbPass = System.getenv("DB_PASSWORD");\n\nSHAFT.DB db = new SHAFT.DB(dbUrl, dbUser, dbPass);\n'})}),"\n",(0,a.jsx)(n.h3,{id:"connection-string-builder",children:"Connection String Builder"}),"\n",(0,a.jsx)(n.p,{children:"Create a helper method for building connection strings:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'public class DBHelper {\n public static String buildConnectionString(\n String dbType,\n String host,\n int port,\n String database\n ) {\n switch (dbType.toLowerCase()) {\n case "mysql":\n return String.format("jdbc:mysql://%s:%d/%s", host, port, database);\n case "postgresql":\n return String.format("jdbc:postgresql://%s:%d/%s", host, port, database);\n case "oracle":\n return String.format("jdbc:oracle:thin:@//%s:%d/%s", host, port, database);\n case "sqlserver":\n return String.format("jdbc:sqlserver:
1//%s:%d;databaseName=%s", host, port, database);\n default:\n throw new IllegalArgumentException("Unsupported database type: " + dbType);\n }\n }\n}\n\n// Usage\nString connectionString = DBHelper.buildConnectionString("mysql", "localhost", 3306, "mydb");\nSHAFT.DB db = new SHAFT.DB(connectionString, "user", "pass");\n'})}),"\n",(0,a.jsx)(n.h3,{id:"multiple-database-connections",children:"Multiple Database Connections"}),"\n",(0,a.jsx)(n.p,{children:"Managing multiple database connections in your tests:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'// Source database\nSHAFT.DB sourceDb = new SHAFT.DB(\n "jdbc:mysql://source-host:3306/source_db",\n "source_user",\n "source_pass"\n);\n\n// Target database\nSHAFT.DB targetDb = new SHAFT.DB(\n "jdbc:postgresql://target-host:5432/target_db",\n "target_user",\n "target_pass"\n);\n\n// Perform operations\nResultSet sourceData = sourceDb.executeSelectQuery("SELECT * FROM products");\n// ... process and insert into target ...\n\nsourceDb.closeConnection();\ntargetDb.closeConnection();\n'})}),"\n",(0,a.jsx)(n.h2,{id:"connection-parameters-reference",children:"Connection Parameters Reference"}),"\n",(0,a.jsx)(n.h3,{id:"common-jdbc-parameters",children:"Common JDBC Parameters"}),"\n",(0,a.jsx)(n.div,{className:"table-scroll",role:"region",tabIndex:"0","aria-label":"Common JDBC Parameters",children:(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{children:"Parameter"}),(0,a.jsx)(n.th,{children:"Description"}),(0,a.jsx)(n.th,{children:"Example"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:(0,a.jsx)(n.code,{children:"useSSL"})}),(0,a.jsx)(n.td,{children:"Enable SSL connection"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.code,{children:"?useSSL=true"})})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:(0,a.jsx)(n.code,{children:"serverTimezone"})}),(0,a.jsx)(n.td,{children:"Set server timezone"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.code,{children:"?serverTimezone=UTC"})})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:(0,a.jsx)(n.code,{children:"characterEncoding"})}),(0,a.jsx)(n.td,{children:"Character encoding"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.code,{children:"?characterEncoding=UTF-8"})})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:(0,a.jsx)(n.code,{children:"autoReconnect"})}),(0,a.jsx)(n.td,{children:"Auto reconnect on connection loss"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.code,{children:"?autoReconnect=true"})})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:(0,a.jsx)(n.code,{children:"maxReconnects"})}),(0,a.jsx)(n.td,{children:"Maximum reconnection attempts"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.code,{children:"?maxReconnects=3"})})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{children:(0,a.jsx)(n.code,{children:"connectTimeout"})}),(0,a.jsx)(n.td,{children:"Connection timeout in milliseconds"}),(0,a.jsx)(n.td,{children:(0,a.jsx)(n.code,{children:"?connectTimeout=30000"})})]})]})]})}),"\n",(0,a.jsx)(n.h3,{id:"combining-multiple-parameters",children:"Combining Multiple Parameters"}),"\n",(0,a.jsxs)(n.p,{children:["Multiple parameters are separated by ",(0,a.jsx)(n.code,{children:"&"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-java",children:'SHAFT.DB db = new SHAFT.DB(\n "jdbc:mysql://localhost:3306/mydb?useSSL=true&serverTimezone=UTC&characterEncoding=UTF-8",\n "username",\n "password"\n);\n'})}),"\n",(0,a.jsx)(n.h2,{id:"best-practices",children:"Best Practices"}),"\n",(0,a.jsx)(n.h3,{id:"security",children:"Security"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Never hardcode credentials"})," in your test code"]}),"\n",(0,a.jsx)(n.li,{children:"Use environment variables or secure vaults for sensitive data"}),"\n",(0,a.jsx)(n.li,{children:"Use SSL/TLS connections when available"}),"\n",(0,a.jsx)(n.li,{children:"Implement least privilege access for test database users"}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"connection-management",children:"Connection Management"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Always close connections after use"}),"\n",(0,a.jsx)(n.li,{children:"Use try-with-resources for automatic connection management"}),"\n",(0,a.jsx)(n.li,{children:"Consider connection pooling for performance-intensive tests"}),"\n",(0,a.jsx)(n.li,{children:"Set appropriate timeout values"}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"configuration",children:"Configuration"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Exter
1nalize connection strings using properties files"}),"\n",(0,a.jsx)(n.li,{children:"Use different configurations for different environments (dev, test, prod)"}),"\n",(0,a.jsx)(n.li,{children:"Document required JDBC drivers and their versions"}),"\n",(0,a.jsx)(n.li,{children:"Keep JDBC drivers up to date for security and bug fixes"}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"related",children:"Related"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/docs/reference/actions/DB/DB_Actions",children:"DB Actions"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/docs/reference/actions/DB/Oracle_JDBC_Setup",children:"Oracle Jdbc Setup"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/docs/testing/database",children:"Database"})}),"\n"]})]})}function h(e={}){let{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(o,{...e})}):o(e)}},28453(e,n,s){s.d(n,{R:()=>t,x:()=>c});var r=s(96540);let a={},i=r.createContext(a);function t(e){let n=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:t(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.