Start your Project Databases (Microsoft SQL Server)

This section discusses starting your project databases on the database server and making them accessible to the client workstations. To do so, you must:

The procedure for starting your own project, which must first be created, differs a bit from the procedure for starting the sample project, which already exists. For the sake of clarity, this section details the steps for both procedures.

Step 1: Create the Project Database

Follow these steps to create a new Microsoft SQL Server project database.

  1. Use the Windows Explorer New Folder command to create a new folder for the project database on the database server machine, for example: \archibus\projects\myproject\data

  2. Use the Windows Explorer Copy and Paste commands to copy the \databases\mssqll\mssql_schema.mdf file from your product DVD to this new folder on your database server machine.
  3. Use the Windows Explorer Rename command to rename this Mssql_schema.mdf file to the name of your project; for example, myproject.mdf.

Note:  For localized versions of the software, there are separate schema database files for double-byte languages (Simplified Chinese, Traditional Chinese, and Korean). This is necessary because Microsoft SQL Server does not support Unicode UTF-8. When present, these database files are located on the ARCHIBUS Product DVD as follows:

databases\mssql\Korean\Schema\MSSQL\MsSql_Schema.mdf
databases\mssql\Chinese (Traditional)\Schema\MSSQL\Mssql_Schema.mdf
databases\mssql\Chinese (Simplified)\Schema\MSSQL\Mssql_Schema.mdf

Step 2:Start and Attach Your Project Database

Note: If you start a database with the ARCHIBUS Smart Client Start Servers command, you do not need to perform the attach or the mapping steps, as they are performed by the command itself.

Use the Microsoft SQL Server Management Studio to start this database on your server instance and attach this database.

Step 3:Map Your Database Accounts

Within the project list entry, each set of pooled connections (data, schema, and security) can log in with a different user account. By default these are the "afm" and the "afm_secure" accounts. Map the server logins to these accounts by executing the script below (for instance, by using the SQL Server Query Analyzer).

Run the following SQL Code to create the afm and afm_secure logins.

Note: It is necessary to run the SQL code creating the afm and afm_secure logins only the first time you are attaching any ARCHIBUS database to a particular SQL instance.

/* Create logins */

CREATE LOGIN afm WITH PASSWORD = 'afm', CHECK_POLICY = OFF

CREATE LOGIN afm_secure WITH PASSWORD = 'afm', CHECK_POLICY = OFF

/* Give AFM the privelege to create it's own objects. */

EXEC sp_addsrvrolemember 'afm','dbcreator'

go

/* Grant access to the AFM user */

EXEC sp_grantdbaccess 'afm', 'afm'

go

EXEC sp_addsrvrolemember 'afm_secure','dbcreator'

go

To map the "afm" and "afm_secure" users to the "afm" and "afm_secure" logins run the following statements:

/* Map the server login of AFM to the database user AFM. */

EXEC sp_change_users_login 'Update_One', 'afm', 'afm'

go

/* Map the server login of AFM to the database user AFM. */

EXEC sp_change_users_login 'Update_One', 'afm_secure', 'afm_secure'

go

Step 4: Deploy Web Central with Mcirosoft SQL Server and Java 6

If you are deploying Web Central with Microsoft SQL Server (or Microsoft SQL Server Express) and Java 6, you need to replace the Microsoft SQL Server JDBC Driver.

The Microsoft SQL Server JDBC Driver 3.0 has two JAR files:

The Web Central WAR file is shipped with Microsoft SQL Server JDBC Driver 3.0 for Java 5.

To replace the Microsoft SQL Server JDBC Driver, follow the instructions below:

  1. The instructions assume that the Web Central WAR file was deployed to “archibus” directory.
  2. Remove sqljdbc.jar file from the \archibus\WEB-INF\lib directory.
  3. Copy sqljdbc4.jar file from the \archibus\lib\jdbc directory to archibus\WEB-INF\lib directory.

References:Microsoft SQL Server JDBC Driver 3.0
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a737000d-68d0-4531-b65d-da0f2a735707

Step 5: Create your Project Preferences List Entry

Create the project preferences list entry per the instructions in this topic Adding a New Project.

Restart your application server to have the ARCHIBUS application connect to this new project.