I have installed, activated Windows 8 Professional version.  The afferent patches have been applied.

When installing Visual Studio 2012 ultimate version. I got the following error.

Visual Studio Ultimate 2012 Setup Blocked

Visual Studio Ultimate 2012 Setup Blocked

By default the fast startup is turned on. Machine starts up faster after shutting down.

This feature is also known as Hybrid Boot or Hybrid Shutdown, it is a form of hibernate.

In order to fix the VS studio setup blocked error I disable the fast startup. For now I intent not to use the this feature.

When loading large files – over 100MB with  Sql Server Management Studio 2008 you might get the following error:

Error HRESULT E_FAIL has been returned from a call to a COM component. (mscorlib)  

Large scripts run better with sqlcmd.exe.  Here are some of the parameters for sqlcmd.exe:

Sqlcmd [-U login id] [-P password]
[-S server] [-H hostname] [-E trusted connection]
[-d use database name] [-l login timeout] [-t query timeout]
[-h headers] [-s colseparator] [-w screen width]
[-a packetsize] [-e echo input] [-I Enable Quoted Identifiers]

Here is how I ran  mine:

sqlcmd -S .\MYSQLSERVER2008 -U MyUsername -P MyPassword -i C:\Database\hugescript.sql

My huge script file was 1.5GB.  More  on sqlcmd can be found at Microsoft site.

The command line does a better job managing the memory.

Conclusion is:  run larger files with sqlcmd.

Step by step procedure of how to move MSSQL Server Express App_Data files to SQL Server 2008 R2.

Current environment settings are MSSQL Server Express and SQL Server 2008 R2.

This particular move process is done on the MVC Music app sample from Microsoft, but it works the same way on any Web application.
Some Hints:

  • Make sure that Application is not open VS2010 in my case – no handles on the files to be moved.
  • One database has to two files ( MDF and LDF).

Start here:

  • Go to Application folder i.e. my case is D:\Projects\MvcMusicStore\App_Data and find the files to be transferred like the ones bellow:
  • Next step is to go to the target folder where SQL 2008R2 stores data base files.
  • Open SQL Server Management Studio. Download it from here if you don’t have it  installed.
  • Connect to the target server with the appropriate username and password, preferably the sa password.
  • Right click Database folder and select Attach…
  • On the next pop up window by selecting Add.
  • The Location of Database files is specified on the picture bellow. In my case : C:\Program Files\Microsoft SQL Server\MSSQL10_50.DEEQLSERVER2008\MSSQL\DATA
  • Press Cancel.
  • At this point stop the service of the 2 instances MSSQL server 2008 R2 and MSSQL Server Express.
  • Copy the files from App_Data and paste them into:
  • C:\Program Files\Microsoft SQL Server\MSSQL10_50.DEEQLSERVER2008\MSSQL\DATA .
  • Right click Database folder and select Attach…
  • Click on the MDF file name to be attached.
  • When the attachment process is done Click OK.
  • The name of the attached database is the file path, rename to a better one.

First part is done. Now we have to change to web.config file.

Note Line 4 and 5.

    <add name="ApplicationServices" 
    	connectionString="data source=.\SQLEXPRESS;
    	Integrated Security=SSPI;
    	User Instance=true" providerName="System.Data.SqlClient" />
    <add name="WebStoreEntities" 
    	provider connection string=&quot;
    	Data Source=.\SQLEXPRESS;
    	Integrated Security=True;
    	User Instance=True;
    	providerName="System.Data.EntityClient" />

Below the new connection string. Pay attention at  line 4,  5,  7, 8, 9, 10.

    <add name="ApplicationServices" connectionString="data source=.\MYSQLSERVER2008;           
         Initial Catalog=aspnetdb;           
         User ID=myUserName;           
         providerName="System.Data.SqlClient" />
    <add name="MusicStoreEntities" connectionString="data source=.\MYSQLSERVER2008;        
         initial catalog=Mvc3Music;               
         User ID=myUserName;               
         providerName="System.Data.SqlClient" />


Also, make sure that <system.web> node has the following:

<authentication mode="Forms">
      <forms loginUrl="~/Account/LogOn" timeout="2880" />

  	<clear />
	    <add name="AspNetSqlMembershipProvider" 
	    applicationName="/" />

  	<clear />
    <add name="AspNetSqlProfileProvider" 
    applicationName="/" />

<roleManager enabled="true">
  	<clear />
    <add connectionStringName="ApplicationServices" 
      type="System.Web.Security.SqlRoleProvider" />
      <add applicationName="/" 
      type="System.Web.Security.WindowsTokenRoleProvider" />