Oracle ora-02020 預存程序中dblink使用個數問題

來源:互聯網
上載者:User

有個預存程序,裡面已經有4個dblink了,但是由於業務需要,還需要再加幾個,在加到第五個的時候,系統忽然拋出一個錯誤:ora-02020 too many database links in use。諮詢Oracle工程師,得出的結論是在oracle的系統參數中,OPEN_LINKS和open_links_per_instanse兩個參數設定問題,系統預設為4,並沒有對這個參數修改。

操作:

1)用sys登入,

2)show parameter spfile;

看到下面有檔案,說明oracle用的的是spfile。

3) 備份SPFILE,放置設定有問題需要倒回

create pfile='/opt/oracle/spfile2011***.ora' from spfile;

4)show parameter open

SQL> show parameter open

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

open_cursors                         integer     300

open_links                           integer     4

open_links_per_instance              integer     4

read_only_open_delayed               boolean     FALSE

session_max_open_files               integer     10

5)修改兩個參數:open_links,open_links_per_instance

alter system set open_links=50 scope=spfile

alter system set open_links_per_instance=50 scope=spfile

6)重啟資料庫,設定完成。

原來以為open_links這個參數是指整個資料庫允許用多少個dblink,open_links_per_instance這個參數是指每個執行個體最多允許的dblink個數。後來查資料才發現第一個參數的意思理解錯了,open_links  oracle的官方解釋是每個session最多允許的dblink數量。至於其他的區別,在看了英文的解釋以後,還是不大明白。希望又看到了,懂得這些的兄弟姐妹能夠給補充一下。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.