Converting from MDF to SQL Server 2008 Database Project

Jul 20, 2010 at 4:07 PM

Joe,

        I'm trying to extend and learn more from your sample by taking the .MDF file and converting it to a SQL Server 2008 Database Project in Visual Studio. Once I've created the Database Projects and I import the tables and schema I attempt to build the database and am getting the following error:

 C:\SpyWorks\SpyWorks.Commerce\sql\debug\SpyWorks.Commerce.sql(76,0): Error SQL01268: .Net SqlClient Data Provider: Msg 15401, Level 16, State 1, Line 1 Windows NT user or group 'JHSW500B\Joe Stagner' not found. Check the name again.
    An error occurred while the batch was being executed.
   Done executing task "SqlDeployTask" -- FAILED.
  Done building target "DspDeploy" in project "SpyWorks.Commerce.dbproj" -- FAILED.
Done executing task "CallTarget" -- FAILED.
Done building target "DBDeploy" in project "SpyWorks.Commerce.dbproj" -- FAILED.
Done building project "SpyWorks.Commerce.dbproj" -- FAILED.

Where is 'JHSW500B\Joe Stagner' set and how can I change this account?

 

Coordinator
Jul 20, 2010 at 6:50 PM

Try opening it in SQL Manager when logged in as admin via Windows Authentication

-Joe

Aug 2, 2010 at 12:40 PM

Remember to "Unblock" the database before migrating it to your project, and as Joe said open it with the manager and make sa as owner among Network sevices and you among the admins. Then save it, detach it, open it again and if you wanted take the privilage of ownership away from JHS\Joe Stagner. But the most important thing is to omit the user instance from the Commerce.MDF connection string and add a localsqlserver connection in your web.config.

Check out the strings in the CommerceDB thread.

Hope this will help.