Set up SQL Server Express for YAF

Modified: 2007/10/02 06:21 by philw - Categorized as: Installation
Edit

Download and Install

Download and install "SQL Server Express" and "SQL Server Management Studio Express".

Visit Microsoft and download the two programs from the left column:

  1. SQL Server 2005 Express Edition
  2. SQL Server Management Studio Express

The first download is the database engine itself; the second is a tool which makes it easy to do the configuration you're going to need. Install the programs in sequence accepting the default options.

When you install SQL server, accept all the default options, except choose the option which supports both "windows authentication" and "SQL server authentication" (the latter is what you need for YAF).

Edit

Configure Database

  1. Run SQL Server Management Studio Express
  2. Create a new Login to be used by YAF
    • Expand the tree and select Security/Logins
    • Right click the "Logins" folder and choose "New Login"
    • The new login dialog appears
    • Pick a name for the login and make a note of it. The name doesn't matter; let's say it's "yaf_user"
    • Click the "SQL Server Authentication" radio button and type in a password for the user. Pick something good, I'll use "password" here. Note it down.
    • Uncheck the three "enforce password" check boxes.
    • Hit ok to close the dialog.
  3. Create a new database for YAF
    • Select "Databases" in the tree.
    • Right click and choose "New Database"
    • The new database dialog appears.
    • Type a name for the database... this can be anything, say "yaf". Note it down.
    • Click the "..." button next to owner, and type the name you created above in that box.
    • Press "Check Names", the system will underline the name to confirm it's all good.
    • Hit Ok to close the dialog.

That's it. You now have a new "database" for YAF which is "owned" by the new "login.

Click on the item at the root of the tree in the tool. The name of the SQL server instance is displayed in large text at the top of the summary pane. It looks something like: MACHINE_NAME\SQLEXPRESS.

Note down:
  1. the name of the INSTANCE
  2. the name of the DATABASE
  3. the LOGIN name
  4. the login PASSWORD

See below for where these are used.

Edit

Set up Connexion String

The connexion string in your yafnet.config file should be set to point to the stuff just created: This works:
user id={LOGIN};pwd={PASSWORD};data source=.\SQLEXPRESS;initial catalog={DATABASE};timeout=90
as does:
user id={LOGIN};pwd={PASSWORD};data source={INSTANCE};initial catalog={DATABASE};timeout=90

I prefer the former as it makes it easier to set up and test the thing on one machine and then stage it to a production server (if you use the latter you have to change the machine name when you do that).

I think that's all you need to do; by default YAF can access the database.

ScrewTurn Wiki version 2.0.14. Some of the icons created by FamFamFam.


SourceForge.net Logo Powered by ASP.NET v2.0 411ASP.NET