Ошибка системы begin failed with sql exception

  • Remove From My Forums
  • Вопрос

  • Today i got to know about orchard, i downloaded it’s source code project.

    While execution this project in the getting started project, I am not able to go ahead !!

    I am trying to use this with sql server 2008 R2, already installed in my machine.

    I tried with various possible Connection strings —

    Data Source=localhost\MSSQLSERVER; Initial Catalog=Orchard;Persist Security Info=True;User ID= dds\divyadarshan;Password=dds@123

    Data Source= .\MSSQLSERVER; Initial Catalog=Orchard;Persist Security Info=True;User ID= dds\divyadarshan;Password=dds@123  

    I don’t know what’s the problem ? Do i need to create a data base manually ? Is there is any sql script that i need to execute ?

    Please suggest…

VSoft Technologies Forums

Loading

  • Remove From My Forums
  • Вопрос

  • Today i got to know about orchard, i downloaded it’s source code project.

    While execution this project in the getting started project, I am not able to go ahead !!

    I am trying to use this with sql server 2008 R2, already installed in my machine.

    I tried with various possible Connection strings —

    Data Source=localhostMSSQLSERVER; Initial Catalog=Orchard;Persist Security Info=True;User ID= ddsdivyadarshan;Password=dds@123

    Data Source= .MSSQLSERVER; Initial Catalog=Orchard;Persist Security Info=True;User ID= ddsdivyadarshan;Password=dds@123  

    I don’t know what’s the problem ? Do i need to create a data base manually ? Is there is any sql script that i need to execute ?

    Please suggest…

View unanswered posts | View active topics

Author Message

maxime

Post subject: begin failed with sql exception

PostPosted: Tue Jul 24, 2007 11:10 am 

Beginner
Beginner

Joined: Wed Mar 14, 2007 4:29 am
Posts: 33

Hello

i’m using Nhibernate and i have one problem:

When i do a rollback after an exception, it works but i can’t execute queries anymore.

I have the exception «begin failed with sql exception» when i want to begin a new transaction !

Any idea ? [/code]

Top

Profile  

marcal

Post subject:

PostPosted: Tue Jul 24, 2007 5:02 pm 

Expert
Expert

Joined: Fri May 13, 2005 11:13 am
Posts: 292
Location: Rochester, NY

The full exception might help. Also, are you discarding your Session and starting from scratch? This is important, because after an exception, a given Session is considered to be at least potentially corrupted. What happens if you begin a new transaction on a new Session?

Top

Profile  

maxime

Post subject:

PostPosted: Wed Jul 25, 2007 7:07 am 

Beginner
Beginner

Joined: Wed Mar 14, 2007 4:29 am
Posts: 33

rigth, it works if i do a session = factory.OpenSession(); when catching the exception….

thanks !

Top

Profile  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

© Copyright 2014, Red Hat Inc. All rights reserved.
JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.

We were receiving the following error, about a failed login. Recycling the application, pool by making an meaningless change to the web.config, fixed the error, and we could subsequently log in. The error may (or may not) have started after restoring the database from a backup. In any case, why would restarting the application pool fix the login failure?

2014-08-27 21:17:48,477 [10] Orchard.Tasks.BackgroundService - Error while processing background task    
NHibernate.TransactionException: Begin failed with SQL exception --->     
System.Data.SqlClient.SqlException: Cannot open database "some_database_name" requested by the login. The login failed.    
Login failed for user 'some_database_user'.    
This session has been assigned a tracing ID of 'aaa-aaa-aaa-aaa-aaa'.  Provide this tracing ID to customer support when you need assistance.    
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)       
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)       
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)       
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)       
   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)       
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)       
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)       
   at System.Data.SqlClient.SqlConnection.Open()       
   at Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.SqlAzure.ReliableSqlConnection.<Open>b__7()       
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()       
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)       
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction(Action action)       
   at Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.SqlAzure.ReliableSqlConnection.<Open>b__6()       
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()       
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)       
   at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction(Action action)       
   at Microsoft.Practices.EnterpriseLibrary.WindowsAzure.TransientFaultHandling.SqlAzure.ReliableSqlConnection.Open(RetryPolicy retryPolicy)       
   at NHibernate.SqlAzure.ReliableSqlDbConnection.Open()       
   at NHibernate.Connection.DriverConnectionProvider.GetConnection()       
   at NHibernate.AdoNet.ConnectionManager.GetConnection()       
   at NHibernate.Impl.SessionImpl.get_Connection()       
   at NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)       
   --- End of inner exception stack trace ---       
   at NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)       
   at NHibernate.Impl.SessionImpl.BeginTransaction(IsolationLevel isolationLevel)       
   at Orchard.Data.SessionLocator.RequireNew(IsolationLevel level)       
   at Orchard.Data.SessionLocator.RequireNew()       
   at Orchard.Tasks.BackgroundService.Sweep()

Also, we have a follow up question here: Site down: error log pattern of login failure x20, then invalid object name x20, then again login failure x20

Я только что перенесла свое приложение NHibernate с SQL Server на MySql. Кажется, все хорошо, но я получаю прерывистый TimeoutExceptions. Я могу найти много информации об этих тайм-аутах с MySql и даже одно сообщение в блоге о тайм-аутах с Hibernate + MySql + C3PO (что бы это ни было). Но ничего о том, как настроить NHib, чтобы остановить эту проблему. Знаете ли вы?

Вот трассировка стека:

NHibernate.TransactionException: Begin failed with SQL exception ---> System.TimeoutException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond ---> System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at MyNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   --- End of inner exception stack trace ---
   at MyNetworkStream.HandleOrRethrowException(Exception e)
   at MyNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at MySql.Data.MySqlClient.TimedStream.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
   at MySql.Data.MySqlClient.MySqlStream.ReadFully(Stream stream, Byte[] buffer, Int32 offset, Int32 count)
   at MySql.Data.MySqlClient.MySqlStream.LoadPacket()
   at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
   at MySql.Data.MySqlClient.NativeDriver.ReadOk(Boolean read)
   at MySql.Data.MySqlClient.NativeDriver.SetDatabase(String dbName)
   at MySql.Data.MySqlClient.Driver.SetDatabase(String dbName)
   at MySql.Data.MySqlClient.MySqlConnection.ChangeDatabase(String databaseName)
   at MySql.Data.MySqlClient.MySqlConnection.Open()
   at NHibernate.Connection.DriverConnectionProvider.GetConnection()
   at NHibernate.AdoNet.ConnectionManager.GetConnection()
   at NHibernate.Impl.SessionImpl.get_Connection()
   at NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)
   --- End of inner exception stack trace ---
   at NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)
   at NHibernate.Transaction.AdoTransaction.Begin()
   at NHibernate.AdoNet.ConnectionManager.BeginTransaction()
   at NHibernate.Impl.SessionImpl.BeginTransaction()

У меня проблема с обменом данными с базой данных Informix с помощью NHibernate, в течение ограниченного времени работает, но прошло определенное время, когда происходит ошибка.

Следуйте доказательствам ниже:

NHibernate.TransactionException: Begin failed with SQL exception ---> IBM.Data.Informix.IfxException: ERROR [08S01] [Informix .NET provider]Communication link failure.
   em IBM.Data.Informix.IfxConnection.BeginTransactionObject(IsolationLevel isolevel)
   em IBM.Data.Informix.IfxConnection.BeginTransaction(IsolationLevel isolevel)
   em IBM.Data.Informix.IfxConnection.System.Data.IDbConnection.BeginTransaction(IsolationLevel isolevel)
   em NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)
   --- Fim do rastreamento de pilha de exceções internas ---
   em NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)
   em NHibernate.Transaction.AdoTransaction.Begin()
   em NHibernate.Impl.SessionImpl.BeginTransaction()

NHibernate.TransactionException: Begin failed with SQL exception ---> IBM.Data.Informix.IfxException: ERROR [HY000] [Informix .NET provider][Informix]System error occurred in network function. 
   em IBM.Data.Informix.DBCWrapper..ctor(IfxConnection connection)
   em IBM.Data.Informix.IfxConnectionPool.IfxConnPoolNode..ctor(IfxConnection connection)
   em IBM.Data.Informix.IfxConnectionPool.OpenNewConnection(IfxConnection connection, ConnectionPoolType ConnPoolType)
   em IBM.Data.Informix.IfxConnectionPool.Open(IfxConnection connection)
   em IBM.Data.Informix.IfxConnPoolManager.Open(IfxConnection connection)
   em IBM.Data.Informix.IfxConnection.Open()
   em NHibernate.Connection.DriverConnectionProvider.GetConnection()
   em NHibernate.AdoNet.ConnectionManager.GetConnection()
   em NHibernate.Impl.SessionImpl.get_Connection()
   em NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)
   --- Fim do rastreamento de pilha de exceções internas ---
   em NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)
   em NHibernate.Transaction.AdoTransaction.Begin()
   em NHibernate.Impl.SessionImpl.BeginTransaction()
   em nddConnect.Client.EntryDocumentsComponent.NHibernate.Context.NHibernateSessionManager.Invoke(IMethodInvocation input, GetNextInterceptionBehaviorDelegate getNext)
   em Microsoft.Practices.Unity.InterceptionExtension.InterceptionBehaviorPipeline.Invoke(IMethodInvocation input, InvokeInterceptionBehaviorDelegate target)
   em DynamicModule.ns.Wrapped_IComponentFacade_b83011052f234f2b9e18ae4d34bd90cc.CaptureJobConfig(IDictionary`2 dicEntryConfigJob)
   em Connect.Client.EntryDocumentsComponent.Controller.EntryJobController.GetJob(Guid transportActionGuid); 

Я пробовал разные методы для симуляции ошибки, но все безрезультатно.

Я думаю, что это возможная задержка в базе данных после того, как что-то застряло в разделе.

Может ли кто-нибудь помочь мне?

2015-03-06 21:26

2
ответа

Решение

После изучения клиентской среды и журналов было обнаружено, что ошибка произошла из-за завершения резервного копирования по определенному графику, что вызвало нестабильность в банке, что привело к ошибке подключения, и после этого приложение не работает должным образом, необходимо перезапустить (сервис), благодарен за помощь

2015-03-25 12:06

Вы можете использовать драйвер DB2 Entity Framework для подключения к серверу Informix.
(Нет поддержки Entity Framework с использованием встроенного драйвера.NET Informix)
(На сервере IDS может потребоваться настроить порт DRDA для использования драйвера DB2 EF) Используя этот драйвер, вы сможете использовать команды LINQ.
LINQ является одним из альтернатив для NHibernate.

2015-03-09 23:52

View unanswered posts | View active topics

begin failed with sql exception

Author Message

maxime

Post subject: begin failed with sql exception

PostPosted: Tue Jul 24, 2007 11:10 am 

Beginner
Beginner



Joined: Wed Mar 14, 2007 4:29 am
Posts: 33

Hello

i’m using Nhibernate and i have one problem:

When i do a rollback after an exception, it works but i can’t execute queries anymore.

I have the exception «begin failed with sql exception» when i want to begin a new transaction !

Any idea ? [/code]

Top

Profile  

marcal

Post subject:

PostPosted: Tue Jul 24, 2007 5:02 pm 

Expert
Expert



Joined: Fri May 13, 2005 11:13 am
Posts: 292
Location: Rochester, NY

The full exception might help. Also, are you discarding your Session and starting from scratch? This is important, because after an exception, a given Session is considered to be at least potentially corrupted. What happens if you begin a new transaction on a new Session?

Top

Profile  

maxime

Post subject:

PostPosted: Wed Jul 25, 2007 7:07 am 

Beginner
Beginner



Joined: Wed Mar 14, 2007 4:29 am
Posts: 33

rigth, it works if i do a session = factory.OpenSession(); when catching the exception….

thanks !

Top

Profile  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

© Copyright 2014, Red Hat Inc. All rights reserved.
JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.

Понравилась статья? Поделить с друзьями:
  • Ошибка сетевой кабель не подключен что делать
  • Ошибка системы 601
  • Ошибка сетевой адаптер не имеет допустимых параметров ip
  • Ошибка синхронизации профиля
  • Ошибка сетевого шлюза