各位大大好:
         最近遇到一个问题,如下:
         本人公司做的一个系统,对其他系统有定时任务调度,采用ORACLE中DB_link连接远程数据库导入数据。
      最近在定时任务调度的时候出现ORA-02020 too many database links in use错误。本人oracle知识不太好,所以只能作出以下两种猜测:         1.本地oracle中定时调度的存储过程(采用DB_LINK取远程数据)在某个时间段同时连接远程数据库的数量过多,超过本地oracle中open_links的设置值,造成上述错误。         2.由于远程数据库可能有其他系统做DB_LINK连接,另一种可能是在本人公司数据库访问远程数据库时,其他系统也在做DB_LINK访问,造成远程数据库中open_links的可连接数达到最大。         那么我这里就想确认下,oracle 中ORA-02020错误,是指本地数据库db_link访问远程数据库连接过多还是指远程数据库的被访问db_link过多
     

解决方案 »

  1.   

    show parameter open_links
    查看最多的链接数
     
    --加大数目看看
    alter system set open_links=10 scope=spfile;
    重启数据库
      

  2.   

    ORA-02020 too many database links in useCause: 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.