oracle錯誤及解決方式集(轉)
oracle錯誤及解決方式集(轉)[@more@]1)啟動hp-unix下oracle時出現如下所示:
Oracle Server Manager Release 3.1.7.0.0 - Production
Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved
Oracle8i Enterprise Edition Release 8.1.7.2.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.2.0 - 64bit Production
SVRMGR> Password:
Password:
ORA-01031: insufficient privileges
SVRMGR> ORA-01031: insufficient privileges
SVRMGR>
Server Manager complete.
Database "ora" warm started.
#
顯示許可權不夠;用root去啟動oracle當然是不行的;
2)col 用法
col子命令中有兩個引數:truncated 和 wrapped,col定義的顯示行的寬度,truncated就是如果行超過顯示寬度就截斷,wrapped就是換行!
/*=========================================================================*/
/* 建立同義詞並使用 */
/*=========================================================================*/
我們先看如下的一系列執行:
SQL> create or replace view v_bmw_pay_online_new as
2 select *
3 from taobao.bmw_pay_online_new@lnk_db215;
SQL> create or replace procedure sp_v_test is
2 v_id number;
3 begin
4 select id into v_id from v_bmw_pay_online_new where id=1;
5 end;
6 /
Procedure created
SQL> create or replace synonym s_bmw_pay_online_new
2 for taobao.bmw_pay_online_new@lnk_db215;
Synonym created
SQL> create or replace procedure sp_s_test is
2 v_id number;
3 begin
4 select id into v_id from s_bmw_pay_online_new where id=1;
5 end;
6 /
Warning: Procedure created with compilation errors
SQL> show error
Errors for PROCEDURE TAOBAO.SP_S_TEST:
LINE/COL ERROR
-------- ------------------------------------------------------------------------------------
4/29 PL/SQL: ORA-00600: 內部錯誤程式碼,引數: [17069], [0x57E77854], [], [], [], [], [], []
4/4 PL/SQL: SQL Statement ignored
可以看到,在同樣一個遠端物件上面,我可以透過建立檢視,然後在該檢視上建立儲存過程,是沒有任何問題的,
但是如果我對該遠端操作做一個同義詞,再在同義詞上建立儲存過程,則報出了Ora-00600。跟蹤也無果,
看產生的日誌檔案也不能看出來什麼,上metalink,搜尋"ora-00600 17069",發現查出現的東西一大堆,
大致是library cache錯誤,但是到底怎麼會產生這個錯誤呢,online聯絡上一個oracle線上技術支援,聊了一會兒,
問題是解決了,但是他就是不承認是bug,呵呵。
以下是聊天的總結:
ORA-00600 [17069] reorted on compiling a procedure.
Invalid lock in library cache.
Unable to pin the object and hence the Error.
"Failed to pin a library cache object after 50 attempts"
Clearing the shared memory will help to get rid of inconsistant information
in memory which is causing the error.
The inconsistency was suspected to be in the remote site. But flushing the
shared pool in remote location didnt help.Tried recreation of the procedure
after dropping and recreating the synonym in the local database. But the
same failed.Flushed the shared pool in local database abd successfully
created the procedure.
alter system flush share_pool;
/*=========================================================================*/
/* 建立同義詞並使用 */
/*=========================================================================*/
create synonym synonym_name for table_name@db_link;
select * from table_name;
/*=========================================================================*/
/* 建立DB-LINK連線並使用 */
/*=========================================================================*/
create public database link db_link
connect to user identified by pwd
using 'connect string';
select * from dual@db_link;
/*=========================================================================*/
/* 插入時間串 */
/*=========================================================================*/
insert into test(IMPORT_DATE) values
(to_date('2002-10-20 15:30:00','yyyy-mm-dd hh24:mi:ss'));
insert into test(testtime) values(sysdate);
取得時候可以to_char(sysdate,'yyyy-mm-dd hh24:mi:ss')
/*=========================================================================*/
/* 更改表時記錄其變化的TRIGGER */
/*=========================================================================*/
CREATE OR REPLACE TRIGGER T_APBT_CONTRACT_ALL_AIUDR
after insert or update or delete on APBT_CONTRACT_ALL
for each row
/*無論一條語句改變了多少條記錄,ORACLE對於每條記錄觸發一次觸發器*/
/*before和after的區別:事件發生前還是事件發生後*/
begin
if inserting then
insert into A_APBT_CONTRACT_ALL(ID,CONTRACT_SERIAL_NUM,flag)
values (Seq_APBT_ARMS.NEXTVAL,:new.CONTRACT_SERIAL_NUM,1);/* :new*/
elsif updating then
insert into A_APBT_CONTRACT_ALL(ID,CONTRACT_SERIAL_NUM,flag)
values (Seq_APBT_ARMS.NEXTVAL,:old.CONTRACT_SERIAL_NUM,2);
/*此句存在問題*/
elsif deleting then
insert into A_APBT_CONTRACT_ALL(ID,CONTRACT_SERIAL_NUM,flag)
values (Seq_APBT_ARMS.NEXTVAL,:old.CONTRACT_SERIAL_NUM,3);
end if;
end;
/
/*=========================================================================*/
/* 你能夠建立被如下語句所觸發: */
/*=========================================================================*/
DML語句( DELETE,INSERT,UPDATE)
DDL語句( CREATE,ALTER,DROP)
資料庫操作( SERVERERROR, LOGON, LOGOFF, STARTUP, SHUTDOWN)
/*=========================================================================*/
/* 建立sequence序列: */
/*=========================================================================*/
DROP SEQUENCE ARMS.SEQ_APBT_ARMS;
CREATE SEQUENCE ARMS.SEQ_APBT_ARMS
START WITH 30
MAXVALUE 999999999999999999999999999
MINVALUE 1
NOCYCLE
CACHE 20
NOORDER;
Oracle Server Manager Release 3.1.7.0.0 - Production
Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved
Oracle8i Enterprise Edition Release 8.1.7.2.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.2.0 - 64bit Production
SVRMGR> Password:
Password:
ORA-01031: insufficient privileges
SVRMGR> ORA-01031: insufficient privileges
SVRMGR>
Server Manager complete.
Database "ora" warm started.
#
顯示許可權不夠;用root去啟動oracle當然是不行的;
2)col 用法
col子命令中有兩個引數:truncated 和 wrapped,col定義的顯示行的寬度,truncated就是如果行超過顯示寬度就截斷,wrapped就是換行!
/*=========================================================================*/
/* 建立同義詞並使用 */
/*=========================================================================*/
我們先看如下的一系列執行:
SQL> create or replace view v_bmw_pay_online_new as
2 select *
3 from taobao.bmw_pay_online_new@lnk_db215;
SQL> create or replace procedure sp_v_test is
2 v_id number;
3 begin
4 select id into v_id from v_bmw_pay_online_new where id=1;
5 end;
6 /
Procedure created
SQL> create or replace synonym s_bmw_pay_online_new
2 for taobao.bmw_pay_online_new@lnk_db215;
Synonym created
SQL> create or replace procedure sp_s_test is
2 v_id number;
3 begin
4 select id into v_id from s_bmw_pay_online_new where id=1;
5 end;
6 /
Warning: Procedure created with compilation errors
SQL> show error
Errors for PROCEDURE TAOBAO.SP_S_TEST:
LINE/COL ERROR
-------- ------------------------------------------------------------------------------------
4/29 PL/SQL: ORA-00600: 內部錯誤程式碼,引數: [17069], [0x57E77854], [], [], [], [], [], []
4/4 PL/SQL: SQL Statement ignored
可以看到,在同樣一個遠端物件上面,我可以透過建立檢視,然後在該檢視上建立儲存過程,是沒有任何問題的,
但是如果我對該遠端操作做一個同義詞,再在同義詞上建立儲存過程,則報出了Ora-00600。跟蹤也無果,
看產生的日誌檔案也不能看出來什麼,上metalink,搜尋"ora-00600 17069",發現查出現的東西一大堆,
大致是library cache錯誤,但是到底怎麼會產生這個錯誤呢,online聯絡上一個oracle線上技術支援,聊了一會兒,
問題是解決了,但是他就是不承認是bug,呵呵。
以下是聊天的總結:
ORA-00600 [17069] reorted on compiling a procedure.
Invalid lock in library cache.
Unable to pin the object and hence the Error.
Clearing the shared memory will help to get rid of inconsistant information
in memory which is causing the error.
The inconsistency was suspected to be in the remote site. But flushing the
shared pool in remote location didnt help.Tried recreation of the procedure
after dropping and recreating the synonym in the local database. But the
same failed.Flushed the shared pool in local database abd successfully
created the procedure.
alter system flush share_pool;
/*=========================================================================*/
/* 建立同義詞並使用 */
/*=========================================================================*/
create synonym synonym_name for table_name@db_link;
select * from table_name;
/*=========================================================================*/
/* 建立DB-LINK連線並使用 */
/*=========================================================================*/
create public database link db_link
connect to user identified by pwd
using 'connect string';
select * from dual@db_link;
/*=========================================================================*/
/* 插入時間串 */
/*=========================================================================*/
insert into test(IMPORT_DATE) values
(to_date('2002-10-20 15:30:00','yyyy-mm-dd hh24:mi:ss'));
insert into test(testtime) values(sysdate);
取得時候可以to_char(sysdate,'yyyy-mm-dd hh24:mi:ss')
/*=========================================================================*/
/* 更改表時記錄其變化的TRIGGER */
/*=========================================================================*/
CREATE OR REPLACE TRIGGER T_APBT_CONTRACT_ALL_AIUDR
after insert or update or delete on APBT_CONTRACT_ALL
for each row
/*無論一條語句改變了多少條記錄,ORACLE對於每條記錄觸發一次觸發器*/
/*before和after的區別:事件發生前還是事件發生後*/
begin
if inserting then
insert into A_APBT_CONTRACT_ALL(ID,CONTRACT_SERIAL_NUM,flag)
values (Seq_APBT_ARMS.NEXTVAL,:new.CONTRACT_SERIAL_NUM,1);/* :new*/
elsif updating then
insert into A_APBT_CONTRACT_ALL(ID,CONTRACT_SERIAL_NUM,flag)
values (Seq_APBT_ARMS.NEXTVAL,:old.CONTRACT_SERIAL_NUM,2);
/*此句存在問題*/
elsif deleting then
insert into A_APBT_CONTRACT_ALL(ID,CONTRACT_SERIAL_NUM,flag)
values (Seq_APBT_ARMS.NEXTVAL,:old.CONTRACT_SERIAL_NUM,3);
end if;
end;
/
/*=========================================================================*/
/* 你能夠建立被如下語句所觸發: */
/*=========================================================================*/
DML語句( DELETE,INSERT,UPDATE)
DDL語句( CREATE,ALTER,DROP)
資料庫操作( SERVERERROR, LOGON, LOGOFF, STARTUP, SHUTDOWN)
/*=========================================================================*/
/* 建立sequence序列: */
/*=========================================================================*/
DROP SEQUENCE ARMS.SEQ_APBT_ARMS;
CREATE SEQUENCE ARMS.SEQ_APBT_ARMS
START WITH 30
MAXVALUE 999999999999999999999999999
MINVALUE 1
NOCYCLE
CACHE 20
NOORDER;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10617542/viewspace-961531/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 錯誤總結及問題解決 ORAOracle
- Oracle的TNS-12502 錯誤原因及解決Oracle
- PYTHON3 cx-Oracle 字符集 轉換錯誤的解決方案PythonOracle
- ORACLE匯入遇到ORACLE錯誤959解決方法Oracle
- Excel匯入null錯誤解決方式ExcelNull
- Hadoop常見錯誤及解決方案Hadoop
- windows故障轉移叢集 “群集事件” 經常出現 1135 錯誤的解決Windows事件
- 平臺配置及測試錯誤提示及解決方案
- mysql 解決字符集錯誤 正確摘錄MySql
- iOS路上遇到的錯誤及解決辦法iOS
- No bean named 'xxx' is defined錯誤,原因及解決方案Bean
- ORA-39006錯誤原因及解決辦法
- Ocelot錯誤解決
- ORACLE 錯誤Oracle
- Elasticsearch常見的5個錯誤及解決策略Elasticsearch
- 帝國CMS搬家常見錯誤及解決方法
- 爬蟲常見錯誤程式碼及解決措施爬蟲
- tensorflow安裝使用過程錯誤及解決方法
- 解決 Python UnicodeEncodeError 錯誤PythonUnicodeError
- Go常見錯誤集錦 | 字串底層原理及常見錯誤Go字串
- Go 常見錯誤集錦 | 字串底層原理及常見錯誤Go字串
- 資料庫連線錯誤的原因及解決方法資料庫
- SSL證書7大常見錯誤及解決方法!
- 中科三方——SSL常見錯誤及解決方法
- dbfread報錯ValueError錯誤解決方法Error
- 【ERROR】Oracle列印錯誤程式碼解釋ErrorOracle
- AIX 5.3 Install Oracle 10g RAC 錯誤集錦AIOracle 10g
- PbootCMS 404 錯誤解決方法boot
- Linux下錯誤解決方案Linux
- latex 錯誤以及解決方案
- HTTP 錯誤 500.19- Internal Server Error 錯誤解決方法HTTPServerError
- Mysql錯誤集MySql
- 如何解決ORA-04031 錯誤(轉)
- 伺服器出現 HTTP 錯誤程式碼,及解決方法伺服器HTTP
- Grafana Nginx 403 Origin not allowed 及 ws websocket連線錯誤解決GrafanaNginxWeb
- SSL證書七大常見錯誤及解決方法
- 三層登陸程式碼及錯誤集錦
- 一種SYBASE資料庫錯誤DBSQL_SQL_ERROR的解決方式資料庫SQLError
- steam磁碟寫入錯誤怎麼解決 steam磁碟寫入錯誤解決方法大全