使用以下设置进行假脱机时,输出将在新行中断开,因此列中的所有数据都不会进入文件。
SET NULL 'NULL'
set serveroutput on size unlimited
set termout off
set long 1000000000 longc 60000
SET MARKUP HTML ON SPOOL ON
SET LINESIZE 15000
SET FEEDBACK OFF
SET TRIMS OFF
SET NUMWIDTH 50
SET AUTOCOMMIT OFF
SPOOL logs.html
select * from some_table;
spool off
我尝试了一个选择查询,其中包含一列似乎是多行的日志,因此当我进行假脱机时,只有第一行进入输出而其余部分被截断。我试图设置多个选项,如非常大的线条大小等但没有帮助。
同样的查询在SQL Developer中工作正常,我可以看到所有的行。
存储在列中的示例数据:
"SQL exception: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
for query:
WITH org_list AS (
SELECT TRIM(SUBSTR (txt, INSTR (txt, ',', 1, level ) + 1, INSTR (txt, ',', 1, level+1) - INSTR (txt, ',', 1, level) -1)) as org_id
FROM ( select ','||:1||',' as TXT from dual )
CONNECT BY level <= LENGTH(txt)-LENGTH(REPLACE(txt,',',''))-1
)
SELECT DISTINCT fdo.user_id
, fdo.user_name
, (SELECT FIRST_NAME || ' ' || LAST_NAME
FROM SI_USERS WHERE USER_ID = fdo.user_id) USER_FULL_NAME
, NULL "fdo.role_id"
, NULL "fdo.role_name"
, NULL "fdo.activity_id"
, NULL "fdo.activity_short_name"
, fdo.activity_name
FROM org_flow_qm_v fdo
目前,SQL * Plus假脱机只在列中显示一行:
SQL exception: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended
如何在假脱机文件中获取完整的日志/数据?