воскресенье, 2 февраля 2014 г.

exec sql plus in useful manner

SET NEWPAGE NONE
SET PAGESIZE 0
SET SPACE 0
SET LINESIZE 16000
SET ECHO OFF
SET FEEDBACK OFF
SET VERIFY OFF
SET HEADING OFF
SET TERMOUT OFF
SET TRIMOUT ON
SET TRIMSPOOL ON
SET COLSEP |

spool &1..txt

@@&1

spool off
exit

I then call SQL*Plus passing the actual SQL script I want to run as an argument:

sqlplus -S user/password@database @dump.sql my_real_query.sql

The result is written to a file

    my_real_query.sql.txt

set wrap off 
set linesize 3000   // or something very large

SET ECHO OFF
SET SERVEROUTPUT ON SIZE 1000000
SET PAGESIZE 999
set wrap off
set linesize 3000   // or something very large

1 комментарий:

Обо мне

Моя фотография

grew up in a large family is grateful for what their parents were at Valaam in 14 years as a novice and I dream to go there again in 22 graduated Engineering, now I'm perl,oracle , informatica programmer,
the world is more beautiful than us it shown Internet, Google and the TV!