收到业务反馈使用DBLINK报错ORA-02020
查看报错解释,是通过OPEN_LINKS的参数限制的,一个会话不能超过该参数设置的DBLINK数量
// *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.
查看参数设置,发现设置的大小为4。
SQL> show parameter open_links
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
open_links integer 4
open_links_per_instance integer 4
验证:
在一个会话里,使用4个以上不同的DBLINK则会报错ORA-02020
若是相同的DBLINK则无报错。
使用commit后提交,则可以从新使用其他的DBLINK。
建议:
若需要同时使用超过4个不同DBLINK,则需要修改该参数,该参数需要重启后才能生效。
若非同一条语句使用超过4个不同的DBLINK,则可以commit后再执行其他包含DBLINK的语句。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29123031/viewspace-2122525/
,如需转载,请注明出处,否则将追究法律责任。