[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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- C 語言宣告與定義不一致導致的問題
- 第二篇:淺談自定義標頭檔案可能導致的重定義問題
- Linux下共享庫問題導致無法啟動SQLPLUS的問題解決LinuxSQL
- sqlplus中的變數定義和簡單使用.txtSQL變數
- crontab設定導致的伺服器程式異常問題伺服器
- 自定義導航欄返回按鈕導致返回手勢失效問題
- ANALYZE導致的阻塞問題分析
- MySQL Flush導致的等待問題MySql
- CentOS 7 斷電導致 generating /run/initramfs/rdsosreport.txt 問題CentOS
- 定時重啟tomcat指令碼導致的亂碼問題Tomcat指令碼
- 克隆ORACLE軟體的導致的問題Oracle
- REHL8.2斷電導致 generating /run/initramfs/rdsosreport.txt 問題
- [20191204]關於oracle例項是否使用hugepages問題2.txtOracle
- [20120109]sqlplus 與set longchunksize 設定問題.txtSQLGC
- CAS導致的ABA問題及解決
- MySQL8.0 view導致的效能問題MySqlView
- golang slice使用不慎導致的問題Golang
- 分散式鎖導致的超賣問題分散式
- [20160113]sqlplus使用問題.txtSQL
- mongo shell中特殊判斷符號轉義的問題Go符號
- iOS8 自定義UITabBar (使用popToViewController導致的UITabBarButton重疊的問題)iOSUItabBarViewController
- 關於 Laravel mix 導致 Bootstrap 失效的問題Laravelboot
- 建立index 使用Online導致的問題Index
- ORACLE資料檔名導致的奇怪問題Oracle
- xml中有特殊字元,導致解析時出錯XML字元
- SCHEDULER呼叫XDB程式導致效能問題
- ORACLE_HOME設定錯誤導致本地sqlplus無法登陸OracleSQL
- Oracle 11g 中 cursor_sharing 設定為SIMILAR 導致的問題OracleMILA
- 執行計劃的偏差導致的效能問題
- oracle使用者密碼設定的特殊字元問題Oracle密碼字元
- selinux導致sqlplus登入失敗LinuxSQL
- 環境變數設定錯誤導致sqlplus 連線不上oracle變數SQLOracle
- [20221203]sqlplus set trimspool 問題.txtSQL
- vue的scope導致樣式修改不了問題Vue
- EfCore3的OwnedType會導致Sql效率問題SQL
- javascript小數乘法運算導致的精度問題JavaScript
- 完美的執行計劃導致的效能問題
- Oracle資料庫導致效能問題的可能原因Oracle資料庫