Solved Oracle error:Ora-00162 external dbid 17 is greater then max(16)

Posted on 2006-04-05
Last Modified: 2008-03-17
We are having a problem I am getting the above error when I try to connect to an oracle database.  I have no idea why this is happening. The connection works fine on my machine but when I build a setup project and install on another machine I get the error above.  Am I missing a step when I created the setup project?  My oracledatareader below works fine in debug mode, but not when install it.  I tried everything I can think of.  Any ideas?

Imports System.Data.OracleClient

  Dim oracleconn As OracleConnection = New OracleConnection("Data; User ID=xxxxxxxxx; Password=xxxxxxxx;") ' production database

  Function runtotal(ByVal sval As String, ByVal lhold As Label)
        Dim dr As OracleDataReader
        Dim cmd As OracleCommand
        SyncLock oracleconn
                cmd = New OracleCommand(sval, oracleconn)
                dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
                While dr.Read
                    lhold.Text = dr.GetInt32(0)
                End While
            Catch ex As Exception
            End Try
        End SyncLock
    End Function
Question by:tentavarious
    LVL 14

    Accepted Solution

    ORA-00162: external dbid length string is greater than maximum (string)
    Cause: An external database name with too large a length field was passed in.
    Action: Report the problem to your external transaction coordinator vendor.

    Another person with the problem:

    So it's an oracle problem caused by you databasename or tablename which is too long. In your case it's 17 characters long, while only 16 characters are allowed to be used.

    Author Comment

    Ok, but why does it work fine in my debug application and also it works with sql plus.  The only time it doesnt work is when i create the setup project and install the application on another computer.
    LVL 14

    Expert Comment

    Are you connecting to the same database and are debug and release build settings the same?

    Author Comment

    Yes on the first one, and I am not sure on the second one.  Alls I do to release is change debug to release then build the project.  What settings if any would i have to set manually?
    LVL 14

    Expert Comment

    None, that's why I am asking :). Try writing some parameters (database name, connection string, etc) and data into a txt file during both release and debug build and look if there are any differences. You could also write it to the event log.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now