Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Error when trying to restore a database from a backup using RoundhousE
Running RoundhousE v0.8.230.353 against (local) - IddealSuite.
Looking in C:\Dev\Iddeal\Database for scripts to run.
==================================================
Setup, Backup, Create/Restore/Drop
==================================================
Creating IddealSuite database on (local) server if it doesn't exist.
Restoring IddealSuite database on (local) server from path C:\Dev\Iddeal\Database\IddealSuite.bak.
RoundhousE encountered an error. You were running in a transaction though, so the database should be in the state it was in prior to this piece running. This does not include a drop/create or any creation of a database, as those items can not run in a transaction.
System.Data.SqlClient.SqlException: A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.WriteSni()
at System.Data.SqlClient.TdsParserStateObject.WritePacket(Byte flushMode)
at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest)
at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransaction(TransactionRequest transactionRequest, String name, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
at System.Data.SqlClient.SqlInternalConnection.BeginSqlTransaction(IsolationLevel iso, String transactionName)
at System.Data.SqlClient.SqlInternalConnection.BeginTransaction(IsolationLevel iso)
at System.Data.SqlClient.SqlConnection.BeginDbTransaction(IsolationLevel isolationLevel)
at System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransaction()
at roundhouse.databases.AdoNetDatabase.open_connection(Boolean with_transaction)
at roundhouse.migrators.DefaultDatabaseMigrator.open_connection(Boolean with_transaction)
at roundhouse.runners.RoundhouseMigrationRunner.run()
A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0
- No process is on the other end of the pipe.)
@hotgazpacho

This comment has been minimized.

Show comment Hide comment
@hotgazpacho

hotgazpacho Oct 20, 2011

Command line:
.\Lib\RoundhousE\console\rh.exe --databasename=IddealSuite --restore=true --restorefrompath=Database\IddealSuite.bak --sqlfilesdirectory=Database --schemaname=Iddeal --outputpath=DeployResults --withtransaction --debug --versionfile=Build_BuildInfo.xml

Owner

hotgazpacho commented Oct 20, 2011

Command line:
.\Lib\RoundhousE\console\rh.exe --databasename=IddealSuite --restore=true --restorefrompath=Database\IddealSuite.bak --sqlfilesdirectory=Database --schemaname=Iddeal --outputpath=DeployResults --withtransaction --debug --versionfile=Build_BuildInfo.xml

@ferventcoder

This comment has been minimized.

Show comment Hide comment
@ferventcoder

ferventcoder Oct 20, 2011

This looks like a problem in losing the connection.

--restoretimeout 1500 ?

Transport level errors occur when the connection is disposed and the item tries to use that connection. You see it alot in SSMS. This is a pretty nasty SQL Server bug where they say, just create a new connection.

This looks like a problem in losing the connection.

--restoretimeout 1500 ?

Transport level errors occur when the connection is disposed and the item tries to use that connection. You see it alot in SSMS. This is a pretty nasty SQL Server bug where they say, just create a new connection.

@hotgazpacho

This comment has been minimized.

Show comment Hide comment
@hotgazpacho

hotgazpacho Oct 20, 2011

Owner

hotgazpacho commented Oct 20, 2011

@ferventcoder

This comment has been minimized.

Show comment Hide comment
@ferventcoder

ferventcoder Oct 20, 2011

You can also pass a connection string instead to help identify if this is the issue:

--cs "Data Source=(local);Initial Catalog=IddealSuite;Integrated Security=SSPI;Pooling=false"

You can also pass a connection string instead to help identify if this is the issue:

--cs "Data Source=(local);Initial Catalog=IddealSuite;Integrated Security=SSPI;Pooling=false"

@ferventcoder

This comment has been minimized.

Show comment Hide comment
@ferventcoder

ferventcoder Oct 20, 2011

This is in the latest code right? Good to know that falling back to 0.8.0.300 fixed the issue.

This is in the latest code right? Good to know that falling back to 0.8.0.300 fixed the issue.

@hotgazpacho

This comment has been minimized.

Show comment Hide comment
@hotgazpacho

hotgazpacho Oct 20, 2011

Owner

hotgazpacho commented Oct 20, 2011

@ferventcoder

This comment has been minimized.

Show comment Hide comment
@ferventcoder

ferventcoder Oct 20, 2011

Try moving the go to it's own line and make sure it is not on the very first line in the file.

Also, take a look here for something that we added to the latest:
http://code.google.com/p/roundhouse/issues/detail?id=13&can=1&q=label%3AMilestone-Release0.8.5

Try moving the go to it's own line and make sure it is not on the very first line in the file.

Also, take a look here for something that we added to the latest:
http://code.google.com/p/roundhouse/issues/detail?id=13&can=1&q=label%3AMilestone-Release0.8.5

@ferventcoder

This comment has been minimized.

Show comment Hide comment
@ferventcoder

ferventcoder Oct 20, 2011

Also, take a look at some of the areas around restore that we are adding for the latest version: https://github.com/chucknorris/roundhouse/issues?labels=v0.8.5&sort=created&direction=desc&state=closed&page=1

Also, take a look at some of the areas around restore that we are adding for the latest version: https://github.com/chucknorris/roundhouse/issues?labels=v0.8.5&sort=created&direction=desc&state=closed&page=1

@ferventcoder

This comment has been minimized.

Show comment Hide comment
@ferventcoder

ferventcoder Oct 20, 2011

This is the list of closed issues on Google code that have been closed: http://code.google.com/p/roundhouse/issues/list?can=1&q=label%3AMilestone-Release0.8.5

This is the list of closed issues on Google code that have been closed: http://code.google.com/p/roundhouse/issues/list?can=1&q=label%3AMilestone-Release0.8.5

@ferventcoder

This comment has been minimized.

Show comment Hide comment
@ferventcoder

ferventcoder Oct 24, 2011

It's the transaction! In more recent versions there are two connections being set up, one admin on the master db and one normal on the regular db. It's trying to reuse a connection that is disposing...

It's the transaction! In more recent versions there are two connections being set up, one admin on the master db and one normal on the regular db. It's trying to reuse a connection that is disposing...

@ferventcoder

This comment has been minimized.

Show comment Hide comment
@ferventcoder

ferventcoder Oct 24, 2011

Freaking retarded, but there is a bug in SQL Server where it tries to reuse connections and fails miserably due to the connections in the pool being deconstructed when it is trying to get them.

This is how you get around: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.clearpool.aspx
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.clearallpools.aspx

Freaking retarded, but there is a bug in SQL Server where it tries to reuse connections and fails miserably due to the connections in the pool being deconstructed when it is trying to get them.

This is how you get around: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.clearpool.aspx
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.clearallpools.aspx

@ferventcoder

This comment has been minimized.

Show comment Hide comment
@ferventcoder

This comment has been minimized.

Show comment Hide comment
@ferventcoder

ferventcoder Oct 24, 2011

This should be fixed now for goodness sake... - chucknorris/roundhouse#26

This should be fixed now for goodness sake... - chucknorris/roundhouse#26

@ThomasMldr

This comment has been minimized.

Show comment Hide comment
@ThomasMldr

ThomasMldr May 18, 2016

running version 0.8.6 i still had some issues using the /withtransaction switch while trying to restore, don't know if this version should contain this fix?

running version 0.8.6 i still had some issues using the /withtransaction switch while trying to restore, don't know if this version should contain this fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment