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?

Thursday, March 22, 2012

SQL Azure gets a booster shot from an Australian SaaS Provider


Australia based SaaS provider Movideo is dumping its open source based cloud provider (based on the LAMP stack) and going with Microsoft Azure to improve performance of the company's bottom line.

Movideo is not so hot on either Google or Amazon for they lack certain features of Microsoft's Azure Cloud platform. With this Movideo will try to extend its wings and fly beyond its present Asia-Pacific region.

It appears Movideo has started migrating the hugh amount of data from its previous implementation and it may take almost half a year to port all the data.

With this the Azure Platform is sure to become more attractive for other similar customers. SQL Azure's administration features; and its close knit interactity with SQL Server; and synchronization services available on a global scale were some of the compelling features of the Azure platform that provided the motivation.

Do not forget to read more here & here. Perhaps the stocks of Microsoft and Akamai will begin to rise.

Do not forget to get a copy of my comprehensive book on SQL Azure here.


Wednesday, March 21, 2012

Visual Studio 11 Beta has lotsa stuff

Sorry for using a slang, but Visual Studio 11 Beta has lots of project types / templates.

Basically you have 3 ways to access projects. You can access recent projects, or use installed templates or download from online links. You do all these from within the IDE.
You will find the projects you have created under recent projects and perhaps you may be able to limit the items you want to see here. Let’s see later if this is indeed possible.


The installed templates are really huge. You have almost everything you want here. LightSwitch, Silverlight, MVC, Cloud, everything that Microsoft has pursued (dreamed up) so assiduously in all these years since the advent of ASP.NET in the 2000's.  Extensibility, Setup and Deployment projects are not left out either. I think this is pretty comprehensive and perhaps will keep me burning the proverbial mid-night oil. I hope the use of these programs is as free of problems as the installation. Even SQL Server Database projects are available under the ‘Other Languages’' node. Here is a screen shot of what you find here. Observe all the fancy new icons. Hey! Who said the UI is not pretty, I was tired of the blue look and this is a welcome change.

You can also access projects on the internet which you find on the internet option as shown here.


More on the intersting stuff later. So long.

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