Error migrating Orchard SQL CE to SQL Server using Web Matrix Database Migration

Nov 27, 2012 at 7:15 PM

I am trying to migrate an Orchard SQL CE database to SQL Server ing Web Matrix database Migration.  I am getting the following error when I run the migration:

Looks like the generated migration script comes up with a very long name:

 The identifier that starts with 'Downplay_Orchard_LayoutSelector_LayoutSelectorPartRecord_PK__Downplay_Orchard_LayoutSelector_LayoutSelectorPartRecord__000000000' is too long. Maximum length is 128.

Any ideas on how I can fix this issue.

 

 

An error occurred during execution of the database script. The error occurred between the following lines of the script: "16175" and "16180". The verbose log might have more information about the error. The command started with the following:
"ALTER TABLE [dbo].[Downplay_Orchard_LayoutSelector"
 The identifier that starts with 'Downplay_Orchard_LayoutSelector_LayoutSelectorPartRecord_PK__Downplay_Orchard_LayoutSelector_LayoutSelectorPartRecord__000000000' is too long. Maximum length is 128. http://go.microsoft.com/fwlink/?LinkId=178587  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SQL_EXECUTION_FAILURE.

Microsoft.Web.Deployment.DeploymentDetailedClientServerException: An error occurred during execution of the database script. The error occurred between the following lines of the script: "16175" and "16180". The verbose log might have more information about the error. The command started with the following:
"ALTER TABLE [dbo].[Downplay_Orchard_LayoutSelector"
 The identifier that starts with 'Downplay_Orchard_LayoutSelector_LayoutSelectorPartRecord_PK__Downplay_Orchard_LayoutSelector_LayoutSelectorPartRecord__000000000' is too long. Maximum length is 128. http://go.microsoft.com/fwlink/?LinkId=178587  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_SQL_EXECUTION_FAILURE. ---> System.Data.SqlClient.SqlException: The identifier that starts with 'Downplay_Orchard_LayoutSelector_LayoutSelectorPartRecord_PK__Downplay_Orchard_LayoutSelector_LayoutSelectorPartRecord__000000000' is too long. Maximum length is 128.
   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.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)
   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.Web.Deployment.DBStatementInfo.Execute(DbConnection connection, DbTransaction transaction, DeploymentBaseContext baseContext, Int32 timeout)
   --- End of inner exception stack trace ---
   at Microsoft.Web.Deployment.DBStatementInfo.Execute(DbConnection connection, DbTransaction transaction, DeploymentBaseContext baseContext, Int32 timeout)
   at Microsoft.Web.Deployment.DBConnectionWrapper.ExecuteSql(DBStatementInfo sqlStatement, DeploymentBaseContext baseContext, Int32 timeout)
   at Microsoft.Web.Deployment.SqlScriptToDBProvider.AddHelper(DeploymentObject source, Boolean whatIf)
   at Microsoft.Web.Deployment.SqlScriptToDBProvider.Add(DeploymentObject source, Boolean whatIf)
   at Microsoft.Web.Deployment.DeploymentObject.AddChild(DeploymentObject source, Int32 position, DeploymentSyncContext syncContext)
   at Microsoft.Web.Deployment.DeploymentSyncContext.HandleAddChild(DeploymentObject destParent, DeploymentObject sourceObject, Int32 position)
   at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
   at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
   at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildrenOrder(DeploymentObject dest, DeploymentObject source)
   at Microsoft.Web.Deployment.DeploymentSyncContext.SyncChildren(DeploymentObject dest, DeploymentObject source)
   at Microsoft.Web.Deployment.DeploymentSyncContext.ProcessSync(DeploymentObject destinationObject, DeploymentObject sourceObject)
   at Microsoft.Web.Deployment.DeploymentObject.SyncToInternal(DeploymentObject destObject, DeploymentSyncOptions syncOptions, PayloadTable payloadTable, ContentRootTable contentRootTable, Nullable`1 syncPassId)
   at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentProviderOptions providerOptions, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
   at Microsoft.Web.Deployment.DeploymentObject.SyncTo(String provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
   at Microsoft.Web.Deployment.DeploymentObject.SyncTo(DeploymentWellKnownProvider provider, String path, DeploymentBaseOptions baseOptions, DeploymentSyncOptions syncOptions)
   at Microsoft.WebMatrix.DatabaseManager.Client.SqlCeHelper.<>c__DisplayClass8.<StartMigrate>b__7(Object sender, DoWorkEventArgs eventArgs)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

Nov 28, 2012 at 7:16 AM

You are posting in the wrong place. This codeplex site is for the Orchard Forum Module, you have a general Orchard question, so you should post it on the general Orchard site.