Purpose
This article provides steps for archiving a Mailscape SQL Server database and then replacing with a new empty database. The intention is to allow Mailscape admins to keep a backup of the old database in case any historical data is needed, though this is not common.
The procedures in this article apply to the SQL Server Mailscape database and will not work for the built-in Mailscape database on the EMS web server.
Procedures
There are two procedures for this process.
The first procedure will archive and replace an existing Mailscape database.
The second procedure will restore the archived database under a new name which will not conflict any existing Mailscape database on the SQL Server instance.
Note: These procedures assume that all programs and files are installed to their default locations for SQL Server 2017. The default locations will be different for other versions of SQL Server.
Archive and replace an existing database
Step 1: Disable SQL Integration (ENow web server)
In the ENow Admin Console go to Reporting
Click the SQL Integration... button
Click the Disable SQL Integration button
Step 2: Close ENow processes (Web server)
Close the ENow Admin Console
In IIS Manager and stop the MailscapeAppPool
In Services.msc and stop the ENow Web Service
In Services.msc stop all other ENow services
Step 3: Backup the Mailscape database to disk (SQL Server)
In SQL Server Management Studio expand Databases
Right-click on the Mailscape database and select Tasks > Backup...
Note: Do not expand the database in the tree view
On the General page, select the following settings:
Database: Mailscape
Backup Type: Full
Backup component: Database
Back up to: Disk
Note the location of the backup file Mailscape.bak
Default location for SQL 2017:
C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\Mailscape.bak
Click Ok and wait for the backup to complete
Click Ok to acknowledge the completed backup and close the Backup window.
Step 4: Delete the Mailscape database (SQL Server)
In SQL Server Management Studio expand Databases
Right-click on the Mailsacpe database and select Delete
Note: Do not expand the database in the tree view
On the General page, verify that the Mailscape database is the only object listed
Check the Close existing connections option
Click Ok
Step 5: Create a new Mailscape database (ENow web server)
In Services.msc, start all ENow services
In IIS Manager, start the MailscapeAppPool
In the ENow Admin Console, go to Reporting
Click the SQL Integration... button
Complete the ENow SQL Integration Wizard to create a new database
At the end of this procedure the Mailscape database is archived and replaced
Restore the archived Mailsacpe database
Note: This procedure should only be used if there is a need to view the old Mailscape database.
On the Mailscape SQL Server, open SQL Server Management Studio
Click on New Query...
Place the following commands in the query window
USE [master]
GO
RESTORE DATABASE [MailscapeArchive] FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\Mailscape.bak'
WITH
MOVE 'Mailscape' TO 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\MailsacpeArchive_Data.mdf',
MOVE 'Mailscape_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\MailscapeArchive_Log.ldf',
RECOVERY, STATS = 10;
Click the Execute button and wait for the restore to complete
In the Object Explorer, right-click Databases and select Refresh
Note that both the Mailscape and MailscapeArchive databases are present
Applies to
The procedures in this article have been tested with EMS 7.13 (7.13.0.169) but should apply to most versions.
Comments
0 comments
Please sign in to leave a comment.