English 中文(简体)
Sybase Internal Error 30016
原标题:Sybase Internal Error 30016

Database server is migrated from version 12.5x to version 15.03 Sybase.Data.AseClient version - 1.15.50.0

当我很少通过储存程序时,我就没有例外。 净额(使用AseClient)

Internal Error :30016 Unknown Dataitem Dataitem

Stack Trace - 

   at Sybase.Data.AseClient.AseDataReader.CheckResult(Int32 res)
   at Sybase.Data.AseClient.AseDataReader.RetrieveNextResult()
   at Sybase.Data.AseClient.AseDataReader.GetNextResult()
   at Sybase.Data.AseClient.AseDataReader.NextResult()
   at Sybase.Data.AseClient.AseDataReader.CloseUrsHandle()
   at Sybase.Data.AseClient.AseDataReader.Close()
   at Sybase.Data.AseClient.AseDataReader.Dispose(Boolean disposing)
   at Sybase.Data.AseClient.AseDataReader.Dispose()
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
   at HSBC.STPMapper.SybaseDAL.Utilities.SybaseHelper.ExecuteDataset(CommandType commandType, String commandText, DataSet dataset, String table, AseParameter[] commandParameters) in C:UtilitiesSybaseHelper.cs:line 119

注 - 申请在我们迁移到新服务器之前进行罚款。

最佳回答

我们正在处理这个问题时,根据“NET”框架3.5,使用Sybase.Data.AseClient.dll(第1.1.510.0页)将我们的生产服务器从12.5升至15。 所有产品在经过升级后在开发区和测试环境中运作良好,但生产失败,尽管协会的典型守则和电力公司代码能够称作生产Sybase服务器(大遗产系统)。

如果我试图用<<>Read方法”来做单一记录,那么一切都是罚款的。 但是,如果我们允许阅读所有记录,那么,如果你通过Sybase Advandage客户援引所储存的程序,那么在67个记录中,只有22个记录可以检索。 我把它推倒为一线大指挥线,以复制这一问题。 此处是Read上的错误细节:

Type: Sybase.Data.AseClient.AseException
Message: Internal Error: 30016
StackTrace:    at Sybase.Data.AseClient.AseDataReader.?(Int32 A_0)
   at Sybase.Data.AseClient.AseDataReader.?(Boolean A_0)
   at Sybase.Data.AseClient.AseDataReader.?()
   at Sybase.Data.AseClient.AseDataReader.Read()
   at SybaseError.Program.TestCall(String friendlyName, String connectionString)
 in C:ProjectsSybaseUpgradeErrorSybaseErrorProgram.cs:line 42

假设你宣布<> IDataReader /AseDataReader in a using/2005/4, 当读者从处发现的原始错误时,你实际上会遇到以下错误: 见:

Type: Sybase.Data.AseClient.AseException
Message: Internal Error: 30016
StackTrace:    at Sybase.Data.AseClient.AseDataReader.?(Int32 A_0)
   at Sybase.Data.AseClient.AseDataReader.?(Boolean A_0)
   at Sybase.Data.AseClient.AseDataReader.?()
   at Sybase.Data.AseClient.AseDataReader.?()
   at Sybase.Data.AseClient.AseDataReader.?(Boolean A_0)
   at Sybase.Data.AseClient.AseDataReader.NextResult()
   at Sybase.Data.AseClient.AseDataReader.?()
   at Sybase.Data.AseClient.AseDataReader.Close()
   at Sybase.Data.AseClient.AseDataReader.?(Boolean A_0)
   at Sybase.Data.AseClient.AseDataReader.Dispose()
   at SybaseError.Program.TestCall(String friendlyName, String connectionString)
 in C:ProjectsSybaseUpgradeErrorSybaseErrorProgram.cs:line 54

请注意Dispose方法 AseDataReader正在提出一个例外,这是一个很大的禁区。 更糟糕的是,如果你把这一例外作为AseException,并在 Errors的收集财产上收回,那么阅读这些例外情况就会成为例外情况。 很明显,对AseError物体的特性进行检查,实际上在试图从积极联系看事情的财产中援引一些动态代码。 我对Sybase这一版本尤其印象深刻。 NET客户代码。

这个问题 down到生产服务器上不同于发展中国家和测试服务器的包装大小。 我没有获得行政服务,但我认为,它们被安排到2048年,在杰夫和测试服务器上达到最大4096年,但在生产服务器上,其最小和最高都设定为4096。 根据我对会议呼吁的回顾,你的微笑可能有所不同。 我只是想在此指出,如果它后来帮助了其他人的话。 我们把这个问题 track倒在一边。 改变最低包装尺寸和重新配置生产数据库服务器确实为我们解决问题。

如果是这样的话,这里我就在连接线上看到了青.。 同样,在底部的评议线如果不处理,就会犯错误。 希望能帮助你们!

using System;
using System.Data;
using Sybase.Data.AseClient;

namespace SybaseError
{
    public class Program
    {
        public static void Main(string[] args)
        {
            const string DevelopmentConnection = "Data Source= ********** ;Port= **** ;UID= ********** ;PWD= ********** ;Database= ********** ;";
            const string ReportConnection = "more secret stuff";
            const string ProductionConnection = "yet more secret stuff";

            TestCall("Development", DevelopmentConnection);
            TestCall("Report", ReportConnection);
            TestCall("Production", ProductionConnection);

            Console.ReadKey();
        }

        private static void TestCall(string friendlyName, string connectionString)
        {
            Console.WriteLine("Calling procedure on " + friendlyName + ".");

            int recordsRead = 0;

            try
            {
                using (var connection = new AseConnection(connectionString))
                {
                    connection.Open();

                    using (var command = connection.CreateCommand())
                    {
                        ConfigureCommand(command);

                        using (var reader = command.ExecuteReader(CommandBehavior.CloseConnection))
                        {
                            try
                            {
                                while (reader.Read())
                                {
                                    // Would usually read things here...
                                    recordsRead++;
                                }
                            }
                            catch (Exception exRead)
                            {
                                Console.WriteLine("Error on read:");
                                ShowError(exRead);
                                throw;
                            }
                        }
                    }
                }

                Console.WriteLine("Success calling procedure on " + friendlyName + ".");
            }
            catch (Exception ex)
            {
                Console.WriteLine("Outer error:");
                ShowError(ex);
                Console.WriteLine("Failure calling procedure on " + friendlyName + ".");
            }

            Console.WriteLine("Finished calling procedure on " + friendlyName + ".  Read " + recordsRead + " records.");
            Console.WriteLine(string.Empty);
        }

        private static void ConfigureCommand(AseCommand command)
        {
            command.CommandText = "sp_s_educator_route_tests";
            command.CommandType = CommandType.StoredProcedure;

            var spidParameter = new AseParameter("@spid", AseDbType.Integer);
            spidParameter.Value = 1355945;
            command.Parameters.Add(spidParameter);

            var vendorIdParameter = new AseParameter("@vendor_id", AseDbType.Integer);
            vendorIdParameter.Value = 1;
            command.Parameters.Add(vendorIdParameter);
        }

        private static void ShowError(Exception ex)
        {
            Console.WriteLine("Type: " + ex.GetType());
            Console.WriteLine("Message: " + ex.Message);
            Console.WriteLine("StackTrace: " + ex.StackTrace);

            var exAse = ex as AseException;

            if (exAse != null)
            {
                //foreach (AseError error in exAse.Errors)
                //{
                //    Console.WriteLine("SqlState: " + error.SqlState);
                //    Console.WriteLine("State: " + error.State);
                //}
            }
        }
    }
}
问题回答

查阅this;与你一样,认为Sybase现在更令人不安。

你可能想检查几个问题。 首先,当值NOT NUL的小型工作时,你会发现这一错误。 如果是的话,你可以改变它,看看它是否解决问题。 第二,如果8192试图将其降至4096,则对ODBC DSN包装大小进行考察。

我希望它能够提供帮助。





相关问题
Linq 2 Sybase ASE database? What are the options?

I have a need to query an existing Sybase ASE database and would like to use Linq syntax for my data retrival. I don t need write access, nor do I need the full set of Linq operators, just Select(), ...

ASE Sybase BLOB

hi I want to write a file into a column of a blob data type,can some one pls send me the syntax for it. Appreciate if you could also send me the syntax for retrieving the file while doing the select ...

Sybase JConnect: ENABLE_BULK_LOAD usage

Can anyone out there provide an example of bulk inserts via JConnect (with ENABLE_BULK_LOAD) to Sybase ASE? I ve scoured the internet and found nothing.

About Sybase image

Does image data type be converted to byte array in sybase? I apply web service to get data set in sybase( image data type). I use byte[] to get returning of web service. Then i use the "response....

热门标签