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

Posted on 2006-04-05
Medium Priority
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 Source=xxxxxx.xxxxxx.xxx; 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
  • 3
  • 2
LVL 14

Accepted Solution

existenz2 earned 2000 total points
ID: 16389741
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: http://www.dotnet247.com/247reference/msgs/33/166477.aspx

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

ID: 16391220
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

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

Author Comment

ID: 16392114
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

ID: 16398908
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month15 days, 15 hours left to enroll

850 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