Sunday, November 7, 2010

Failed to redeployment CRM organization

Failed to redeployment CRM organization and get the error message:


13:02:20
Error
Import Organization (Name=LeumiCim, Id=782be048-dde4-df11-968c-00145ebd47b6) failed with Exception:

System.InvalidOperationException: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.

at System.Data.SqlClient.SqlConnection.GetOpenConnection(String method)

at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command)

at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)

at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)

at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command)

at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate)

at Microsoft.Crm.CrmDbConnection.SetTransactionIsolationLevel(IsolationLevel il)

at Microsoft.Crm.CrmDbConnection.Dispose(Boolean disposing)

at Microsoft.Crm.SqlExecutionContext.Dispose(Boolean disposing)

at Microsoft.Crm.SqlExecutionContext.Dispose()

at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Import(Guid organizationId, String organizationUniqueName, String organizationFriendlyName, String sqlServerName, String databaseName, Uri reportServerUrl, String privilegedUserGroupName, String sqlAccessGroupName, String userGroupName, String reportingGroupName, String privilegedReportingGroupName, ICollection`1 users, MultipleTenancy multipleTenancy)



After check this error I got that the problem is missing temporary database for reporting service.

Reporting services contain 2 databases:

1. ReportServer

2. ReportServerTempDB

By mistake the database ReportServerTempDB.

To return the temporary database open "Report server Configuration"

.select "database setup" and press "New"





















This option creates the temp database after this process try to run again the redeployment tools.



Thanks,

Rami Heleg