Sqlplus redirect Query results to file, not output to screen

Source: Internet
Author: User
Tags sqlplus

Sqlplus redirects the query results to a file and does not output to the screen:

Save the above SQL to a file, and then execute the file in a CMD window

Sql>@d:\xxx.sql

1 --number of characters per line2 SetLinesize80003 --This parameter sets the number of rows to output per page. N=0 indicates that no new page is generated4 SetPageSize05 --displays and copies the setting of the maximum width of a long type value, maximum value 2G6 Set Long 20000000007 --Sqlplus retrieves the increment size of a long type value. Because memory limits can be retrieved by incremental8 --a project at the time Plsql and Sqldeveloper have obvious network latency problems, sqlplus default is not a problem, after setting this parameter can also cause problems to reproduce9 SetLongchunksize9000000Ten --Settings for Columns One --col username format A4 A --col A format 999,999,999 -  - --The headings (including text and underscores) for each column appear on the resulting report.  the SetHeading on  - --at the end of the query, the record count information for the query results is given. Suppress count feedback from last line - SetFeedbackif  - --whether the command itself is displayed on the screen when the command file is executed + SetEchooff - --controls the display of output generated by a File Execution command + SetTermoutoff A --empty extra spaces, such as: Linesize too long at SetTrimout on - SetTrimspool on - SetTiming on -  - --Production data Commands - spool e:\cott_spool_emp.txt; in SELECT *  fromAttributeinstanceWHEREownerID= 'e9dcbee0-18ea-486f-93c4-ed9ce64e4685'; - --SELECT * from WorkItem where rownum < 5; toSpooloff;

Sqlplus redirect Query results to file, not output to screen

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.