Migrating from EPiServer 4.62 to CMS 5 R2: Login failed for user ''

Vote:
 

Hi,

I'm using the Migration Tool v 1.1 to migrate a site from version 4.62 to CMS 5 R2. The database is located on a server in a domain, and I'm doing the migration on my local machine (which is in the same domain).The server is SQL Server 2005 and I have SQL Server 2005 Express locally. I have tried to follow all the instructions, new errors just keep showing up. I'm now stuck when the status bar is about 75% done.

The migration tool crashes after it has converted the database schema. This is my log (I have changed the server name etc to 'XXXXX'):

[30.07.2009 11:13:33][Information] Migration Started
[30.07.2009 11:13:33][Information] Migrating database 'XXXXX' on server 'XXXXX'
[30.07.2009 11:13:33][Information] Migration Started, current version of migration tool: 1.1.0.38
[30.07.2009 11:13:37][Information] Finished with execution of aspnet_regsql...
[30.07.2009 11:13:37][Information] Migrating users...
[30.07.2009 11:13:37][Information] Finished migrating users. Migrated 12 users
[30.07.2009 11:13:37][Information] Migrating Roles...
[30.07.2009 11:13:38][Information] Finished migrating roles. Migrated 3 roles
[30.07.2009 11:13:38][Information] Migrating Profile Properties...
[30.07.2009 11:13:38][Information] Finished Migrating Profile Properties. Total properties are 0
[30.07.2009 11:13:38][Information] Migrating Personalize Info such as FirstName, Email and etc....
[30.07.2009 11:13:38][Information] Finished Migrating Personalize Info such as FirstName, Email and etc... Total Users are 11
[30.07.2009 11:13:38][Information] Migrating Object Store...
[30.07.2009 11:13:38][Information] 10 % completed, 1(10)
[30.07.2009 11:13:40][Information] Finished migrating Object Store
[30.07.2009 11:13:40][Information] Migrating database data...
[30.07.2009 11:13:49][Information] Converting Custom Property's types and Assemblies...
[30.07.2009 11:13:50][Information] Source C:\Program Files\EPiServer\MigrationTool\AutoGenerateCustomProperty.cs built into D:\Projects\XXXXX\bin\AutoGenerateCustomProperty.dll successfully.
[30.07.2009 11:13:50][Information] Finished migrating database data
[30.07.2009 11:13:50][Information] Finalizing database schema...
[30.07.2009 11:13:56][Information] Finished finalizing database schema
[30.07.2009 11:13:57][Error] Migration terminated with error:
[30.07.2009 11:13:57][Error] System.Data.SqlClient.SqlException: Login failed for user ''. The user is not associated with a trusted SQL Server connection.
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
   at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
   at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
   at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at EPiServer.Migration.SqlDataAccess.ExecuteReplaceableSqlFile(StreamReader sqlStatements, Regex placeHolderRegex, MatchEvaluator placeHolderHandler, Boolean useIntegratedSecurity)
   at EPiServer.Migration.SqlDataAccess.ExecuteSqlFile(StreamReader sqlStatements, Boolean useIntegratedSecurity)
   at EPiServer.Migration.MigrationWorkflow.registerWorkflowScripts(Object sender, EventArgs e)
   at System.Workflow.ComponentModel.Activity.RaiseEvent(DependencyProperty dependencyEvent, Object sender, EventArgs e)
   at EPiServer.Migration.MigrationStepActivity.ExecuteHandler(Object sender, EventArgs e)
   at System.Workflow.ComponentModel.Activity.RaiseEvent(DependencyProperty dependencyEvent, Object sender, EventArgs e)
   at System.Workflow.Activities.CodeActivity.Execute(ActivityExecutionContext executionContext)
   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)
   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)
   at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
   at System.Workflow.Runtime.Scheduler.Run()


The error is: Login failed for user ''. The user is not associated with a trusted SQL Server connection. After googling and searching for a solution, I can't get things to work. I found something here: http://blogs.interakting.co.uk/brad/archive/2008/08/14/updating-episerver-version-login-failed-for-user.aspx that indicated that a solution could be to create a new sql user and use this instead, but the login I'm currently using is already an sql user. This blog, however, reffers to EPiServer Manager, and not the Migration Tool.

 Has anyone else had the same problem? And does anyone know how I can fix it? :)

 

#31448
Jul 30, 2009 15:56
Vote:
 

The user running the Migration Tool (same user you're logged in with) needs full access to the database. I think you can achieve this by:

  1. Create a new user locally (same username and password as the db sa account). 
  2. Add the new user to Administrators
  3. Login and run Migration Tool as this new user
#31768
Aug 11, 2009 14:08