Configure Project Database Connections
You set the project database details by editing the in \webapps\archibus\WEB-INF\config\afm-projects.xmlfile directly. For information on the file, see The afm-projects.xml File.
Database Connection Roles
In addition to the project preferences, each project entry in \webapps\archibus\WEB-INF\config\afm-projects.xml contains three default roles for connecting to the SQL database for connections:
- data for connections asking for user data
- schema for connections asking for schema or data-dictionary information
- security for connections asking for user authentication information
These different roles let you control default SQL security differently for the different types of connection. You can also use different servers or tablespaces for the different roles. Having the different roles also allows the Archibus Web Central application to pool database connections that have identical credentials in order to reduce the number of connections needed.
Database Preferences
Each <database />
entry has these characteristics.
Element | Description |
---|---|
role | The role for the connection: "data", "schema" or "security" |
maxNumberOfRecords | The largest number of records that a view for this project will display for each table-group in a single query. A value of "0" sets no limit; although this option is only used for the schema and security roles, in which the return data sets are small and all records must be returned. Since rich-interface views typically drill down directly to the data in question (e.g., buildings drill to floors, drill to rooms), large values are not necessary. If you find that you wish to filter data in the view to restrict the records of interest, use one of the console views provided. |
login | Specifies the SQL account name with which to log in when accessing data for this role. |
engine type | The database server engine type: "sqlServer", "sqlServerExpress" or "Oracle" |
jdbc url | The JDBC URL used for accessing the database |
The JDBC URLs
Typically, you need only change the database server name ("localhost", "harp", etc.) or instead specify an IP address of the database server (e.g. "10.1.99.75" and leave the rest of the URL unchanged. The rest of the URL varies slightly between server types:
<jdbc url="jdbc:microsoft:sqlserver://10.1.99.75:1433"/>
<jdbc url="jdbc:oracle:thin:@10.1.1.6:1521:orcl"/>
The value after the colon (e.g. "2638", "1433", "1521") is the default port on which the database server is listening. If you change this port from its default, you should change this value in the URL as well.
In the case that you are running two databases on the same server, such as HQ and Schema, you must add the database identifier to the JDBC connection URL.
- For Microsoft SQL, add "
;databaseName=Hq
" where "Hq" is the name of your database, to the end of the JDBC URL setting. The end result will look like the following:<jdbc url="jdbc:microsoft:sqlserver://10.1.99.75:1433;databaseName=Hq"/>
- For Oracle, for each project, you must
add "
:sid
" where "sid" is the Oracle sid of your database, to the end of the JDBC URL setting. The end result would look like the following:<jdbc url="jdbc:oracle:thin://10.1.99.75:1433:sid"/>
SSL Connection
JDBC connections in afm-projects.xml, when not specified, default to attempting to connect using SSL.
If your database connection is not using SSL, add "encrypt=false"
to the JDBC connection URL parameters. Otherwise, Web Central will not start.
For example:
Securing your Database Passwords
If you do not wish to store your database passwords in plaintext, you can encrypt them using the "Encrypt Passwords in Configuration Files" view in the System / System Administrator / Archibus Administrator process.