Thursday, June 17, 2021

Quick Blog on how to migrate Citrix Session Recording databases

 

How to migrate Citrix Session Recording databases


Here is a quick blog around migrating Citrix Session Recording Databases to a new SQL server. This is only a single instance and it's not load balanced. It's a very basic configuration and I wanted to go into the CTX article a bit more.



  1. Stop the Services

Machine generated alternative text:
Application Management 
AppX Deployment Service (AppXSVC) 
ASP.NET State Service 
Background Intelligent Transfer Service 
Background Tasks Infrastructure Service 
Base Filtering Engine 
Carbon Black Sensor 
Cb Protection Agent 
'5 Certificate Propagation 
Citrix Session 
cording Analytics Service 
Citrix Session 
ording Storage Manager 
CNG Key Isolation 
COM+ Event System 
COM+ System Application 
Computer Browser 
Processes in... 
Provides inf... 
Provides su... 
Transfers fil... 
Windows in... 
The Fil... 
Collects sys... 
Monitors sy... 
Copies user 
Collects ana... 
Component... 
The CNG ke... 
Supports Sy... 
Manages th... 
Maintains 
Running 
Running 
Running 
Running 
Running 
Running 
Running 
Running 
Running 
Running 
Running 
Running 
Manual 
Manual 
Manual 
Automatic (D... 
Automatic 
Automatic 
Automatic 
Automatic 
Manual 
Automatic 
Automatic 
Manual (Trig... 
Automatic 
Manual 
Disabled

 

 

  1. Take a full backup of existing Session Recording databases (SessionRecording and SessionRecordingLogging)

 

  1. Copy backed up databased to the new SQL server.

 

  1. Restore Session recording and logging databases in the new SQL server.

 

  1. Create new logon with Session Recording server hostname in SQL server under Security -> Logins

  2. This is an example from the Citrix KB for the permissions.

Machine generated alternative text:
DIG-SQ (SQL Server 13.0.1601.5 - DIGILAB01\digiadmin) 
Databases 
Security 
8 Logins 
DIGILAB01\Domain Admins 
NT AUTHORITYNSYSTEM 
• NT Service\MSSQLSERVER 
NT SERVICE\SQLSERVERAGENT 
NT SERVICE\SQLTELEMETRY 
• NT SERVICE\SQLWriter 
NT SERVICE\Winmgmt

  1. Add both databases to Always On High Availability (if there is Always on configured)

 

 

  1. Take backup of "C:\Program Files\Citrix\SessionRecording\Database\Bin\SsRecDatabase.InstallState"

 

  1. Updated meaning the file is backed up "Taken backup of "C:\Program Files\Citrix\SessionRecording\Database\Bin\SsRecDatabase.InstallState"with a new SQL Server or Always-On Listener address.

 

  1. Updated following registry with new SQL Server or Always-On Listener address.

 

 

  1. Before DB name

Machine generated alternative text:
File Edit View Favorites Help 
Computer 
Def 
Do ma 
HKEY CLASSES ROOT 
HKEY CURRENT USER 
HKEY LOCAL MACHINE 
BCDDDDDDDDO 
HARDWARE 
SAM 
SECURITY 
SOFTWARE 
Caphyon 
Carbon81ack 
Broker 
Citrix Desktop Delivery Controller 
Citrix Session Recording 
Metalnstall 
Server 
enDesktop 
Classes 
Clients 
Microsoft 
MoziIIaPIugins 
ODBC 
Policies 
Rapid7 
RegisteredAppIications 
Smart-X 
STEALTHbits 
TrendMicroUninstaIIed 
VMware, Inc. 
W ow6432Node 
SYSTEM 
HKEY USERS 
HKEY CURRENT CONFIG 
(Default) 
nstalled 
AllowLivePIayback 
lab DatabaseFaiIoverPartner 
ab DatabaseName 
' erredHashCaIcFiIeSizeThreshoId 
r ntTimeInHours 
EnableAnaIytics 
EnableRecordingActionLogging 
EnableSRStorageLogging 
EnableWeb8asedSrPIayer 
FileStorageDirectories 
Logging810ckState 
ab LoggingDatabaseFaiIoverPartner 
lab LoggingDatabaseName 
LoggingLoggingState 
MaxOpenFiIes 
NotifyMessage8yCuIture 
NotifyMessageDefauIt 
PlaybackProtection 
PlayerUserR8ACEnabIedKey 
PolicyFiIePath 
PolicyFiIeRefreshPeriodI nSeconds 
Role8asedSecurityEnabIed 
RolloverFiIeSizeI nM8 
RolloverTimeI nHours 
SmAudDatabaseInstance 
TempRestoreDirectory 
Type 
REG SZ 
REG DWORD 
REG DWORD 
REG SZ 
REG SZ 
REG DWORD 
REG DWORD 
REG DWORD 
REG DWORD 
REG DWORD 
REG DWORD 
REG MULTI SZ 
REG DWORD 
REG SZ 
REG SZ 
REG DWORD 
REG DWORD 
REG MULTI SZ 
REG SZ 
REG DWORD 
REG DWORD 
REG SZ 
REG DWORD 
REG DWORD 
REG DWORD 
REG DWORD 
REG SZ 
REG SZ 
Registry Edit 
(value not set) 
DxDDDDDD01 (1) 
DxDDDDDD01 (1) 
CitrixSessionRecording 
DxD02DDDDO (20971 52) 
DxDDDDD030 (48) 
DxDDDDDDDO (0) 
DxDDDDDD01 (1) 
DxDDDDDD01 (1) 
DxDDDDDD01 (1) 
DxDDDDDD01 (1) 
CitrixSessionRecordingLogging 
DxDDDDDD01 (1) 
DxDDD02710 (IDDDO) 
Your activity with the desktop or program(s) you r... 
DxDDDDDD01 (1) 
DxDDDDDDDO (0) 
DxDDDD012c (300) 
DxDDDDDD01 (1) 
DxDDDDDD32 (SO) 
DxDDDDDDOc (12) 
EECC8S4 
ctxrecorddb

 

 

  1. Update this location  for the new Database: 

  2. HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Citrix\SmartAuditor\Database\SmAudDatabaseInstance

Machine generated alternative text:
File 
Edit View Favorites Help 
HKEY CLASSES ROOT 
HKEY CURRENT USER 
HKEY LOCAL MACHINE 
8CDDDDDDDDO 
HARDWARE 
SAM 
SECURITY 
SOFTWARE 
Caphyon 
Carbon Black 
Citrix Desktop Delivery Contro 
Citrix Session Recording 
Metalnstall 
SmartAuditor 
Server 
XenDesktop 
Classes 
Clients 
Microsoft 
MoziIIaPIugins 
ODBC 
Policies 
Rapid7 
RegisteredAppIications 
Smart-X 
STEALTHbits 
TrendMicroUninstaIIed 
VMware, Inc. 
W ow6432Node 
Adiscon 
Caphyon 
Citrix 
ProductCodes 
SmartAuditor 
Database 
Classes 
Clients 
Key Metric Software 
Microsoft 
MoziIIaPIugins 
ODBC 
Policies 
RegisteredAppIications 
SNIA 
VMware, Inc. 
Volatile 
SYSTEM 
HKEY USERS 
HKEY CURRENT CONFIG 
Default 
DatabaseName 
SmAudDatabaseInstance 
Type 
REG SZ 
REG SZ 
REG SZ 
CitnxSessionRecording 
Computer\HKEY

 

 

  1. Then update the location as well to the new database name

  2. HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\SmartAuditor\Server\SmAudDatabaseInstance

 

Machine generated alternative text:
File 
Def 
Do ma 
Edit 
View Favorites Help 
HKEY CLASSES ROOT 
HKEY CURRENT USER 
HKEY LOCAL MACHINE 
8CDDDDDDDDO 
HARDWARE 
SAM 
SECURITY 
SOFTWARE 
p yon 
Carbon81ack 
Citrix Desktop Delivery Contro 
Citrix Session Recording 
Metalnstall 
Server 
XenDe5ktop 
Classes 
Clients 
Microsoft 
MoziIIaPIugins 
ODBC 
Policies 
Rapid7 
RegisteredAppIications 
Smart-X 
STEALTHbits 
TrendMicroUninstaIIed 
VMware, Inc. 
W ow6432Node 
Adiscon 
Caphyon 
Citrix 
ProductCodes 
(Default) 
nstalled 
AllowLivePIayback 
ab DatabaseFaiIoverPartner 
ab DatabaseName 
' erredHashCaIcFiIeSizeThreshoId 
r ntTimeInHours 
EnableAnaIytics 
EnableRecordingActionLogging 
EnableSRStorageLogging 
EnableWeb8asedSrPIayer 
FileStorageDirectories 
Logging810ckState 
ab LoggingDatabaseFaiIoverPartner 
ab LoggingDatabaseName 
LoggingLoggingState 
MaxOpenFiIes 
NotifyMessage8yCuIture 
NotifyMessageDefauIt 
PlaybackProtection 
PlayerUserR8ACEnabIedKey 
PolicyFiIePath 
PolicyFiIeRefreshPeriodI nSeconds 
Role8asedSecurityEnabIed 
RolloverFiIeSizeI nM8 
RolloverTimeI nHours 
b Si nin CertificateThumb rint 
b SmAudDatabaseInstance 
b TempRestoreDirectory 
Type 
REG SZ 
REG DWORD 
REG DWORD 
REG SZ 
REG SZ 
REG DWORD 
REG DWORD 
REG DWORD 
REG DWORD 
REG DWORD 
REG DWORD 
REG MULTI SZ 
REG DWORD 
REG SZ 
REG SZ 
REG DWORD 
REG DWORD 
REG MULTI SZ 
REG SZ 
REG DWORD 
REG DWORD 
REG SZ 
REG DWORD 
REG DWORD 
REG DWORD 
REG DWORD 
REG SZ 
REG SZ 
REG SZ 
(value not set) 
DxDDDDDD01 (1) 
DxDDDDDD01 (1) 
CitrixSessionRecording 
DxD02DDDDO (20971 52) 
DxDDDDDD30 (48) 
DxDDDDDDDO (0) 
DxDDDDDD01 (1) 
DxDDDDDD01 (1) 
DxDDDDDD01 (1) 
DxDDDDDD01 (1) 
CitrixSessionRecordingLogging 
DxDDDDDD01 (1) 
DxDDD02710 (IDDDO) 
Your activity with the desktop or program(s) you recently started is being recorded. If you object to this condition, close the desktop or program(s). 
DxDDDDDD01 (1) 
DxDDDDDDDO (0) 
DxDDDD012c (300) 
DxDDDDDD01 (1) 
DxDDDDDD32 (SO) 
DxDDDDDDOc (12) 
FC814EOE4AßCF47D2E8F3CDB3C3D6EECC8S4 
PROD

 

 

 

 

  1. Start services (Citrix Session Recording Analytics Service, Citrix Session Recording Storage Manager).

Machine generated alternative text:
Application Management 
AppX Deployment Service (AppXSVC) 
ASP.NET State Service 
Background Intelligent Transfer Service 
Background Tasks Infrastructure Service 
Base Filtering Engine 
Carbon Black Sensor 
Cb Protection Agent 
'5 Certificate Propagation 
Citrix Session 
cording Analytics Service 
Citrix Session 
ording Storage Manager 
CNG Key Isolation 
COM+ Event System 
COM+ System Application 
Computer Browser 
Processes in... 
Provides inf... 
Provides su... 
Transfers fil... 
Windows in... 
The Fil... 
Collects sys... 
Monitors sy... 
Copies user 
Collects ana... 
Component... 
The CNG ke... 
Supports Sy... 
Manages th... 
Maintains 
Running 
Running 
Running 
Running 
Running 
Running 
Running 
Running 
Running 
Running 
Running 
Running 
Manual 
Manual 
Manual 
Automatic (D... 
Automatic 
Automatic 
Automatic 
Automatic 
Manual 
Automatic 
Automatic 
Manual (Trig... 
Automatic 
Manual 
Disabled

 

 

  1. Citrix Database has been restored

 

Machine generated alternative text:
Application Number of events: 
Level 
Information 
n arma I an 
Error 
Information 
Information 
Information 
Information 
Information 
Error 
Error 
o 
Error 
46,205 
Date and Time 
6/17/2021 PM 
6/17/2021 PM 
6/17/2021 PM 
6/17/2021 PM 
6/17/2021 PM 
6/17/2021 PM 
6/17/2021 PM 
6/17/2021 PM 
6/17/2021 PM 
6/17/2021 PM 
Source 
Citrix Session Recording Logging 
ess•cn eccr Ing rc er 
Citrix Session Recording Broker 
Citrix Session Recording Broker 
Citrix Session Recording Broker 
Citrix Session Recording Broker 
Citrix Session Recording Broker 
Citrix Session Recording Broker 
Citrix Session Recording Broker 
Citrix Session Recording Logging 
Citrix Session Recording Broker 
&.'ent ID 
I DD2 
2037 
2025 
2025 
2025 
2025 
2025 
2037 
6001 
2012 
Task Category 
None 
None 
None 
None 
None 
None 
None 
None 
None 
None 
Event 1002, Citrix Session Recording Logging 
General Details 
Database connection has been restored.

 

  1. Test recording

Machine generated alternative text:
Now Playing 
User: 
Domain: 
Delivery Grot»: 
VDA Machire 
Status: 
Start 
Login 
End: 
Duratiwr 
Session 
Client Name: 
Desktop 
Complete 
8/1 7/2021 PM 
8/1 7/2021 PM 
IC4-CGPtt14 
Untitled - Notepad 
Format Viewu 
Recording capturedl 
Help 
Client Address: 
Client Windows 
Events and Bookmarlß 
Size: 1.092KB

 


No comments:

Post a Comment