Information Procedure for Restoring AIM Database for troubleshooting, analysis, and most importantly for a failover situation of the database.
1) Stop ATM Ticketing and any other custom Analysts directly effecting ATM Ticketing.
2) Stop ATM Manager in Prognosis Subsys ; if they is still running this procedure will fail.
3) Backed up my existing "\Configuration\ATM" directory on the existing installation IF it is going to be required again.
4) Delete the existing ATM folder or better run an IRCLEAN AIM (which also purges all data/tickets completely so be careful!)
Important: If you just copy over the contents of the restored database over the existing database it will very likely result in a corrupted database that will be non-recoverable!
5) Copy in the ATM folder into place in its entirety to \Configuration\ATM.. the files must be directly under ATM and not under a subdirectory.
Note: There doesn't seem to be a version dependence at least between 11.0-11.4 and possibly earlier / later.
6) Started ATM Manager in Prognosis Subsys; but not yet start your ATM Ticketing or other analysts!
7) Verify the Contents of the AIM Database through the following PQL Queries from a Windows Node, if being executed against a remote note such as a NonStop a "Node <nodename>" can be added after the FROM clause but before the Group by or ASSOCIATE clause.
7a) Verify the Open Ticket Component of the Database
..\irpqlcli -r "Select MIN(TKTNUM) as "FirstTkt", MIN(OpenTime) as "FirstTktTime", MAX(TKTNUM) as "LastTkt", MAX(OpenTime) as "LastTktTime", MIN(EXCPCNT) as "MinNoteC",MAX(EXCPCNT) as "MaxNoteC",ROUND(AVG(EXCPCNT),2) as "AvgNoteC" from MPOPNTKT
7b) Verify the Closed Ticket Component of the Database
..\irpqlcli -r "Select MIN(TKTNUM) as "FirstTkt", MIN(OpenTime) as "FirstTktTime", MAX(TKTNUM) as "LastTkt", MAX(OpenTime) as "LastTktTime", MIN(EXCPCNT) as "MinNoteC",MAX(EXCPCNT) as "MaxNoteC",ROUND(AVG(EXCPCNT),2) as "AvgNoteC" from MPCLSTKT
7c) Verify the Ticket Note History has been restored by executing the following command on a sample (usually the first and last ticket number) with the ticket number being the value after the colon (i.e. ATM:TKTNUM) or 357 in the example below and verify the information.
..\irpqlcli -r "Select TKTNUM, COUNT(TKTNUM) as "NoteCnt", MAX(NoteNum) as "NoteRows", Min(TIME) as "FirstN", Max(TIME) as "LastN" from TKTNOTE GROUP BY TKTNUM ASSOCIATE 'ATM:357' "
8) Restart the ATM Ticketing and any other custom analysts effecting ATM Ticketing.
9) Open up displays and confirm all is functioning as normal.
Solved! Go to Solution.
Thanks @ChristopherS, for the detailed inforamtion - I have upgraded this post to an accepted solutions