Afaria Setup 9: Configuration – SQL Server

Afaria needs a database server to save its data into a database. This data was installed in the previous step. Now the SQL Server Express data needs to be prepared for SAP Afaria installation.


Afaria will need a user to log on to SQL Server Express. As Windows is already hosting an Active Directory, an SAP Afaria user can be created to be used to log on to SQL Server. The same user will be used later by Afaria as the Afaria service user. The user is created in the AD using the Active Directory tool.

Create user

  • First name: afauser
  • Last name: n/a
  • Full name: afauser
  • User logon name:

Confirm the user data.

Add user to groups

After the user afauser is created, the user must be prepared for Afaria tasks. This is done by adding him to the right user groups. By default, the user is already part of the domain users. It must be added to domain admins too.

Select group: Domain Admins.

Create Afaria DB

Start SQL Server Management Studio

Open the context menu of the database node of the server and select New Database.

Enter a name for the database (AfariaDb) and give as initial log size 25 MB. The rest of the configuration parameters can be left as is.

Select the Security folder and Login. Open the context menu and select New Login.

Chose as login name the afauser created in section preparation. Set as default database AfariaDb.

  • Login name:
  • Windows authentication: yes
  • Default DB: AfariaDB
  • Default language: <default>

Add db_executor role

Select AfariaDb under SQL Server and Databases. Select New Query.

In the query editor, enter: CREATE ROLE db_executor

Select Execute

The runs the SQL query on the AfariaDb. In the ouput message window the status of the query can be seen.

Next, run the query: GRANT EXECUTE TO db_executor

Select Execute

These 2 queries created a new role and granted the db_executor permission to it.

Assign roles

Next step is to assign to afauser the needed roles. Select Security -> Users under AfariaDb and click on New User.

Select afauser and give the following Database role memberships:

  • db_dataread
  • db_datawriter
  • db_ddladmin
  • db_executor

This concludes preparing Windows 2008 R2 Enterprise for Afaria. The next steps are now installing Afaria server.

Let the world know

Afaria Setup 8: Installation – SQL Server

SAP Afaria 7 needs a database server. Supported types are Sybase and SQL Server. The steps outlined in this blog will Microsoft SQL Server. There are various types of SQL Server available and Microsoft offers a free version of SQL Server: SQL Server Express. This version is “same” as the normal SQL Server with certain restrictions, but for Afaria it is just a normal SQL Server installation. To try something out with Afaria, this version is enough. In case you want to install Afaria in the cloud, there is a Windows and SQL Server bundle available from Amazon AWS.


Create user for SQL Server in the AD domain. Here the user name is

  • First name: SQLServer
  • Last name: n/a
  • Full Name: SQLServer
  • User logon name:

Inform a password. To not have to change it every N months, disable password expiration.

  • Password never expires: true

Confirm user data.


Start the SQL Server Express installation. This will show the SQL Server installation center. Select Installation from the left and then click on New Installation.

Select the features to be installed: select all features. Leave the directory path to standard.

In the instance configuration, make sure Default Instance is selected. Do not change the default values.

As this is a try it out installation, keeping it simple is one of the main ideas. Therefore, use the same user account for all SQL Server services.

Enter the user information of the user created in the previous step: preparations.

  • User:

Specify the users that are administrator for SQL Server. By default, it is Administrator (user used to run the installation). Confirm the values in the other tabs.

  • Authentication mode: Windows authentication mode

Next will start the installation.

After the installation is done, the wizard will show a status screen. In case everything worked, SQL Server Express is now installed.

Let the world know