Views:

Do the following procedures to move ScanMail database(s) from one SQL Server to another SQL Server. The first scenario above will be used to demonstrate this task.

  1. Stop the following services:
    • ScanMail for Microsoft Exchange Remote Configuration Server
    • ScanMail for Microsoft Exchange Master Service
    • ScanMail for Microsoft Exchange System Watcher
  2. Move the ScanMail databases by using SQL Server Management Studio:

    If you don’t install SQL Server Management Studio, use Transact-SQL to finish this task. Check the following Microsoft articles for detailed information on how to move a database using Detach and Attach in MSDN:

    1. Detach the SMEX database from the source SQL Server:

detach

  1. Copy the SMEX database files from source SQL Server to target SQL Server. The folder is usually C:\Program Files\Microsoft SQL Server\MSSQL**.***\MSSQL\DATA. Make sure to copy the Primary Data file as well as the Transaction Log files:

verify

  1. Attach the SMEX database to the target SQL Server:

attach

If you don’t install SQL Server Management Studio, use Transact-SQL to finish this task. Check the following Microsoft articles for detailed information on how to move a database using Detach and Attach in MSDN:

  1. Go to the ScanMail server and modify the SMEX database profiles located: \%SCANMAIL_INSTALL_PATH%\config
Make sure to backup/modify these files correctly to reflect the new remote SQL:

dbcfg_DatabaseInstance.txt
dbcfg_IsSeperateSQLServer.txt
dbcfg_ConfDBName
dbcfg_LogDBName
dbcfg_ReportDBName
dbcfg_ServerName.txt
dbcfg_SQLUserId.txt
dbcfg_SQLPassword.txt
dbcfg_SecurityString.txt

Take note of the following:

  • The dbcfg_DatabaseInstance.txt should be the remote SQL instance where you attached the ScanMail database(s) in the Step 2.
  • The value in dbcfg_IsSeperateSQLServer.txt should be 1.
  • “Dbcfg_ConfDBName”, "dbcfg_LogDBName" and "dbcfg_ReportDBName" should be the ScanMail database name, if you choose not to change the GUID (not necessary to change it).
  • Dbcfg_ServerName.txt should match the ScanMail server name, if you prefer not to change the GUID (not necessary to change it).
  • If you select SQL Server authentication to connect to SQL Server during ScanMail installation, make sure that the SQL account and password are stored in "dbcfg_SQLUserId.txt" and dbcfg_SQLPassword.txt" separately. To generate the encrypted password for "dbcfg_SQLPassword.txt":
    1. Go to the \%SCANMAIL_INSTALL_PATH%\SMEX folder via the Command prompt.
    2. Type toolChangeRemoteDBPWD.exe –p %SCANMAIL_INSTALL_PATH%\config\ -c Current SQL Password
    3. You may type toolChangeRemoteDBPWD.exe /? for usage info.
    4. Verify that the new dbcfg_SQLPassword.txt file generated the encrypted password.
toolChangeRemoteDBPWD
  1. If you select Windows authentication to connect to SQL Server during ScanMail installation, make sure the ScanMail service account has DBO privileges on ScanMail’s databases in the new SQL Servers.
  • Make sure dbcfg_SecurityString.txt uses the following string: Integrated Security=SSPI;Persist Security Info=FALSE;
  1. Start the following services:
    • ScanMail for Microsoft Exchange Remote Configuration Server
    • ScanMail for Microsoft Exchange Master Service
    • ScanMail for Microsoft Exchange System Watcher
  2. Once the procedure above is implemented, log on to the ScanMail console and verify all the configuration. Check as well for any error on the console.