[20191204]sqlplus特殊定義導致的問題.txt
[20191204]sqlplus特殊定義導致的問題.txt
1.環境:
SCOTT@book> @ ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SCOTT@book> set numformat "999,999,999"
SCOTT@book> select * from emp where rownum<=2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
------------ ---------- --------- ------------ ------------------- ------------ ------------ ------------
7,369 SMITH CLERK 7,902 1980-12-17 00:00:00 800 20
7,499 ALLEN SALESMAN 7,698 1981-02-20 00:00:00 1,600 300 30
--//這樣顯示的資料有逗號.這樣一些指令碼可能執行報錯.
2.例子:
SCOTT@book> @?/rdbms/admin/awrrpt.sql
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
1337401710 BOOK 1 book
Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Would you like an HTML report, or a plain text report?
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
Enter value for report_type: html
Type Specified: html
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 1337401710 1 BOOK book gxqyydg4
Using ############ for database Id
Using 1 for instance number
:dbid := ############;
*
ERROR at line 2:
ORA-06550: line 2, column 18:
PLS-00103: Encountered the symbol "#" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
continue avg count current exists max min prior sql stddev
sum variance execute forall merge time timestamp interval
date <a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternatively
declare
*
ERROR at line 1:
ORA-20200: Database/Instance / does not exist in DBA_HIST_DATABASE_INSTANCE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ORA-06512: at line 23
--//我定義太短,輸出資訊是# .如果設定:
SCOTT@book> set numformat "999,999,999,999"
SCOTT@book> @?/rdbms/admin/awrrpt.sql
Current Instance
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
1337401710 BOOK 1 book
Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Would you like an HTML report, or a plain text report?
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
Enter value for report_type: html
Type Specified: html
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 1337401710 1 BOOK book gxqyydg4
Using 1,337,401,710 for database Id
Using 1 for instance number
:dbid := 1,337,401,710;
*
ERROR at line 2:
ORA-06550: line 2, column 22:
--//但是這樣無法執行的.取消設定後ok.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2666774/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20221203]sqlplus set trimspool 問題.txtSQL
- [20221202]sqlplus set trimout 問題.txtSQL
- [20191204]hugepage相關引數含義.txt
- [20211220]記錄使用sqlplus的小問題.txtSQL
- [20210722]sqlplus下show recycebin的小問題.txtSQL
- [20190108]rlwrap sqlplus tee相關問題.txtSQL
- [20191204]關於oracle例項是否使用hugepages問題2.txtOracle
- [20211221]記錄使用sqlplus的小問題補充.txtSQL
- [20200219]log_archive_dest_1定義問題.txtHive
- [20190110]rlwrap sqlplus tee相關問題3.txtSQL
- CentOS 7 斷電導致 generating /run/initramfs/rdsosreport.txt 問題CentOS
- ANALYZE導致的阻塞問題分析
- REHL8.2斷電導致 generating /run/initramfs/rdsosreport.txt 問題
- [20180813]sqlplus arraysize設定與SDU.txtSQL
- iOS8 自定義UITabBar (使用popToViewController導致的UITabBarButton重疊的問題)iOSUItabBarViewController
- [20230323]sqlplus #.txtSQL
- [20221125]設定hugepages遇到的問題.txt
- [20201221]spfile設定問題.txt
- golang slice使用不慎導致的問題Golang
- CAS導致的ABA問題及解決
- 分散式鎖導致的超賣問題分散式
- MySQL8.0 view導致的效能問題MySqlView
- [20240818]測試21c下sqlplus show recyclebin的小問題2.txtSQL
- shell 中的 set -e 導致的退出問題
- [20211108]sqlplus資料寬度顯示設定.txtSQL
- 關於 Laravel mix 導致 Bootstrap 失效的問題Laravelboot
- str_replace導致的注入問題彙總
- alicdn邊緣節點不穩定導致頁面崩潰問題
- [20211123]sqlplus @與@@的區別.txtSQL
- [20190321]測試相同語句遇到導致cursor pin S的疑問.txt
- MySQL:一個特殊的問題MySql
- [20210519]是否可能導致DML失效.txt
- vue的scope導致樣式修改不了問題Vue
- EfCore3的OwnedType會導致Sql效率問題SQL
- oracle 序列值導致的主鍵衝突問題Oracle
- 【爬坑】.Net編譯環境導致的問題編譯
- ARC下的block導致的迴圈引用問題解析BloC
- Vmware相容問題導致電腦藍屏