This tutorial covers how to install Acidcat CMS on SQL Server 2005 using SQL Server Management Studio.

Login to SQL Server Management Studio
- Open SQL Server Management Studio by clicking on Start > All Programs > Microsoft SQL Server 2005 > SQL Server Management Studio Express

- In the 'Connect to Server' dialog box, next to 'Server name:' select the database that you want to connect to and click 'Connect'

- If the connection works OK you should see you server contents listed ont he left of screen under 'Object Explorer'


Add a Database
- In SQL Server Management Studio right click on the 'Databases' node and then click 'New Database...'

- The 'New Database' dialog will be displayed
- Next to 'Database name:' type in the name of your new database, eg. acidcatdb, and then 'OK'

- Our new database should now be listed in the centre of screen under 'Databases'

OK so now we have our database.
Next thing that we need to do is setup a connection to it.


Add a User
- In SQL Server Management Studio expand the 'Security' node
- Right click on 'Login' and then click 'New Login...'

- In the Login dialog, type a name next to 'Login name:' eg. acidcatsa
- Click the SQL Server Authentication radio button
- Add a password, eg. frogman
- Unclick the 'Enforce password expiration' box
- Next to 'Default database:' select acidcatdb

- Click OK
- Our new user should now be listed in the centre of screen under 'Logins'

So now we have a Database and we have a User.
Next we need to give our User access to our Database


Add a Database User
- Expand the 'Databases' node
- Expand the 'acidcatdb' node
- Expand the 'Security' node
- Right click on 'Users' and then click 'New users...'

- Next to 'User name' type in 'acidcatdbuser'
- Next to 'Login name' select '...'
- In the 'Select Login' dialog click on 'Browse'
- In the 'Browse for Objects' dialog select our user, [acidcatsa], and then click OK

- Click OK again
- Under 'Database role membership' check the box next to 'db_owner'
- Click OK
- Our new user should now be listed in the centre of screen under 'Logins'


Set Database Permissions
- Expand the 'Databases' node
- Right click on 'acidcatdb' and select 'Properties'
- In the Database Properties window, click on Permissions

- Our database user, acidcatdbuser, should be listed in under name
- In the permissions table at the bottom of the page, under 'Grant', check the boxes next to Delete, Execute, Insert, Select and Update

- Click 'OK'

OK our Database and its permissions have now been set up.

The final step now is to edit our connection string within Acidcat CMS to point at our new database.


Editing the Acidcat CMS Connection String
- Open the file /admin/connections/oConn_db.asp
- Uncomment the line:
strDatabaseType = "mssql"
- Edit the connection string as follows
MM_oConn_STRING = "Provider=sqloledb;Data Source=acidcat\sqlexpress;User ID=acidcatsa;Password=frogman;Initial Catalog=acidcatdb;"

- Save the file


Now lets add our database tables.
- Extract the ZIP file containing Acidcat CMS and place the contents in a directcory on your server, eg. C:\Inetpub\wwwroot\acidcat
- Open a browser and go to http://localhost/acidcat/readme.htm
- Click on the link to 'Acidcat installation page'
- Click on 'SQL Server'
- Click on 'Next'
- Step 2: We have already setup our database connection so all we need to do now is Create our tables

- Dont worry about the instructions for setting the database connection in oConn_db.asp because we have already done that.
- Lets start by checking that our connection is OK
- A good way of doing this is by clicking on 'Drop Tables'
- The pop-up window should say 'Database setup successful'
- If there is a problem, please check your connection before continuing
- Next click on 'Create Tables'
- If all goes according to plan, a pop-up window should a list of successfully executed sql statements. Hooray! We're done!

- If the screen is blank, then it probably means that the database permissions are not set correctly.
- Edit your database permissions in SQL Server Management Studio Express