DB Links are not closed after testing

Howdy!

I’m creating several DB links via the SB in 13.0.0.12. After the number of DB link tests surpasses the “open_links” init.ora parameter, I get:

ORA-02020: too many database links in use

The workaround is to close the SB (or the DB connection, obviously), but it could also lead to hitting “open_links_per_instance”, which would be arguably worse, depending on the installation/usage of that particular Oracle DB.

A “DBMS_SESSION.CLOSE_DATABASE_LINK(db_link_name_here);” should work after the “rollback to savepoint DBLinkTest;”. It would need to be after the rollback to prevent “ORA-02080: database link is in use” errors.

Thanks!
Rich