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:

  • copy the Microsoft SQL Server database file to the database server machine.
  • create the Archibus Project list entry and restart your application server.

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. 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 (downloaded from Archibus) 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. These are available for download from Archibus.

Step 2: Start and Attach your Project Database

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 privilege to create its 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: 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.