When upgrading the application, if you are using a replicated database and have replication turned on, you must turn it off, upgrade, and then turn it on again. You must also upgrade the replicated database.
Procedure
- Disable any scheduled synchronization jobs for the Reporting Database.
- Open the Services window to stop all services: click .
- In Microsoft SQL Server Management Studio, generate the create and drop scripts:
Note: For use later in this procedure, you must note the location of where you saved the scripts.
- In the Subscriber/Distributor instance, right-click the Replication folder, and then click Generate Scripts.
The Generate SQL Script dialog box appears.
- To generate the Create script, in the Script the commands section, select To create or enable the components, and then click Generate Script.
- To generate the Drop script, in the Script the commands section, select To drop or disable the components, and then click Generate Script.
- To disable replication, execute the Drop script.
- Verify that all objects beneath the Microsoft SQL Server Management Studio Replication folder have been deleted.
- From the installation directory where your SQL Server is hosted, go to Program Files\Proficy\Proficy Workflow\Program, and then run ProficyInstaller to upgrade the ProficyServer programs and database.
- Edit the Create Replication script.
- In Microsoft SQL Server Management Studio, from the File menu, click .
- Navigate to the folder where you saved the scripts generated in step 3.
- Select the Create SQL script.
- Locate the section denoted by this comment,
/****** End: Script to be run at Publisher ******/
, and then add the following lines after it.
Note: You must change the name of the Distribution database and the user names to match your system.
-- Create users in the Distribution database
USE [DistributionDB];
GO
CREATE USER [QASYSTESTSQLSRV\SqlDistAgent]
FOR LOGIN [QASYSTESTSQLSRV\SqlDistAgent]
EXEC sp_addrolemember N'db_owner',
N'QASYSTESTSQLSRV\SqlDistAgent';
CREATE USER [QASYSTESTSQLSRV\SqlLogReaderAgent]
FOR LOGIN [QASYSTESTSQLSRV\SqlLogReaderAgent];
EXEC sp_addrolemember N'db_owner',
N'QASYSTESTSQLSRV\SqlLogReaderAgent';
CREATE USER [QASYSTESTSQLSRV\SqlSnapshotAgent]
FOR LOGIN [QASYSTESTSQLSRV\SqlSnapshotAgent];
EXEC sp_addrolemember N'db_owner',
N'QASYSTESTSQLSRV\SqlSnapshotAgent';
- Add all of the passwords back into the file. The Create Generation process does not write the user account passwords to the file.
- Find all occurrences of
@job_password = null
. - Replace
null
with the log on password that precedes it. If the preceding @job_login
is also null, do not edit the password so that it remains set to null
.
-- Before:
exec [SystemTest2v2].sys.sp_addlogreader_agent @job_login = N'QASYSTESTSQLSRV\SqlLogReaderAgent', @job_password = null
-- After:
exec [SystemTest2v2].sys.sp_addlogreader_agent @job_login = N'QASYSTESTSQLSRV\SqlLogReaderAgent', @job_password = 'proficy'
-- Do not change passwwords for null job_logins
exec [SystemTest2v2].sys.sp_addqreader_agent @job_login = null, @job_password = null
- Execute the Create Replication script.
Note: This script will have some errors because it will try to publish database objects that were removed from the database as part of the upgrade.
- Re-enable the replication, and then add the new database tables and objects to the publication in order to push them to the replicated database:
- Expand your database directory and the Replication folder, right-click Local Publications, and then select Properties.
- Select Articles, and then select all unchecked items to include them in the publication.
Note: The subscription must be re-initialized to include the new articles. We recommend re-initializing all articles in the subscription using a full snapshot. For instructions, read the Microsoft Developer Network article,
Reinitializing a Subscription
- After replication is working against the upgraded database, install the Reporting upgrade, and point it to the replicated database.
- Test reporting synchronization by running a manual Sync from the Workflow client.