Showing posts with label Visual Studio 2011 Beta. Show all posts
Showing posts with label Visual Studio 2011 Beta. Show all posts

Saturday, March 31, 2012

Developer targeted LocalDB installs with SQL Server Express 2012

LocalDB was first introduced in 'Denali' and it continues be simple compared to SQL Express and at the same time compatible with other editions of SQL Servers regarding APIs.
Please refer to following previous posts on how it could be used with VS2010:

http://hodentek.blogspot.com/2011/09/visual-studio-2010-does-not-support.html
http://hodentek.blogspot.com/2011/09/visual-studio-2010-does-support-localdb.html

So where does LocalDB position itself among the various SQL Server editions?

Well, it certainly does not have everything that the higher versions of SQL Servers have but it is an embeddable, small foot print database that you just spawn from your application and connect to a database file (type MDF which has an associated LDF) to work, without needing to go through a higher version of SQL Server. Of course you will only be developing what the LocalDB can provide. You will notice that SQL Server Compact server could also be connected to file based data (type SDF) but the LocalDB has full API capabilities of higher versions of SQL Server. With the Compact version you could only do a few things, certainly much less than what you can do with LocalDB. It has a larger foot print than SQL Server Compact but more powerful. Another difference is that LocalDB is a separate process while SQL Server compact is an in-proc DLL.

Get your full dose of SQL Server compact from the following links:
http://hodentek.blogspot.com/2011/01/sql-server-compact-problems.html
http://hodentek.blogspot.com/2010/07/sql-server-compact-35-with-sql-server.html
http://hodentek.blogspot.com/2008/07/sql-server-2008-rc0-and-visual-studio.html
http://hodentek.blogspot.com/2010/07/connecting-to-sql-server-ce-from-visual.html
http://hodentek.blogspot.com/2009/11/connecting-to-sql-server-compact-from.html
http://hodentek.blogspot.com/2010/08/are-you-ready-to-see-light-with.html
http://hodentek.blogspot.com/2008/04/new-data-flow-destinations-in-vs-2008s.html

These are some of the features that you may want to note while using LocalDB:

  • LocalDB is very easy to use and you can have as many applications as you like and have an instance of LocalDB with them. However you will be using the same sqlsrvr.exe to connect to a database file.
  • LocalDB can be started from SQLSrvr.exe in its installation folder but if the LocalDB has not started the application can start it if the application uses LocalDB. If the LocalDB is up, the application just connects to it. The connection is terminated when the application exits.
  • The instance of LocalDB has no database services; it stays as long as the application is on and goes out when the application exits. You will be connecting the LocalDB to a database in the application with a very easy connection path.
  • LocalDB can use the same APIs as SQL Server Express so that you can connect using the same client-side providers such as ADO.NET, ODBC, etc.
  • If the computer has multiple users each user can have his own LocalDB as described in the following post: http://blogs.msdn.com/b/sqlexpress/archive/2011/07/12/introducing-localdb-a-better-sql-express.aspx
In fact LocalDB can be installed and used by itself although it has no management capabilities. Follow this link to LocalDB Installer:
http://www.microsoft.com/betaexperience/pd/SQLEXPCTAV2/enus/default.aspx
You need to specify the version you want as shown here:















You can install it from command line as the next snippet shows:

msiexec /i SqlLocalDB.msi /qn IACCEPTSQLLOCALDBLICENSETERMS=yes

License is important. Note that LocalDB(x32) will not install on (x64) bit machines. Refer to Window Installer blogs to see the reason why.

An installation of SQL Server Express 2012 also installs a LocalDB as shown here for the (x64) version of SQL Server Express 2012 installed on a (x64) bit Windows 7 Home Premium running on a Toshiba Satellite 775 laptop with Intel core i7-2670QM @2.20GHZ and 8.00 GB memory.


Please refer to my books on SQL Servers which deal with all aspects of connecting to SQL Servers, SQL Server Compact and many other database products. You will also learn about SQL Server management, security; many aspects of Business Intelligence and creating applications that leverage SQL Servers:

http://www.packtpub.com/microsoft-visual-studio-lightswitch-business-application-development/book










https://www.packtpub.com/microsoft-sql-azure-enterprise-application-development/book



https://www.packtpub.com/learning-sql-server-2008-reporting-services/book






http://www.packtpub.com/sql-server-integration-services-visual-studio-2005/book

The SQL Server Express 2012 did install LocalDB but when I tried to run it from SqlSrvr.exe I was faced with this problem (see next figure). May be I need to reinstall or repair the SQL Server Express 2012. More of it in a future post. However connecting to SQL Express from Management Studio presented no problem. Right now I have only SQL Server Express 2012 but when I install Visual Studio 2011 Beta I will try creating an application that requires a LocalDB.



What was your experience?

Friday, March 16, 2012

Visual Studio 2011 Beta installation is unbelievably trouble free

Hats off to the team that packaged this! It went so smoothly, I was amazed.

Considering my rather messy old computer with many broken programs hanging around; the fact that I had managed to bring back the computer after most of my desktop items had disappeared and the fact that it was downloaded on an extremely flaky WIFI connection in a studio apartment with router located several hundred feet away, I would say it was the most problem free installation I have seen in years. However, believe me it took 2 whole days!!

You download the following file from here, http://www.microsoft.com/visualstudio/11/en-us/downloads:

You can either save or run. I saved it to the 'Downloads' directory and then double clicked the executable to start the process. The installation takes place in two stages; in the first, all the necessary programs are downloaded and in the second they are all installed. This may take considerable time depending on the speed of your connection and the condition of your computer. Mine was a 4 to 5 year old ASPIRE 4810TZ-4011 loaded with lots and lots of Microsoft and other stuff (a junkyard). It is an Intel 32-bit machine running Windows 7 Ultimate with 1.3 GHZ having 3.00 GB memory.

The installation added so much stuff into my ControlPanel / Programs /Programs and Features that I had to specially prepare the next figure that shows everything that got installed.



After the installation you may have to restart the computer to update all the added stuff. At this point perhaps you should create a restore point since all this is going to stay for a couple of months.
The installation also adds shortcuts to the various programs that you can start using to Start | All Programs as shown.




You just need to double click the Visual Studio 11 Beta shortcut in the above to start the program as shown which brings up the splash screen.




From here it takes quite a bit of time before you can start and you will be presented with the following screen where you choose your preferred environmental settings.



After choosing your settings the Start Visual Studio button gets enabled and now you click this. The user interface opens presenting the familiar windows with panels and the main menu. OK, now you can start programming.



DMCA.com Protection Status