Monday, 9 July 2012

Opening a SQL Server 2012 database in Visual Studio 2010

After installing SQL Server Express 2012 and using the SQL Server Management Studio to create a database, I found that I couldn't integrate SQL Express 2012 into the Visual Studio Server Explorer in a way that VS listed all my 2012 databases. VS would show databases from an earlier 2008 SQL Server I had installed on my PC but not the 2012 version.

The only way I could show the DB was to add a connection to a database file. To do this I had to:-

1. Right-click the Data Connections node in Server Explorer and choose Add Connection...

2. Make sure the Data Source field was set to SQL Server Client as shown in this pic.:




3. Then in Server name field type in the name of the new SQL Server Express 2012 instance. In the pic. above, the name of my server is SLIQSQL but for a default installation of SQL Server Express, the server name is likely to be SQLEXPRESS (I just chose a different name during the installation process).

4. Then press the Test Connection button. If all is well you should get a Connection Succeeded message.

5. Finally, choose the database you want to add in the Select or enter a database name field and press OK to close the dialog.

The chosen database should now show in the Server Explorer.

Where does SQL Server 2012 store database files by default?

If you're playing around with SQL Server 2012 and you've created a couple of databases, e.g. in SQL Server Management Studio, you may not actually know where the databases are stored as during the whole database creation process you don't get asked to specify a file path.

To find out where your database files are stored do the following:-

1. Open SQL Server Management Studio
2. Right click the server name in the Object Explorer pane on the left and choose Properties.
3. In the Properties dialog, choose Database Settings in the Select a Page pane on the left.

The database file locations are then shown on the right.


Saturday, 30 June 2012

VistaDB vs SQL Server Express for Multi-User apps

For the past 4 years I've been using VistaDB (version 3 or 4) in a number of development projects. For a SQL relational database with minimum dependencies, i.e. all it requires is the .Net framework, VistaDB is hard to beat and makes deployment as an embedded database real easy, adding little more than 1MB to an installer. Overall, as an embedded database in single user applications, I haven't found anything to compete with it.

VistaDB however does have a few drawbacks that make it unsuitable for larger, multi-user applications which means I'm now looking at using SQL Server Express in some new applications. VistaDB will still be a part of some of my future apps but not part of apps where I want to offer true multi-user capability.

In my experience, the key drawbacks of VistaDB for multi-user apps are:-

1. The lack of a client/ server model. Instead, each VistaDB client directly access the database file and Windows itself manages file locks and such. The result is that when 2 or more users try to access a database file simultaneously access times go through the roof and the app crawls along.

2. VistaDB's lack of paging support, e.g. something like MySQL's LIMIT, OFFSET commands, means that it is hard to avoid reading whole SQL tables of data from the DB to present in lists. Reading large amounts of data from a shared file can compound the Windows shared file performance drop from point 1.

3. In a multi-user app with concurrent access, SQL transactions are essential to ensure consistent updates across tables. Unfortunately, VistaDB transactions are extremely slow causing application performance to drop.

The points above aren't complaints about VistaDB - multi-user apps aren't what VistaDB is intended for. My only disappointment with VistaDB is that it's so good, I just wish there was a simple, easily deployable, client/ server version.

As I gain more experience with SQL Server Express, I'll try and list more pros and cons. One good tool I've found so far for use with SQL Server is OpenDBDiff. This is a free, open-source tool for comparing schemas of two different SQL Server databases and generating SQL scripts to make the schemas match. I can see this tool being essential to ease field upgrades of SQL Server DBs. With VistaDB today, I generate schema update code by hand, so it's a nice, early bonus to find an automatic way of doing this for SQL Server.

Saturday, 23 June 2012

Article Marketing Software

Article submission is still an efficient way to help boost the performance of a site in SERPs and is a good way of publicising information such as a new service or product you are offering. There are a number of good article submitters on the market including Article Marketing Robot and Article Demon. However, a new article submitter has recently been released - SliQ Article Submitter - by the developers of SliQ Submitter Plus.

SliQ Article Submitter lets you submit as many articles as you like to as many directories as you can find. Although the package comes with a small list of article directories you can easily add your own. The software supports Wordpress, Article Dashboard, MS and Setup amongst other scripts.



The new article marketing software follows a similar design to the familiar Microsft Office packages and with a clean, fresh layout the interface is designed to make article submission achievable even for those people who've never performed article marketing before. Even though the package is suitable for newcomers to SEO, the package still includes all the features a professional SEO will need including automatic account creation, automatic email verification and a live link checker allowing the user to build up a list or report of live articles. For the regular subumitter of articles there is also an in-built scheduler that lets the user queue up registration/ account creation, email confirmation, submission and even live link gathering tasks to be performed on a user-defined timescale or schedule.

To find out more about SliQ Article Submitter, check out the article submitter info at http://www.sliqsubmitter.com.