This page describes how to connect to the hMailServer MSSQL database to execute statements.
Step 1: Determine MSSQL password
If you are using an external version of MSSQL, you should already know your MSSQL password. If you are using the built-in MSSQL version that comes with hMailServer, you might not know your password. To determine it, follow these steps:
- Open up hMailserver.ini, located in your Windows directory.
- If you can't find passwordencryption=1 in the file, locate the password in the file and go to Step 2: Connect to the server below.
- Run the script \hMailServer\Addons\Utilities\DecryptBlowfish.vbs.
- Copy the password from hMailServer.ini to the DecryptBlowfish dialog.
- Click OK in DecryptBlowfish to view your password. DecryptBlowfish will now show your password. Either keep the dialog open or memorize the password.
Step 2: Install required software
To be able to connect to the Microsoft SQL Server Compact database, you need Microsoft SQL Server 2008 Studio Express. The following software needs to be installed for Microsoft SQL Server 2008 Studio Express.
After these tools have been installed, you can install Microsoft SQL Server 2008 Studio Express. During the installation, make sure you select to install the Management Tools.
Step 3: Connect to the server
- Start SQL Server Management Studio found in the start menu.
- Select File -> Connect Object Explorer
- Select SQL Server Compact Edition from the Server type list.
- Select the hMailServer database file, typically C:\Program Files\hMailServer\Database\hMailServer.sdf
- Type in the password you retrieved in step 1
- Click Connect to connect to the database server
Now you have connected to MSSQL
Step 3: Executing statements
After you have connected to MSSQL, you can execute statements by following these steps:
- In the tree-menu to the left, right click on the hmailserver database.
- Select New Query from the context menu.