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
- MySQL: Too many connectionsMySql
- 解決 Too many symbol filesSymbol
- Too many open files in system處理
- oracle中database links的使用OracleDatabase
- Database links of distributed oracle systemDatabaseOracle
- Too many open files報錯處理
- MySQL ERROR 1040: Too many connectionsMySqlError
- 【MySQL】Too many connections 案例一則MySql
- [HP-UX] cannot fork: too many processesUX
- NETAPP - LOGIN TOO MANY USERSAPP
- when tag object too many, performance very lowObjectORM
- Oracle SQL performance with database links - dblinkOracleSQLORMDatabase
- React報錯之Too many re-rendersReact
- titan-hadoop “Too many open files”修正Hadoop
- Database Links 全面瞭解---轉MetalinkDatabase
- mysql備份提示 too many open files Errornumber 24MySqlError
- 關於mysql的Too many connections問題MySql
- AIX5.3: Too many processes 0403-030AI
- weblogic日誌報錯too many open filesWeb
- 如何修復 SPF PermError: too many DNS lookupsErrorDNS
- 解決Mysql錯誤[1040]Too many connectionsMySql
- mysql的max_connections和Too many connectionsMySql
- 解決WebLogic中Too many open files異常Web
- Mysql中too many connections問題的解決MySql
- nginx 報錯 accept4 () failed (24: Too many open files)NginxAI
- docker中使用systemctl命令時報Too many open files錯誤Docker
- ValueError: output parameter for reduction operation logical_and has too many dimensions ?Error
- linux Too Many Files 問題檢視和解決方法Linux
- How to use rman backup a noarchivelog databaseHiveDatabase
- Exclusive access could not be obtained because the database is in useAIDatabase
- MySQL問題處理——1040錯誤Too many connectionsMySql
- 解決:ChatGPT too many requests in 1 hour.Try again laterChatGPTAI
- aix Oracle 使用者報錯:Too many processes already existAIOracle
- Method has too many Body parameters: public abstract com.cloud.module.smartkeCloud
- 0403-030 The fork function failed. Too many processes already existFunctionAI
- How to use the Automatic Database Diagnostic Monitor(一)Database
- Nginx報錯: "Too many open files accept" 和 "could not build the server_names_hash"NginxUIServer