Any ideas what the issue here is. It fails immediately in 30 seconds after i click on import. It seems to be failing at following line but i am not sure what to do to resolve it. I am getting out of ideas.
Microsoft.Crm.Setup.Database.DatabaseUtility.GrantReportingAccess(InstallDatabase database, String user)
In the event viewer it is showing
Query execution time of 30.0 seconds exceeded the threshold of 10 seconds. Thread: 28; Database: imaginedev1_MSCRM; Server:SECDEVCRMADM18; Query: declare @name nvarchar(128)
declare c cursor local for select name
from sysobjects where xtype = 'V' and name like 'Filtered%'
open c fetch c into @name
while @@fetch_status = 0
begin
execute ('grant select on [' + @name + '] to [' + 'SECDEV\ReportingGroup {186d38ae-fd7a-422b-9863-68ea93683edb}' + ']')
fetch c into @name
end
close c deallocate c.
---------------------------- LOG -------------------------
16:18:07| Info| multipleTenancy for the deployment is True
16:18:07| Info| Update Organization...
16:18:07| Info| Setting Org version in config database
16:18:07| Info| Org version successfully set in config database
16:18:07| Info| Recreating full text catalog
16:18:07| Info| Dropping full text indexes
16:18:08| Info| Recreating full text indexes using locale Id "1033"
16:18:09| Info| Full text catalog successfully created
16:18:09| Info| Granting access to CRM security groups for the deployment
16:18:39| Error| Import Organization (Name=imaginedev1, Id=c0452d3f-f38c-e311-9055-005056b30a6d) failed with Exception:
System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
at System.Data.SqlClient.SqlConnection.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.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command, Boolean capturePerfTrace)
at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at Microsoft.Crm.DatabaseInstaller.Common.SharedDatabaseUtility.GrantReportingAccess(CrmDbConnection connection, String user)
at Microsoft.Crm.Setup.Database.DatabaseUtility.GrantReportingAccess(InstallDatabase database, String user)
at Microsoft.Crm.Setup.Database.Helpers.GrantReportAccess(String user, String privReportingGroup, Guid organizationId, Boolean replaceExistingUser)
at Microsoft.Crm.Setup.Database.DatabaseUtility.grantAccessInternal(String sqlAccessGroup, String reportingGroup, String privReportingGroup)
at Microsoft.Crm.Setup.Database.DatabaseUtility.GrantAccess(String sqlAccessGroup, String reportingGroup, String privReportingGroup)
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.GrantAccessOnCrmSecurityGroups(Guid organizationId, String sqlAccessGroupName, String reportingGroupName, String privilegedReportingGroupName)
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.UpdateOrganizationInfo(Guid organizationId, OrganizationGroupsInfo organizationInfo, String organizationFriendlyName, String organizationUniqueName, Uri reportServerUrl, Int32 PercentUpdateOrganization, ICollection`1 users)
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Import(Guid organizationId, String organizationUniqueName, String organizationFriendlyName, String sqlServerName, String databaseName, Uri reportServerUrl, ICollection`1 users, MultipleTenancy multipleTenancy, Int32 fullTextSearchLocaleId)
ClientConnectionId:4e41ce52-f885-4be3-929c-ed192e3c1a5a
16:18:39| Info| GetDBUpdateRevisionThresholdForServer(): Threshold = 3557.
16:18:39| Error| Import Organization (Name=imaginedev1, Id=c0452d3f-f38c-e311-9055-005056b30a6d) failed with Exception:
System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
at System.Data.SqlClient.SqlConnection.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.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command, Boolean capturePerfTrace)
at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
at Microsoft.Crm.DatabaseInstaller.Common.SharedDatabaseUtility.GrantReportingAccess(CrmDbConnection connection, String user)
at Microsoft.Crm.Setup.Database.DatabaseUtility.GrantReportingAccess(InstallDatabase database, String user)
at Microsoft.Crm.Setup.Database.Helpers.GrantReportAccess(String user, String privReportingGroup, Guid organizationId, Boolean replaceExistingUser)
at Microsoft.Crm.Setup.Database.DatabaseUtility.grantAccessInternal(String sqlAccessGroup, String reportingGroup, String privReportingGroup)
at Microsoft.Crm.Setup.Database.DatabaseUtility.GrantAccess(String sqlAccessGroup, String reportingGroup, String privReportingGroup)
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.GrantAccessOnCrmSecurityGroups(Guid organizationId, String sqlAccessGroupName, String reportingGroupName, String privilegedReportingGroupName)
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.UpdateOrganizationInfo(Guid organizationId, OrganizationGroupsInfo organizationInfo, String organizationFriendlyName, String organizationUniqueName, Uri reportServerUrl, Int32 PercentUpdateOrganization, ICollection`1 users)
at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Import(Guid organizationId, String organizationUniqueName, String organizationFriendlyName, String sqlServerName, String databaseName, Uri reportServerUrl, ICollection`1 users, MultipleTenancy multipleTenancy, Int32 fullTextSearchLocaleId)
ClientConnectionId:4e41ce52-f885-4be3-929c-ed192e3c1a5a