Installing Microsoft SQL Server

There are many editions of SQL Server such as Express, Standard, Enterprise, Developer etc. BiSA will work on all of these platforms. However generally Express Editions are limited to 1GB memory utilization and maximum database size  is 10GB. Therefore, this is recommended that you employee Non-Express edition such as SQL Server 2008 R2 Developer Edition. You can get a free copy from  either http://www.dreamspark.com, if you are student, or SQL Sever 2008/2012 Web Edition from  http://www.microsoft.com/web/websitespark/. Most educational institution would have a licensed version under Microsoft Enterprise Agreement.

Otherwise free Express edition is available for everyone and could be downloaded from http://www.microsoft.com/sqlserver/en/us/editions/express.aspx. Download the database engine along with Microsoft SQL Server Management Studio (SSMS). SSMS is a visual tool to manage SQL Server. You can download SSMS for SQL Server 2008 R2 separately from http://www.microsoft.com/download/en/details.aspx?id=7593. SQL Server 2012 Express editions is shipped with SSMS.

During SQL Server database engine installation you will be asked to assign an instance name to this installation. I have named it ‘sqlexpress’ you can assign a different name, however, this name must match the name in the ConnectionString of the BiSA configuration file (BiSA.exe.config).

If you have installed SQL database engine and SSMS, run SSMS and restore BiSA database. Following screenshots are taken from SQL Server 2008 R2 edition, however, they are valid for latest 2012 edition.

Restoring BiSA Database

BiSA download includes a backup database file BiSAx.xx.bak. To restore the file, open SSMS and connect to database engine as shown below.

ConnectServer

 Right click on ‘Databases‘ folder icon and choose Restore Database.

SSMRestoreDatabase

 

Type in database name ‘BiSA’, click ‘From device’ and press … button as labeled 1, 2 and 3 in following screenshot.

RestoreDatabase

 Click Add button on Specify Backup screen.

SpecifiyBackup

Browse to the folder where you have unzipped files, and locate BiSA.bak file. 

LocateBackup

Click OK. You will be back on Specify Backup screen. Click OK again. Click database set to restore and press OK. 

RestoreDatabase2

This will restore the database in C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA. If you do not have this folder structure then the restore will fail. If you have installed SQL Server 2012 your folder structure will be different. In that case you would have to restore BiSA in another folder. Click on Files (SQL Server 2012) and change the restore folder as shown in the following screenshot.

Now if you expand Database folder you should see BiSA database.

Setting up Connection String

BiSA.exe.config is a XML configuration file that holds the connection string to connect MS SQL Server. If MS SQL Server is installed on same machine as that of BiSA then the Connection String line looks like this:   

<add name="BiSA.Properties.Settings.BiSAConnectionString"    connectionString="Data Source=localhost\sqlexpress;Initial Catalog=BiSA;       Integrated Security=True"   providerName="System.Data.SqlClient" />

‘Data Source’ property sets the location of SQL Server and its instance name. If you have followed the installation conventions for SQL Express edition then you do not need to change this. If SQL Server is installed as a default instance then specifying just machine name for Data Source will be fine e.g.    

<add name="BiSA.Properties.Settings.BiSAConnectionString"        connectionString="Data Source=localhost;Initial Catalog=BiSA;       Integrated Security=True"   providerName="System.Data.SqlClient" />

‘Initial Catalog’ property sets the name of database.

Integrated Security=True directs application to connect SQL Server engine using Windows integrated security.

If the database engine is installed on a networked server, then you would need to set a database username and password. Database server needs to setup to accept incoming connections as mixed mode. In this case use the following Connection String:

<add name="BiSA.Properties.Settings.BiSAConnectionString"
connectionString="Data Source=Server_name_Or_Ip_address\instance_name;Initial Catalog=database_name; PWD=password;UID=username; persist security info=True" providerName="System.Data.SqlClient" />