ora-02020 too many database links in use
題記:之前在寫一個統計性質的儲存過程,執行時報了ORA-02020。研究下~ |
$ oerr ora 2020
02020, 00000, "too many database links in use" // *Cause: The current session has exceeded the INIT.ORA open_links maximum. // *Action: Increase the open_links limit, or free up some open links by // committing or rolling back the transaction and canceling open // cursors that reference remote databases. |
確實用了好幾個database links 。
下面建立實驗來驗證 committing or rolling back the transaction 是ok的。
1、 檢視dblink的引數。建立多個dblink,這裡我建立了6個:
從DBLINK_TEST1至DBLINK_TEST6
> show parameter open_links
NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ open_links integer 4 open_links_per_instance integer 4 |
2、連線6個dblink,每次連線後提交。則可以成功。
> show parameter open_links
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
open_links integer 4
open_links_per_instance integer 4
> col DB_LINK for a20
> select * from v$dblink;no rows selected
> declare
2 v_i number;
3 v_sql varchar(500);
4 begin
5 for i in 1..6
6 loop
7 v_sql:='select count(*) from );
8 execute immediate v_sql into v_i;
9 commit;
10 dbms_output.put_line(i);
11 end loop;
12 end;
13 /
1
2
3
4
5
6PL/SQL procedure successfully completed.
> select * from v$dblink;
DB_LINK OWNER_ID LOG HET PROTOC OPEN_CURSORS IN_ UPD COMMIT_POINT_STRENGTH
-------------------- ---------- --- --- ------ ------------ --- --- ---------------------
DBLINK_TEST1 58 YES YES UNKN 0 NO NO 1
DBLINK_TEST2 58 YES YES UNKN 0 NO NO 1
DBLINK_TEST3 58 YES YES UNKN 0 NO NO 1
DBLINK_TEST6 58 YES YES UNKN 0 NO NO 1
3、連線6個dblink,每次連線後不提交。則提示失敗。
> declare
2 v_i number;
3 v_sql varchar(500);
4 begin
5 for i in 1..6
6 loop
7 v_sql:='select count(*) from );
8 execute immediate v_sql into v_i;
9 --commit;
10 dbms_output.put_line(i);
11 end loop;
12 end;
13 /
1
2
3
4
declare
*
ERROR at line 1:
ORA-02020: too many database links in use
ORA-06512: at line 8
> select * from v$dblink;DB_LINK OWNER_ID LOG HET PROTOC OPEN_CURSORS IN_ UPD COMMIT_POINT_STRENGTH
-------------------- ---------- --- --- ------ ------------ --- --- ---------------------
DBLINK_TEST1 58 YES YES UNKN 0 YES NO 1
DBLINK_TEST2 58 YES YES UNKN 0 YES NO 1
DBLINK_TEST3 58 YES YES UNKN 0 YES NO 1
DBLINK_TEST4 58 YES YES UNKN 0 YES NO 1
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23650854/viewspace-687904/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 解決 ln -s 軟連結產生的Too many levels of symbolic links錯誤Symbol
- 解決 Too many symbol filesSymbol
- MySQL ERROR 1040: Too many connectionsMySqlError
- Too many files with unapproved license異常APP
- Too many open files報錯處理
- Ubuntu 解決 Too many open files 問題Ubuntu
- React報錯之Too many re-rendersReact
- 如何修復 SPF PermError: too many DNS lookupsErrorDNS
- mysql備份提示 too many open files Errornumber 24MySqlError
- [20230104]Oracle too many parse errors PARSE ERROR.txtOracleError
- [20200309]rlwrap: error: Cannot execute sqlplus: Too many levels of symbolic linErrorSQLSymbol
- linux Too Many Files 問題檢視和解決方法Linux
- ValueError: output parameter for reduction operation logical_and has too many dimensions ?Error
- MySQL問題處理——1040錯誤Too many connectionsMySql
- nginx 報錯 accept4 () failed (24: Too many open files)NginxAI
- 解決:ChatGPT too many requests in 1 hour.Try again laterChatGPTAI
- 31.提示錯誤fopen_means Too many open files
- 2018-06-13 Use rpsblast to search Cdd databaseASTDatabase
- Method has too many Body parameters: public abstract com.cloud.module.smartkeCloud
- docker中使用systemctl命令時報Too many open files錯誤Docker
- Oracle資料庫出現WARNING: too many parse errors告警的分析思路Oracle資料庫Error
- MySQL異常刨析:ata source rejected establishment of connection, message from server: “Too many connectionMySqlServer
- krpano 問題解決之 “Too many active WebGL contexts. Oldest context will be lost.”WebContext
- use database 切換提示You can turn off this feature to get a quicker startupDatabaseUI
- 2.3.2.2.1 Metadata Links
- Links, Symbolic or OtherwiseSymbol
- GORM many2many、many2one、one2many關聯表的操作GoORM
- 2.1.3.2 Metadata and Data Links
- Mysql報Too many connections,不要亂用ulimit了,看看如何正確修改程式的最大檔案數MySqlMIT
- 連線雲虛擬主機中MySQL資料庫時出現“Too many connections”報錯資訊MySql資料庫
- 從原始碼角度談談open_files_limit的生成邏輯及"Too many open files"的解決思路原始碼MIT
- Many To Many could not initialize proxy – no Session的解決方法Session
- too many open files 與程式網路連線資料檢視[轉載自北風之神巨佬的文章]
- css23 CSS Links, CursorsCSS
- B - Make Many Triangles
- 【轉載】Kano Model — Ways to use it and NOT use it
- Oracle DBLink連線數過多的問題(Ora-02020)Oracle
- JPA關係對映系列四:many-to-many 關聯對映
- 演算法學習-Dancing Links X演算法