Source:
<code>private String buildOracleExportCommand() { String dbConnectionString = config.dbUsername + "/" + config.dbPassword + "@" + config.oracleSID; String colSeparator = getColSeparator(config.format); StringBuilder scriptContent = new StringBuilder(); scriptContent.append("set colsep " + "\"" + colSeparator + "\"" + "\n"); scriptContent.append("set linesize 10000" + "\n"); scriptContent.append("set newpage none" + "\n"); scriptContent.append("set wrap off" + "\n"); scriptContent.append("set pagesize 0" + "\n"); scriptContent.append("set heading off" + "\n"); scriptContent.append("spool on" + "\n"); scriptContent.append(validateQuery(config.queryToExecute) + "\n"); scriptContent.append("spool off" + "\n"); scriptContent.append("exit"); String tmpSqlScriptFile = config.tmpSQLScriptDirectory + "/tmpHydrator.sql"; String setPath = "export ORACLE_HOME=" + config.oracleHome + "; export ORACLE_SID=" + config.oracleSID + ";"; String tmpScriptCreationCommand = "echo '" + scriptContent.toString() + "' > " + tmpSqlScriptFile + ";"; String sqlPlusSpoolExecutionCommand = config.oracleHome + "/bin" + "/sqlplus -s " + dbConnectionString + " @" + tmpSqlScriptFile + " | sed 's/\\s*" + colSeparator + "\\s*/" + colSeparator + "/g';"; String tmpSpoolScriptRemovalCommand = "rm " + tmpSqlScriptFile + ""; <START> return setPath + tmpScriptCreationCommand + sqlPlusSpoolExecutionCommand + tmpSpoolScriptRemovalCommand; <END> }</code><technical_language>please paste example script this generates here? contents of script file command this method generates run script? @wolf31o2 a available</technical_language>

Target:
private String buildOracleExportCommand() { String dbConnectionString = config.dbUsername + "/" + config.dbPassword + "@" + config.oracleSID; String colSeparator = getColSeparator(config.format); StringBuilder scriptContent = new StringBuilder(); scriptContent.append("set colsep " + "\"" + colSeparator + "\"" + "\n"); scriptContent.append("set linesize 32767" + "\n"); scriptContent.append("set newpage none" + "\n"); scriptContent.append("set wrap off" + "\n"); scriptContent.append("set trimspool on" + "\n"); scriptContent.append("set trimout on" + "\n"); scriptContent.append("set pagesize 0" + "\n"); scriptContent.append("set heading off" + "\n"); scriptContent.append("spool on" + "\n"); scriptContent.append(config.queryToExecute + "\n"); scriptContent.append("spool off" + "\n"); scriptContent.append("exit"); String setPath = "export ORACLE_HOME=" + config.oracleHome + "; export ORACLE_SID=" + config.oracleSID + ";"; String tmpScriptCreationCommand = "echo '" + scriptContent.toString() + "' > " + config.tmpSQLScriptFile + ";"; String sqlPlusSpoolExecutionCommand; if (Strings.isNullOrEmpty(config.commandToRun)) { sqlPlusSpoolExecutionCommand = config.oracleHome + "/bin" + "/sqlplus -s " + dbConnectionString + " @" + config.tmpSQLScriptFile; } else { sqlPlusSpoolExecutionCommand = config.commandToRun; } sqlPlusSpoolExecutionCommand += " | sed 's/\\s*" + colSeparator + "\\s*/" + colSeparator + "/g';"; String tmpSpoolScriptRemovalCommand = "rm " + config.tmpSQLScriptFile + ""; return setPath + tmpScriptCreationCommand + sqlPlusSpoolExecutionCommand + tmpSpoolScriptRemovalCommand; }