PLSQL Developer_v7_sqlplus:set head off and set head on
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
Connected as SYS
SQL> ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
Session altered
SQL> EXECUTE DBMS_LOGMNR.START_LOGMNR(STARTTIME => '02-dec-2010 15:22:00', ENDTIME => '02-dec-2010 15:24:00', PTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG +DBMS_LOGMNR.CONTINUOUS_MINE);
PL/SQL procedure successfully completed
SQL> show heading
SQL> set heading on
SQL> show heading
SQL> SELECT SQL_UNDO FROM V$LOGMNR_CONTENTS WHERE SEG_NAME = 'EMP';
SQL_UNDO
--------------------------------------------------------------------------------
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
14 rows selected
SQL> set heading off
SQL> SELECT SQL_UNDO FROM V$LOGMNR_CONTENTS WHERE SEG_NAME = 'EMP';
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7369','SMITH','CLERK','7902',TO_DATE('17-DEC-1980 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'800',NULL,'20');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7499','ALLEN','SALESMAN','7698',TO_DATE('20-FEB-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'1600','300','30');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7521','WARD','SALESMAN','7698',TO_DATE('22-FEB-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'1250','500','30');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7566','JONES','MANAGER','7839',TO_DATE('02-APR-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'2975',NULL,'20');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7654','MARTIN','SALESMAN','7698',TO_DATE('28-SEP-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'1250','1400','30');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7698','BLAKE','MANAGER','7839',TO_DATE('01-MAY-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'2850',NULL,'30');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7782','CLARK','MANAGER','7839',TO_DATE('09-JUN-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'2450',NULL,'10');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7788','SCOTT','ANALYST','7566',TO_DATE('19-APR-1987 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'3000',NULL,'20');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7839','KING','PRESIDENT',NULL,TO_DATE('17-NOV-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'5000',NULL,'10');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7844','TURNER','SALESMAN','7698',TO_DATE('08-SEP-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'1500','0','30');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7876','ADAMS','CLERK','7788',TO_DATE('23-MAY-1987 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'1100',NULL,'20');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7900','JAMES1','CLERK','7698',TO_DATE('03-DEC-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'950',NULL,'30');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7902','FORD','ANALYST','7566',TO_DATE('03-DEC-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'3000',NULL,'20');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7934','MILLER','CLERK','7782',TO_DATE('23-JAN-1982 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'1300',NULL,'10');
14 rows selected
在 PLSQL Developer_v7_sqlplus 中,heading on時,查詢出來的記錄被截斷,
heading off時,查詢出來的記錄是全部的。
這跟cmd_sqlplus 執行相同的命令,結果不一樣。估計是PLSQL Developer_v7_sqlplus的bug???
Connected as SYS
SQL> ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
Session altered
SQL> EXECUTE DBMS_LOGMNR.START_LOGMNR(STARTTIME => '02-dec-2010 15:22:00', ENDTIME => '02-dec-2010 15:24:00', PTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG +DBMS_LOGMNR.CONTINUOUS_MINE);
PL/SQL procedure successfully completed
SQL> show heading
SQL> set heading on
SQL> show heading
SQL> SELECT SQL_UNDO FROM V$LOGMNR_CONTENTS WHERE SEG_NAME = 'EMP';
SQL_UNDO
--------------------------------------------------------------------------------
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","D
14 rows selected
SQL> set heading off
SQL> SELECT SQL_UNDO FROM V$LOGMNR_CONTENTS WHERE SEG_NAME = 'EMP';
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7369','SMITH','CLERK','7902',TO_DATE('17-DEC-1980 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'800',NULL,'20');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7499','ALLEN','SALESMAN','7698',TO_DATE('20-FEB-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'1600','300','30');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7521','WARD','SALESMAN','7698',TO_DATE('22-FEB-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'1250','500','30');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7566','JONES','MANAGER','7839',TO_DATE('02-APR-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'2975',NULL,'20');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7654','MARTIN','SALESMAN','7698',TO_DATE('28-SEP-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'1250','1400','30');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7698','BLAKE','MANAGER','7839',TO_DATE('01-MAY-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'2850',NULL,'30');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7782','CLARK','MANAGER','7839',TO_DATE('09-JUN-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'2450',NULL,'10');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7788','SCOTT','ANALYST','7566',TO_DATE('19-APR-1987 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'3000',NULL,'20');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7839','KING','PRESIDENT',NULL,TO_DATE('17-NOV-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'5000',NULL,'10');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7844','TURNER','SALESMAN','7698',TO_DATE('08-SEP-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'1500','0','30');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7876','ADAMS','CLERK','7788',TO_DATE('23-MAY-1987 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'1100',NULL,'20');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7900','JAMES1','CLERK','7698',TO_DATE('03-DEC-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'950',NULL,'30');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7902','FORD','ANALYST','7566',TO_DATE('03-DEC-1981 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'3000',NULL,'20');
insert into "SCOTT"."EMP"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7934','MILLER','CLERK','7782',TO_DATE('23-JAN-1982 00:00:00', 'DD-MON-YYYY HH24:MI:SS'),'1300',NULL,'10');
14 rows selected
在 PLSQL Developer_v7_sqlplus 中,heading on時,查詢出來的記錄被截斷,
heading off時,查詢出來的記錄是全部的。
這跟cmd_sqlplus 執行相同的命令,結果不一樣。估計是PLSQL Developer_v7_sqlplus的bug???
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/161195/viewspace-680814/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- cmd_sqlplus:set head off and set head onSQL
- nginx獲取真實ip,proxy_set_head怎麼設定頭部資訊Nginx
- Head
- Git HEADGit
- include "head_file" 和 include <head_file>
- [Original] What's HEAD, FETCH_HEAD and ORIG_HEAD in GitGit
- [Bash] Head and TailAI
- Head 外掛使用
- Linux head命令Linux
- HTML <head>標籤HTML
- detached HEAD詳解
- Git HEAD詳解Git
- detached HEAD 詳解
- git reset --hard HEAD^Git
- elasticsearch-head 筆記Elasticsearch筆記
- Head First HTML and CSS (八)HTMLCSS
- Head First Python (一)Python
- HTML head 頭標籤HTML
- HEAD元素de使用 (轉)
- [20120410] sqlplus中set termout off.txtSQL
- Set
- set /?
- lombok get/set 與 JavaBean get/setLombokJavaBean
- Linux基礎命令---headLinux
- git : 修正HEAD detached狀態Git
- Linux head和tail命令LinuxAI
- ElasticSearch安裝Head外掛Elasticsearch
- Head First ,入門首選
- linux 中head tail 命令LinuxAI
- elasticSearch head 查詢報錯Elasticsearch
- SET NEWNAME FOR
- set -e
- Jet Set
- Vue.set與vue.$set的使用Vue
- set pause on,set pagesize N小知識點。
- [Javascript] Perform Set Operations using JavaScript Set MethodsJavaScriptORM
- Linux中head命令例項Linux
- 《Head First 設計模式》:策略模式設計模式