To move the local SQL database to a remote SQL server, do the steps below:
- Click the Start button, and type services.msc in the Search program and files field. The Services window will appear.
- Stop the following services:
- Trend Micro IM Security Server
- Trend Micro IM Security System Attendant
- Detach the IM Security database using the following command:
sqlcmd -S .\ IMSecurity -E -Q "sp_detach_db [IMSecurityDB_ SERVERNAME]"Replace "SERVERNAME" with your local host name where IM Security is installed.
For example, the server name is LYNC15-SVR172, The commands should be: - Stop the SQL server (IMSecurity) service.
- Go to the SQL server Express DATA folder (e.g. ..\Microsoft SQL Server\MSSQLIMSECURITY\MSSQL\DATA).
- Copy the .mdf and the .ldf files to their respective folders on the remote SQL server. Refer to the image below:
Local database:
Remote SQL server:
- On the remote SQL server, load the SQL Server Management Studio and login to the SQL instance where you want to attach the IM Security databases.
- On SQL Server Management Studio, right-click Databases and select Attach.
- Click Add and browse through the .mdf files. Select IMSecurityDB_LYNC15-SVR172.mdf, and then click OK.
Ensure that the Database Name and Attach As fields match the server name of the IM Security database.
You should see a dialog box similar to this:
- Click OK to attach the database. Make sure the IM Security service account have dbo on the IM Security database.
- Go back to the IM Security server and modify the IM Security database profiles by using the path \%IMSecurity_INSTALL_PATH%\config (e.g. C:\Program Files\Trend Micro\IM Security\config).
- Modify the following files to reflect the new remote SQL. Always back up the following files before making any modifications.
- dbcfg_DatabaseInstance.txt
This should match the remote SQL instance where you attached the IM Security databases. In my environment, it is “Lync15-SQL171\IMSInstance” - dbcfg_IsSeperateSQLServer.txt
The value should be 1.
- dbcfg_DatabaseInstance.txt
- Start the following services:
- Trend Micro IM Security Server
- Trend Micro IM Security System Attendant
- Open the IM Security console and verify if all the configurations are there and no errors on the console. And check all the logs can be queried successfully.