Use spool tool to export oracle Text Data

Source: Internet
Author: User
Tags spl


Use spool tool to export oracle Text data 1. win next batch processing scheduling file data_spool.bat [SQL] F: \ oracle \ product \ 10.2.0 \ db_1 \ BIN \ sqlplus tax/tax @ orcl @ D: \ PDM_ SQL \ spool \ spool_ctl.spl> D: \ PDM_ SQL \ spool \ spool_info.log www.2cto.com 2. Text export structure control file spool_ctl.spl [SQL] set trimspool on set term off set feedback off set pagesize 0 set line 32767 ---- personnel information @ D: \ PDM_ SQL \ spool \ select \ tb_pep_insur_info.select; ---- insurance information @ D: \ PDM_ SQL \ spool \ select \ tb_pep_inf O. select; exit 3. Export location and select query file tb_pep_info.select [SQL] ---- Population Information spool D: \ PDM_ SQL \ spool \ out_data \ tb_pep_info.txt SELECT sfzhm | '| xm |' | zym | '| mz_cd |' | | xb_cd | '| csny |' | whcd_cd | '| zzmm_cd |' | lxdh | '| | rylx_cd | '| hjxxdz |' | xjzddz | '| data_dt FROM tb_pep_info; spool off tb_pep_insur_info.select [SQL] www.2cto.com ---- insurance information spool D: \ PDM_ SQL \ spool \ out_data \ tb _ Pep_insur_info.txt select sfzhm | '| xm |' | cblx_cd | '| cbrq |' | jflx_cd |' | jfje | '| ybsblx_cd |' | jfrq FROM tb_pep_insur_info; spool off 4. Description (1). The article that records this spool process does not mean that it is difficult or complex, but that it is convenient for future search. (2) "set line 32767", where 32767 is the maximum value that can be set. When the set data is greater than 32767, the length displayed on each line will become more than 80 by default; this is tested in win, and may be different in other systems. (3) You can use the method described in this article to set a structure control parameter and export multiple tables. (4) "sqlplus tax/tax @ orcl @ D: \ PDM_ SQL \ spool \ spool_ctl.spl" has always been a misunderstanding, I always think that there is a @ followed by the connection name and it cannot be reused with the @ followed by the script file; in fact, oracle is not that low-level. (5) In pl/SQL tools, you can left-click the table or view to pull it to the SQL statement editing area and select "select" to obtain query statements for some tables, replace "| '|" with a comma, which is convenient, fast, and practical.
 

Related Article

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.