Skip to content

Instantly share code, notes, and snippets.

@jmorenoamor
Last active December 20, 2015 09:49
Show Gist options
  • Save jmorenoamor/6111156 to your computer and use it in GitHub Desktop.
Save jmorenoamor/6111156 to your computer and use it in GitHub Desktop.
SQLPlus setup file
-- -----------------------------------------------------------------------------
-- SQLPlus dump setup file
-- Jesús Moreno Amor <[email protected]>
-- May 2012
--
-- Execute:
-- sqlplus -S user/password@database @DumpSetup.sql RealQuery.sql
-- -----------------------------------------------------------------------------
-- SQLPlus session configuration
SET PAGESIZE 1
SET HEADING OFF
SET LINESIZE 32767
SET TRIMOUT ON
SET COLSEP '|'
SET FEEDBACK OFF
SET ECHO OFF
SET TERMOUT OFF
SET TRIMSPOOL ON
-- Spool to file named as the query
Spool &1..txt
-- Execute the query
@@&1
Spool Off
Exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment