synnotech-ag / synnotech.mssqlserver Goto Github PK
View Code? Open in Web Editor NEWProvides common functionality for database access to MS SQL Server.
License: MIT License
Provides common functionality for database access to MS SQL Server.
License: MIT License
We run our tests nightly and sometimes one test fails because of a System.Data.SqlClient.SqlException in the method DropAndCreateDatabaseAsync
.
System.Data.SqlClient.SqlException : Only user processes can be killed.
Stack Trace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult)
at System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
at Synnotech.MsSqlServer.Database.ExecuteNonQueryAndDisposeAsync(SqlCommand command, CancellationToken cancellationToken)
at Synnotech.MsSqlServer.Database.ExecuteNonQueryAndDisposeAsync(SqlCommand command, CancellationToken cancellationToken)
at Synnotech.MsSqlServer.Database.DropAndCreateDatabaseAsync(String connectionString, CancellationToken cancellationToken)
at Synnotech.MsSqlServer.Database.DropAndCreateDatabaseAsync(String connectionString, CancellationToken cancellationToken)
Currently, we kill all database connections (more specifically, the user sessions) when we try to drop a database. While we do not need to check if a database exists, we might end up with non-user sessions that are still connected to the database after the kill command that prevent the drop of the database. We should switch to using SET SINGLE USER WITH ROLLBACK IMMEDIATE
instead.
Synnotech.MsSqlServer currently does not implement Synnotech.DatabaseAbstractions. We should change this and at least implement IAsyncSession
and IAsyncReadOnlySession
.
One of our users reported that while trying to detach, he encountered a SqlException
that the object is currently in use.
I will try to go to single-user mode instead of killing all connections to fix this issue. This never occurred in my tests.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.