EPM: After restoring database, cannot enable PMI, ACI, or receive events in inbox
Symptom
Following a restore of the DB the Revive After Recovery scheduled job should be run in order to reauthorize the system.
Environment
v4.5;v5.5;v5.6;v5.7;v6.0;v6.1;v6.2;v6.3;v6.4;10.2;10.3;10.4;10.5;10.6
Resolution
1. Open SQL Management Studio
2. Perform only ONE of the following
2a. FOR v10.10+ = After restoring all of the databases, you need to authorize them in the system.
- Right click on VFMNGDB5 > New Query
- Write the command
EXEC dbo.usp_VfScheduledJobReviveAfterRecovery- Click on !Execute in the toolbar (or hit F5)
2b. FOR v5.5-10.9 = Manually !Execute the following query against all EPM Databases (VFMNGDB5, VFNESTDB5, VFSTAGEDB5, VFSTATDB5, VFEVENTSDB5)
DECLARE @DbName nvarchar(max), @Principal sysname
SELECT @DbName = CONVERT(nvarchar(max), DB_NAME())
SELECT @Principal = name
FROM sys.server_principals
WHERE (sid = 0x01)
EXEC ('ALTER DATABASE [' + @DbName + '] SET TRUSTWORTHY ON')
EXEC ('ALTER AUTHORIZATION ON DATABASE::[' + @DbName + '] TO [' + @Principal + '];')Additional Information
Details
SYMPTOM:
After restoring database, events are not appearing in the inbox.
PROBLEM:
PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE is required by the EPM DBs.
The following error will appear in Server Traces:An error occurred in the Microsoft .NET Framework while trying to load assembly id 65538. The server may be running out of resources or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE.
SOLUTION:
OPTION 1 - Run the Revive after Recovery Scheduled Job
1. Expand VFMNGDB5 -> Programmability -> right click Store Procedures -> Filter -> Filter Settings
2. Add the value "Revive"
3. Right click dbo.usp_VfScheduledJobReviveAfterRecovery -> Modify
4. Highlight the code between BEGIN and END, then select !Execute
5. Repeat steps 1-4 for the other EPM DB's (VFNESTDB5, VFSTAGEDB5, VFSTATDB5, VFEVENTSDB5)
OPTION 2 - Manually run the following query against all EPM Databases (VFMNGDB5, VFNESTDB5, VFSTAGEDB5, VFSTATDB5, VFEVENTSDB5)
DECLARE @DbName nvarchar(max), @Principal sysname
SELECT @DbName = CONVERT(nvarchar(max), DB_NAME())
SELECT @Principal = name
FROM sys.server_principals
WHERE (sid = 0x01)
EXEC ('ALTER DATABASE [' + @DbName + '] SET TRUSTWORTHY ON')
EXEC ('ALTER AUTHORIZATION ON DATABASE::[' + @DbName + '] TO [' + @Principal + '];')