[20180628]顯示bbed x命令格式.txt
[20180628]顯示bbed x命令格式.txt
--//測試經常使用bbed x命令顯示資料,裡面的格式每次輸入必須顯示錶結構才方便輸入.
--//如果欄位很多非常麻煩,寫一個指令碼完成這個工作.
--//這個是我以前寫的,12c已經淘汰wmsys.wm_concat,要使用listagg代替.
prompt
PROMPT DISPLAY BBED EXAMINE(X) FORMAT
prompt
SELECT REPLACE (wmsys.wm_concat (c1), ',') c80
FROM ( SELECT data_type
,column_name
,DECODE
(
data_type
,'NUMBER', 'n'
,'CHAR', 'c'
,'VARCHAR', 'c'
,'VARCHAR2', 'c'
,'DATE', 't'
,' '
)
c1
FROM dba_tab_cols
WHERE owner = UPPER(nvl('&1',user)) AND TABLE_NAME = UPPER( '&2')
ORDER BY column_id);
---//改寫如下,做一個記錄:
prompt
PROMPT DISPLAY BBED EXAMINE(X) FORMAT
prompt
SELECT REPLACE (LISTAGG (c1, ',') WITHIN GROUP (ORDER BY column_id), ',') c80
FROM ( SELECT data_type
,column_id
,column_name
,DECODE
(
data_type
,'NUMBER', 'n'
,'CHAR', 'c'
,'VARCHAR', 'c'
,'VARCHAR2', 'c'
,'DATE', 't'
,' '
)
c1
FROM dba_tab_cols
WHERE owner = UPPER (NVL ('&1', USER))
AND TABLE_NAME = UPPER ('&2')
AND hidden_column = 'NO'
ORDER BY column_id);
SCOTT@test01p> @ bbedcol12 '' emp
DISPLAY BBED EXAMINE(X) FORMAT
C80
----------
nccntnnn
SCOTT@test01p> @ ver1
PORT_STRING VERSION BANNER CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0 12.1.0.1.0 Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0
SCOTT@test01p> select rowid,emp.* from emp where rownum=1;
ROWID EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
------------------ ---------- ---------- --------- ---------- ------------------- ---------- ---------- ----------
AAAWh/AAJAAAACVAAA 7369 SMITH CLERK 7902 1980-12-17 00:00:01 800 20
SCOTT@test01p> @ rowid AAAWh/AAJAAAACVAAA
OBJECT FILE BLOCK ROW ROWID_DBA DBA TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
92287 9 149 0 0x2400095 9,149 alter system dump datafile 9 block 149 ;
D:\tools\bbed>echo x /rnccntnnn dba 9,150 *kdbr[0] | bbed1
echo x /rnccntnnn dba 9,150 *kdbr[0] | bbed1
BBED: Release 2.0.0.0.0 - Limited Production on Thu Jun 28 20:56:28 2018
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************
BBED> set count 8192
COUNT 8192
BBED> set width 160
WIDTH 160
BBED> rowdata[570] @8150
------------
flag@8150: 0x2c (KDRHFL, KDRHFF, KDRHFH)
lock@8151: 0x01
cols@8152: 8
col 0[3] @8153: 7369
col 1[5] @8157: SMITH
col 2[5] @8163: CLERK
col 3[3] @8169: 7902
col 4[7] @8173: 1980-12-17 00:00:01
col 5[2] @8181: 800
col 6[0] @8184: *NULL*
col 7[2] @8185: 20
--//測試經常使用bbed x命令顯示資料,裡面的格式每次輸入必須顯示錶結構才方便輸入.
--//如果欄位很多非常麻煩,寫一個指令碼完成這個工作.
--//這個是我以前寫的,12c已經淘汰wmsys.wm_concat,要使用listagg代替.
prompt
PROMPT DISPLAY BBED EXAMINE(X) FORMAT
prompt
SELECT REPLACE (wmsys.wm_concat (c1), ',') c80
FROM ( SELECT data_type
,column_name
,DECODE
(
data_type
,'NUMBER', 'n'
,'CHAR', 'c'
,'VARCHAR', 'c'
,'VARCHAR2', 'c'
,'DATE', 't'
,' '
)
c1
FROM dba_tab_cols
WHERE owner = UPPER(nvl('&1',user)) AND TABLE_NAME = UPPER( '&2')
ORDER BY column_id);
---//改寫如下,做一個記錄:
prompt
PROMPT DISPLAY BBED EXAMINE(X) FORMAT
prompt
SELECT REPLACE (LISTAGG (c1, ',') WITHIN GROUP (ORDER BY column_id), ',') c80
FROM ( SELECT data_type
,column_id
,column_name
,DECODE
(
data_type
,'NUMBER', 'n'
,'CHAR', 'c'
,'VARCHAR', 'c'
,'VARCHAR2', 'c'
,'DATE', 't'
,' '
)
c1
FROM dba_tab_cols
WHERE owner = UPPER (NVL ('&1', USER))
AND TABLE_NAME = UPPER ('&2')
AND hidden_column = 'NO'
ORDER BY column_id);
SCOTT@test01p> @ bbedcol12 '' emp
DISPLAY BBED EXAMINE(X) FORMAT
C80
----------
nccntnnn
SCOTT@test01p> @ ver1
PORT_STRING VERSION BANNER CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0 12.1.0.1.0 Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0
SCOTT@test01p> select rowid,emp.* from emp where rownum=1;
ROWID EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
------------------ ---------- ---------- --------- ---------- ------------------- ---------- ---------- ----------
AAAWh/AAJAAAACVAAA 7369 SMITH CLERK 7902 1980-12-17 00:00:01 800 20
SCOTT@test01p> @ rowid AAAWh/AAJAAAACVAAA
OBJECT FILE BLOCK ROW ROWID_DBA DBA TEXT
---------- ---------- ---------- ---------- -------------------- -------------------- ----------------------------------------
92287 9 149 0 0x2400095 9,149 alter system dump datafile 9 block 149 ;
D:\tools\bbed>echo x /rnccntnnn dba 9,150 *kdbr[0] | bbed1
echo x /rnccntnnn dba 9,150 *kdbr[0] | bbed1
BBED: Release 2.0.0.0.0 - Limited Production on Thu Jun 28 20:56:28 2018
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
************* !!! For Oracle Internal Use only !!! ***************
BBED> set count 8192
COUNT 8192
BBED> set width 160
WIDTH 160
BBED> rowdata[570] @8150
------------
flag@8150: 0x2c (KDRHFL, KDRHFF, KDRHFH)
lock@8151: 0x01
cols@8152: 8
col 0[3] @8153: 7369
col 1[5] @8157: SMITH
col 2[5] @8163: CLERK
col 3[3] @8169: 7902
col 4[7] @8173: 1980-12-17 00:00:01
col 5[2] @8181: 800
col 6[0] @8184: *NULL*
col 7[2] @8185: 20
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2157009/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20160303]顯示bbed x命令格式.txt
- 修改oracleasm的listdisks和querydisk命令顯示格式OracleASM
- [20160405]bbed的assign命令.txt
- Oracle sqlplus設定顯示格式命令詳解OracleSQL
- [20160325]bbed 中文字元顯示的顯示問題字元
- 關於oracle日期格式顯示格式Oracle
- BBED命令
- [20210304]bbed的assign命令.txt
- Layui表格日期格式顯示UI
- [20210920]bbed的assign命令.txt
- jbuilder x 的中文顯示UI
- bbed二(命令)
- JS/HTML格式化顯示JSHTML
- django 設定日期顯示格式Django
- [20180627]測試bbed是否支援管道命令.txt
- PHP列印格式化顯示利器PHP
- strings.xml顯示html格式XMLHTML
- sql嵌入html格式顯示報表SQLHTML
- asp.net 時間顯示格式ASP.NET
- 【BBED】Oracle bbed常用命令參考Oracle
- IE無法顯示.shtml格式網頁HTML網頁
- 修改資料庫的日期顯示格式資料庫
- 如何實現網頁文字原格式顯示網頁
- 自定義 RMAN 顯示的日期時間格式
- Asp.net日期字串格式化顯示ASP.NET字串格式化
- 設定RMAN顯示的日期時間格式
- hadoop中顯示每個目錄大小(按照GN.MB.KB格式顯示)Hadoop
- 【SQL*Plus】列格式化命令之 “NUL[L] text”——定製NULL的顯示內容SQLNull
- history命令顯示,操作執行日期
- bbed--常用命令
- [20231109]bbed p命令dba引數問題.txt
- Mac OS X 顯示和隱藏檔案Mac
- JSON 格式化 顯示到頁面中JSON
- PHPstrom 配置 Laravel Log 格式日誌高亮顯示PHPLaravel
- linux系統lcd顯示jpg格式圖片Linux
- 專案需求討論: 文字顯示排版— Html格式HTML
- Asp.net 日期字串格式化顯示方法ASP.NET字串格式化
- [20170419]bbed探究資料塊.txt