Changing database connection settings

NOTE: Before you change the connection settings, back up the existing database and import this backup to the new database server.

NOTE: Each database of roles is independent and must not be shared between roles. This means that if you have two Gateway Roles, you also create two databases. These may share both a server and an instance, but are otherwise independent of each other. Independent databases increase the stability of NoSpamProxy and facilitate administrative tasks such as upgrades or database moves.

  1. Go to Configuration > NoSpamProxy components > Databases.
  2. Click Modify.
    Connection to the database
  3. Under Database location, specify the server on which the database is located.

    NOTE: If the database is on the same server as the Gateway Role, select Local Server. If the database is located on another server, first select the Remote host option and then enter either the IP address or the fully qualified domain name (FQDN) of the server where the database is located.

  4. Under Instance, specify whether the default instance of the SQL server or a named instance is used for the database of the Gateway Role.

    NOTE: If this is the default instance of the SQL server, select the option Default. Otherwise, click Named Instance and then enter the name of the corresponding instance.

  5. Under Database name, enter the name of the corresponding database(s).
    The following database names are used by default:
    •  Gateway Role
      NoSpamProxyGatewayRole
    • Intranet Role
      NoSpamProxyIntranetRole
  6. NOTE: If you only want to change the connection parameters, select the corresponding field in the lower part of the dialog.

  7. Click Next.
  8. On the Administrative Authentication page, specify which user account to use to make changes to the selected database, enter the appropriate credentials, and click Next.
    Connection to the database
  9. Under Service authentication, specify how the Gateway Role should log on to the SQL Server.

    NOTE: If SQL authentication is disabled on the SQL server, then the integrated authentication must be used. Otherwise you can choose between Integrated and SQL authentication.

  10. Select the desired action on the next page. Depending on the available databases, different options are available here.
  11. Click Finish.

Saving databases

The roles of NoSpamProxy use the following databases:

  • Gateway Role NoSpamProxyGatewayRole
  • Intranet Role NoSpamProxyIntranetRole
  • Web Portal NoSpamProxyWebPortal

NOTE: If NoSpamProxy uses your existing standard or Enterprise SQL Server, you can configure a periodic backup of all databases there using the Enterprise Manager. When using SQL Server Express Edition, you must manually back up the database with a script and restore it if necessary.

Backing up the databases via the command line

Enter the following lines in the command line:

For the Gateway Role database osql -S (local)\NameDerInstanz-E -Q "BACKUP DATABASE NoSpamProxyGatewayRole TO DISK = 'c:\NoSpamProxyGatewayRole.bak'"<mtlingo type="" prevChar="" nextChar=" " /> >

For the Intranet Role database osql -S (local)\NameDerInstanz -E -Q "BACKUP DATABASE NoSpamProxyIntranetRole TO DISK = 'c: \NoSpamProxyIntranetRole.bak'"<mtlingo type="" prevChar="" nextChar=" " /> >

For the Web Portal database osql -S (local)\NameDerInstanz -E -Q "BACKUP DATABASE NoSpamProxyWebPortal TO DISK = 'c:\NoSpamProxyWebPortal.bak'" >

These rows save the corresponding databases in files without shutting down the database for this purpose. You should therefore check whether you schedule an appropriately customized call as a regular task with Windows Task Scheduling.

Creating a backup

Enter the following lines in the command line:

For the Gateway Role database osql -S (local)\NameDerInstanz -E -Q "RESTORE DATABASE NoSpamProxyGatewayRole FROM DISK = 'c:\NoSpamProxyGatewayRole.bak' WITH FILE= 1, NOUNLOAD, REPLACE "<mtlingo type="" prevChar="" nextChar="" />

For the Intranet Role database osql -S (local)\NameDerInstanz -E -Q "RESTORE DATABASE NoSpamProxyIntranetRole FROM DISK = 'c: \NoSpamProxyIntranetRole.bak' WITH FILE= 1, NOUNLOAD, REPLACE "<mtlingo type="" prevChar="" nextChar="" />

For the Web Portal database osql -S (local)\NameDerInstanz -E -Q "RESTORE DATABASE NoSpamProxyWebPortal FROM DISK = 'c:\NoSpamProxyWebPortal.bak' WITH FILE= 1, NOUNLOAD, REPLACE "

The databases must already exist in order for the recovery to work.

NOTE: Since the SQL server keeps the databases themselves permanently open, they cannot be captured via a normal backup of the files, such as via NTBACKUP.