ORA-2020 when trying to verify database links

I have a problem with verifying database links. I want to create a procedure for checking all database links. this is done like the following:
declare
xRefCursor sys_refcursor;
cursor cDBLinks is
select db_link
from user_db_links;
nDummy number;
begin
for rL in cDBLinks loop
begin
open xRefCursor for 'select 1 from dual@'||rL.db_link;
fetch xRefCursor into nDummy;
close xRefCursor;
dbms_output.put_line(rL.db_link||' established');
exception
when others then
if xRefCursor%isopen then
close xRefCursor;
end if;
dbms_output.put_line(rL.db_link||' error '||sqlerrm);
end;
end loop;
end;
when running the procedure, I get a ORA-2020 : 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
exact after the count of database links specified in the OPEN_LINKS parameter. As you can see I don't issue any transaction, and also I close every cursor I open...so there should be just one db link active in time. note that increasing the OPEN_LINKS parameter will not be a good solution, as I can't tell how much links are existing for a user.
any suggestions?
regards
Christian
oh, forgot to mention: tried this with 9.2.0.6 and 10.2.0.3 on WINDOWS (so I believe this also occurs in 9.2.0.6 <= DBVersion <= 10.2.0.3)
Message was edited by:
W1zard

As you can see I don't issue any transaction, and also I close every cursor I
open...so there should be just one db link active in time.This is wrong assumption. The closing of the cursor does not mean DB link will be closed too. You have to close database link explicitly.
See:
Managing Database Link
Rgds.

Similar Messages

  • ORA-24777 when trying to call multiple Oracle SPs...

    I had a SP in Oracle that called another SP in a SQL Server DB via DBLink. I was calling the Oracle SP from VB.NET (3.5) and because of transaction commiting I was not able to do this, so I removed the SQL SERVER SP call from inside the Oracle SP. However, I still get a ORA-24777 error: use of non-migratable database link not allowed.
    If I removed the reference to the other DB, why would I still get an error referencing the DBLINK?
    I'm using Oracle 10.2 and VB.NET (3.5).
    old SP CODE:
    I have a package called USP_VALIDATION
    In the package body, I was calling BATCH(Queue, RefNo) [a procedure in USP_VALIDATION]
    In this BATCH procedure, I would call SP_GET_BILLING_OPTION_TCIS(accNo, lclBillingOption) [note TCIS is the SQL DB and lclBillingOption would be the TCIS billing option]
    ... do something with lclBillingOption
    I changed this to the following:
    In the package body, I now call BATCH(Queue, RefNo, BillingOption)
    In this new BATCH procedured, I now DON'T call SP_GET_BILLING_OPTION_TCIS as I already retrieved it first before I call USP_VALIDATION in the .NET code
    ... do something with the BillingOption passed in as a parameter when calling BATCH.
    What I'm really trying to do is make sure that the transaction commitment/rollback is handled correctly in the following senario.
    What happened before was because the one SP was calling another SQL database via DBLINK, it was not working correctly. So we removed the DBLINK and now call the SQL database before we do any action with the Oracle SPs.
    Here is my code in .NET:
    Public Function EnrollElectricCustomer(ByVal EnrollParameters As IEnrollmentParameters) As IEnrolleSearch Implements Interfaces.IEnrollmentManager.EnrollElectricCustomer
            Dim dacRCES As New Dac.RC.EnrolleeDataService()
            Dim dacRCAS As New Dac.RC.AccountDataService()
            Dim oServiceType As IServiceType = New ServiceType(ServiceTypeEnum.Gas)
            Dim dacCSS As New Dac.Css.CssCustomerAccount
            Dim oBillingOption As IBillingOption = Nothing
            Dim business As New AccountManager
            Dim WorkQID As Long = 0
            Dim enrolleeSearch As EnrolleeSearch = Nothing
            Dim MainTranScope As TransactionScope = New TransactionScope(TransactionScopeOption.RequiresNew)
            Try
                EventLog.WriteEntry("RCIS", "Access --> EnrollElectricCustomer")
                ' comment - here I go to SQL Server to get the Billing Option instead of doing it thru DBLINK
                oBillingOption = dacRCAS.GetCurrentBillingOption(EnrollParameters.CssAccountNumber, oServiceType)
                Using MainTranScope
                    'first save the Enrollment record to the Enroll Queue
                    WorkQID = dacRCES.SaveElectricEnrollee(EnrollParameters)
                    'need to put account number needed into a collection
                    Dim oColAccounts As New Generic.List(Of IAccountRefreshRequests)
                    Dim oColCSSAccounts As New Generic.List(Of ICustomerAccount)
                    Dim oAccount As New AccountRefreshRequests
                    Dim oCustomerAccount As ICustomerAccount
                    Dim refreshstring As String = String.Empty
                    oAccount.CSSAccountNumber = EnrollParameters.CssAccountNumber
                    oAccount.CSSAccountNumberNoCheckDigit = EnrollParameters.CssAccountNumber.Substring(0, 14)
                    oAccount.CSSCheckDigit = EnrollParameters.CssAccountNumber.Substring(14, 1)
                    oAccount.ServiceType.CodeString = "E"
                    Dim rStatus As New RefreshStatus
                    rStatus.Code = StatusEnum.NewAccount
                    oAccount.Status.CodeString = rStatus.CodeString()
                    oColAccounts.Add(oAccount)
                    'call CSS passing in collection of account(s) and returning back collection of account(s)
                    oColCSSAccounts = dacCSS.GetCssAccountInfo(oColAccounts)
                    oCustomerAccount = New CustomerAccount
                    oCustomerAccount = oColCSSAccounts.Item(0)
                    refreshstring = business.BuildRefreshString(oCustomerAccount)
                    dacRCES.RefreshElectricAccount(refreshstring)
                    'once refreshed, we need to also run VALIDATION on this enrollent record...
    *' NOTE THAT THIS SP used to CALL SQL via DBLINK but no longer does....*               
                    dacRCES.ValidateElectricEnrollment(WorkQID,oBillingOption)
                    'once validated, we also have to submit the record....
                    dacRCES.SubmitElectricEnrollment(WorkQID)
                    MainTranScope.Complete()
                End Using
                If WorkQID > 0 Then
                    'now we need to retrieve the account enrollment record...
                    enrolleeSearch = dacRCES.FindEnrolleeByEnrollID(WorkQID, ServiceTypeEnum.Electric)
                End If
            Catch ex As Exception
                SendEmail.SendErrorEmail("EnrollElectricCustomer --> " & EnrollParameters.CssAccountNumber, ex.Message)
                RcCommon.WriteExceptionToLog(ex)
                Throw
            End Try
            Return enrolleeSearch
        End FunctionI'm concerned that if any one of the various calls fails, I want to rollback the ENTIRE transaction. Right now I
    a) insert the row into a table in Oracle,
    b) get detailed information on this account from another database (DB2),
    c) refresh the data in the Oracle DB on this account,
    d) validate the record added (business rules) and then when all done,
    e) to submit the account (which changes statuses for later use).
    If I insert the record but it fails at step d say, I want to rollback everything and remove the record from the Oracle table...
    Edited by: userLynx on Oct 17, 2012 6:37 AM

    EDIT1:
    You posted an edit including code while I was typing original response.
    You may find the following My Oracle Support note helpful. It applies to ODP.NET as well.
    ORA-24777 When Selecting Across a Database Link With Microsoft OLE DB Provider for Oracle [ID 397555.1]
    Just to confirm - is the database link used at all now?
    I know you said that the stored procedure is no longer called, but is the link still used for anything else?
    Also, do you have a call stack from when the exception is raised?
    Edited by: Mark Williams on Oct 17, 2012 9:53 AM

  • ORA-03113 when trying to connect to database

    RDBMS Version:: 9.2.0.6
    Operating System and Version:: Win2003 Small Business Server
    Error Number (if applicable):: ORA-03113
    Server Net Version:: 9.2.0.6
    Client Operating System and Version:: Solaris10
    Client Net Version:: 2.1.3
    ORA-03113 when trying to connect to database
    I've currently a 7.1.3 client on SUN Solaris (5.10 Generic_118844-26 i86pc i386 i86pc) where I want to connect to the 9.2.0.6 database on a Win2003 Server hardware.
    When i try to connect via SQL*Plus (Release 3.1.3.4.1), I get ORA-03113. Looking into the listener resp. alertfile on the server, I can see that the connectiorequest is recognized, but immediately answered by an ORA-0600, producing also trc-files.
    listener: 25-MAI-2007 09:37:23 * (CONNECT_DATA=(SID=HTASQL)(CID=(PROGRAM=)(HOST=eklvpa)(USER=sat250))) * (ADDRESS=(PROTOCOL=tcp)(HOST=172.17.233.3)(PORT=32790)) * establish * HTASQL * 0
    alert: ORA-00600: internal error code, arguments: [12333], [26], [0], [115], [], [], [], []
    Activating traces on the client-side showed the following errors:
    -<ERROR>- ntus2err: sd=8, op=1, resnt[0]=511, resnt[1]=2, resnt[2]=0
    -<ERROR>- nserror: nsres: id=0, op=65, ns=12541, ns2=12560; nt[0]=511, nt[1]=2, nt[2]=0
    -<ERROR>- nsopen: unable to open transport
    -<ERROR>- nsprecv: transport read error
    -<ERROR>- nserror: nsres: id=0, op=68, ns=12537, ns2=12560; nt[0]=507, nt[1]=0, nt[2]=0
    -<ERROR>- osnqrc: wanted 1 got 0, type 0
    -<ERROR>- osnqper: error from osnqrc
    -<ERROR>- osnqper: nr err code: 0
    -<ERROR>- osnqper: ns main err code: 12537
    -<ERROR>- osnqper: ns (2) err code: 12560
    -<ERROR>- osnqper: nt main err code: 507
    -<ERROR>- osnqper: nt (2) err code: 0
    -<ERROR>- osnqper: nt OS err code: 0
    -<ERROR>- osnqsm: send-break: failed to send OOB break...
    -<ERROR>- osnqper: error from send-marker
    -<ERROR>- osnqper: nr err code: 0
    -<ERROR>- osnqper: ns main err code: 12583
    -<ERROR>- osnqper: ns (2) err code: 0
    -<ERROR>- osnqper: nt main err code: 0
    -<ERROR>- osnqper: nt (2) err code: 0
    -<ERROR>- osnqper: nt OS err code: 0
    -<ERROR>- osnqbr: returning 3113
    Can anybody help me in determining the problem ? Is there a systemtic incompatibility in connecting a 7.1.3 client to a 9.2 (or even higher) database ?

    Thanks for your reply.
    But the funny thing on this compatibility issues is, that this configuration worked before. The only thing we did, was to setup the client-PC on a new hardware with also a new operating system (upgrading from Solaris 5.8 to 5.10). And from that time we encountered this problem.
    Are there any OS-related problems known or better to say: is (was) ORACLE 7.1.3 supported on Solaris 5.10 ? Should we look for any patches which might help us ?

  • When trying to verify apple id outlook crashes when I click on  email link?

    When trying to verify apple id, outlook 2003 crashes when I click on  email link?

    Where does Outlook crash, on your iPad or your computer?

  • When trying to verify the email address, I get the following message. Please help. This email address is already in use or you may already have an Apple ID associated with this email address. Please try again or sign in using your existing Apple ID.

    When trying to verify the email address, I get the following message. Please help. This email address is already in use or you may already have an Apple ID associated with this email address. Please try again or sign in using your existing Apple ID.

    Me too. I try to verify and i get the same message.
    I've created 3 alternate e-mail addresses and tried creating new accounts.
    Same Result!
    This is bullsh!t. How the **** can all 4 of my attempts result in the same freakin error???

  • KEEP GETTING "Unsupported 16-Bit Application" when trying to download Blackberry Link-I need music on my device!!

    KEEP GETTING  "Unsupported 16-Bit Application" when trying to download Blackberry Link.  Im trying to sync music into my new Z10.  here is the whole error message:
    "\??\C:\User.....................cannot start or run due to incompatibity with 64-bit versions of Windows.  Please contact software vendor to ask if a 64-bit Windows comapatible version is available
    Any know how to transfer music without using this Blackberry link?  Is there a quick fix to my problem? Any help would be appreciated.  Thanks

    Just download the Link application directly to your PC, not with your BlackBerry connected.
    There's no need for the connection while your simply downloading the install file.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • When trying to send a link off firefox via email the system looks for a g mail account that I do not have nor want to have. I've told the settings to use my outlook account but it keeps looking for g mail. how do i correct?

    when trying to send a link off firefox via email the system looks for a g mail account that I do not have nor want to have. I've told the settings to use my outlook account but it keeps looking for g mail. how do i correct?

    http://support.mozilla.com/en-US/kb/Changing+the+e-mail+program+used+by+Firefox

  • After downloading Mtn Lion, I get an error msg when trying to use a link in mail.  Says no associated application can be found.  Any suggestions?

    After downloading mountain lion, I get an error message when trying to use a link in mail.  One mail account on the same computer is fine, but not the other one.  Any suggestions?

    I went to the Apple Genius Bar for help.  Somehow when I downloaded Mountain Lion one of the mail accounts on the computer changed from an IMAP account to a POP account.  The POP account doesn't enable the links in email.  It was a quick fix.  Just go to prefrences in your mail account and change it to an IMAP account.  Hope this works for you as it did for me. 

  • When trying to open a link to a pdf, firefox opens continuous blank windows- only way to stop this crazy manic window opening is to force quit firefox.! Any help is greatly appreciated!

    When trying to open a link to a pdf, firefox opens continuous blank windows- only way to stop this crazy manic window opening is to force quit firefox.! Any help is greatly appreciated!

    Thanks, but this is a problem that began immediately after I installed 9.0.1
    this week...I haven't changed any settings that would cause this.

  • "Operation is not valid due to the current state of the object" error when trying to create a link for a shared folder in OneDrive

    I'm trying to share a folder in OneDrive with another user in my organization, and create a link so that people outside of the company can see the folder. Whenever I try to create a link I get an error that says: "Couldn't create the link sorry something
    went wrong operation is not valid due to the current state of the object" How do I resolve this?

    Hi,
    Sorry for replying late and I noticed that you posted another thread in this forum:
    http://social.technet.microsoft.com/Forums/en-US/2b8c6f54-9c59-4b37-b28f-1d49a1b7913b/operation-is-not-valid-due-to-the-current-state-of-the-object-error-when-trying-to-create-a-link?forum=officeitpro
    I've replied and kindly refer to it to see if it is helpful.
    Regards,
    Melon Chen
    TechNet Community Support

  • HT1430 Lost ability to send and receive email.  When trying to verify my email acount I get a message stating that my yahoo server is unavailable try later

    Lost ability to receive email on iPad.  When trying to verify password I keep getting the message that the yahoo server is unavailable

    Have you tried deleting and readding the e-mail?
    Yahoo has been doing upgrades for the past few weeks, causing random outages for users. Sometimes you just have to wait it out, other times removing and re entering the account info clears things up.

  • ORA-31600 when trying to view SQL DDL for a created public database link

    I created and committed a public database link and I can access the external database.
    When I try to view the DDL of the link, on the SQL tab, I'm getting following error:
    ORA-31600: invalid input value EMIT_SCHEMA for parameter NAME in function SET_TRANSFORM_PARAM
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 3900
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 4048
    ORA-06512: at "SYS.DBMS_METADATA", line 836
    ORA-06512: at line 1
    and
    ORA-31600: invalid input value LONGNAME for parameter NAME in function SET_FILTER
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 1980
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 3665
    ORA-06512: at "SYS.DBMS_METADATA", line 670
    ORA-06512: at "SYS.DBMS_METADATA", line 571
    ORA-06512: at "SYS.DBMS_METADATA", line 1221
    ORA-06512: at line 1
    Is this because of a bug in SqlDeveloper or because the db_link and host parameters have 33 characters?
    I'm using sql developer 1.5.3, build MAIN-5783
    tx,
    Roger Vermeir

    It's probably the length; really all sqldev does is calling:
    select DBMS_METADATA.get_ddl('DB_LINK',:NAME,:OWNER) FROM dual;So if you call it a bug, it's a database bug in the DBMS_METADATA package.
    But if you work with identifiers over 30 chars, I'd say that's a bug on it's own...
    FWIW, I can't reproduce this on our 10g DB; are you on 9i?
    Regards,
    K.

  • Getting ora-01092 and ora-00600 error when trying to startup database

    hi friends,plz help me i am in serious problem i dont know what happen to my database oracle 11g R2 when trying to startup it
    its showing the below error
    SQL> startup
    ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
    ORACLE instance started.
    Total System Global Area 7482626048 bytes
    Fixed Size          2214416 bytes
    Variable Size          4697622000 bytes
    Database Buffers     2751463424 bytes
    Redo Buffers          31326208 bytes
    Database mounted.
    ORA-01092: ORACLE instance terminated. Disconnection forced
    ORA-00600: internal error code, arguments: [12620], [6], [7], [], [], [], [],
    Process ID: 18088
    Session ID: 96 Serial number: 3

    This seems to be a Jumbo issue. Either you have to open a Service Request(SR) to oracle or you have to uninstall and again install the oracle DB to solve this ISSUE
    Regards
    cks
    Edited by: 874782 on Jan 17, 2012 2:58 PM

  • Ora-12154 when trying to connect to database from fortran application

    I am trying to connect to database and run an simple select query to a table(without any where clause) using pro*fortran code.
    the connect strng is like
    exec sql connect :uidpwd
    where uidpwd = username/password@SID
    SID and tnsnames connect string are the same.
    The fortran (profortran) code is placed in the database server and there are no errors when make is run.
    Tnsping is working fine, also i am able to conect using sql*plus and run the same query.
    Please help
    Thanks and Regards
    Nitin

    Hi Nitin
    Thanks for the helpful! With your point I'm now Pro! Great thanks.
    By the way have your seen that?
    Files such as LISTENER.ORA, TNSNAMES.ORA, SQLNET.ORA, if configured manually, or copied and edited from earlier releases of Oracle Database may have record attributes that are incompatible with Oracle Database 10g release 2. The software cannot read such files. The required record format is stream_lf and the record attributes are carriage_control and carriage_return.
    This may result in:
    Inability to start the listener
    Services not registered with the listener
    Inability to connect to other databases
    ORA-12154: TNS:could not resolve service name
    Run the following command on each file affected:
    $ DIR/FULL filename
    An output similar to the following may be displayed:
    Record format: Variable length, maximum 255 bytes
    Record attributes: Carriage return carriage control
    If the output includes the preceding entries, then run the following command:
    $ CONVERT/FDL=SYS$INPUT filename filename
    RECORD
    CARRIAGE_CONTROL CARRIAGE_RETURN
    FORMAT STREAM_LF
    ^Z
    Otherwise herewith an interesting metalink note. Doc ID:      Note:437597.1
    Subject:      Ora-12154 When Executing Pro*Fortran Code Compiled With Oracle 10g.
    Hope this will also help you...
    Cheers
    Hubert

  • ORA-01034 when trying to create a database

    I successfully installed Oracle 8.1.7 on Solaris 8, but when I tried creating a database (by executing sql<SID>.sh after I ran "dbassist"), this error appeared:
    ORA-01034: Oracle not available.
    I could not use svrmgrl to do a startup because there is NO database.
    What services have to run before I can create a database?
    Thank you.
    null

    I chose "custom installation" and not to create a database during installation. There was no error when I installed the Oracle software and I modified the /etc/system (shmmax, shmmin, etc.) according to the Oracle documentation. After that, I used "dbassist" to create a database. Then the "ORA-01034: Oracle not available" appeared.
    I also tried to install Oracle with "Typical" option that is suppose to create the initial database for me. It also failed. The same error appeared when the 'Database Configuration Tools' were trying to create the database files.

Maybe you are looking for

  • Itunes freezes when i connect my ipod 5th gen

    im running itunes 9, but this also happenend on itunes 8.2+ so, i was wondering if anyone had a fix for this yet. it has been happening for a long time

  • Acrobat Distiller 9.0 closes after I load it : (

    Every time I manually open up Distiller 9.0 after it loads and goes to the Distiller screen, it automatically closes! It was working fine and I don't really use Distiller often so I am not sure when it started but does anyone know what I can do other

  • Printing of Payment advice for Payments done by TT(Bank Transfers)

    Hi Any standard Tcode available for taking print of Payment Advice for payments made through bank transfers like TT to our vendors. Kindly share as we have std Tcode FBZ5 for printing of payment advice for payments done through Checks thanks & regard

  • SIP CUBE - unable dial extension from Unity CH

    Hello, I have stumbled on an issue.  We have a site running SIP services and I have a 2911 Cisco router running CUBE.  There is a DID on the SIP service that points to a Unity Call Handler.  When I hit the greeting for that Unity Call Handler and the

  • My Setting won't stay! (open new windows in a new tab instead)

    I m currently using Firefox 5.0 Korean version. Everytime i un-check the "open new windows in a new tab instead" option, after a while, it gets checked again somehow. I tried clearing cookies and un-installing all the addons, but it keeps being check