Article Sylvain Guilbaud · Oct 19, 2016 7m read

Context: 

mirrored configuration with one primary member and one async member (without failover/backup member)

Purpose:

replace the CACHE.DAT of a mirrored database on the primary member.

 Steps to follow:

  1. on the PRIMARY
    1. remove the database to replace from the mirror
    2. dismount the database
    3. copy the new database
    4. mount the database
    5. add the database to the mirror
    6. backup the database (external backup)
  2. on the ASYNC
    1. remove the database to replace from the mirror
    2. dismount the database
    3. restore the new database backup from the PRIMARY
    4. mount the database
    5. activate database
    6. catch up database
3
0 1049
Article Sylvain Guilbaud · Oct 6, 2016 3m read

to dismount/mount a database, use Dismount() and Mount() methods in SYS.Database class available in %SYS namespace.
NB: the database ID is its Directory

You'll find  some examples of how to dismount/mount and check if a database is mounted (Mounted=1) or not (Mounted=0), and quickly see all the attributes of a database (via zwrite)

2
1 2831
Article Sylvain Guilbaud · Oct 4, 2016 6m read

This sample class will add parameter DSINTERVAL to each class containing the parameter DSTIME

To execute it from a Terminal :


SAMPLES>d ##class(adm.param).add(,,1)
[SAMPLES] parameter DSINTERVAL=5 added to class DeepSee.Study.CityRainfall (via adm.param)
[SAMPLES] parameter DSINTERVAL=5 added to class HoleFoods.Transaction (via adm.param)
[SAMPLES] parameter DSINTERVAL=5 added to class News.DeepSee.NewsArticle (via adm.param)
DSINTERVAL parameter was added to 3 classes
6
1 1100
Article Sylvain Guilbaud · Feb 24, 2016 1m read

C:\data\backup.bat :

C:\InterSystems\Ensemble\bin\cache -s"C:\InterSystems\Ensemble\Mgr" -U%%SYS ##Class(Backup.General).ExternalFreeze() <C:\data\login.scr 

echo %ERRORLEVEL%

rem note that we need to check errorlevel from highest to lowest here....

if errorlevel 5 goto OK

if errorlevel 3 goto FAIL

echo errorlevel returned wrong value

goto END

:OK

echo SYSTEM IS FROZEN

xcopy c:\InterSystems\Ensemble\mgr\ z:\backup\Ensemble /s /e /y /i

echo %ERRORLEVEL%

goto END

:FAIL

echo SYSTEM FREEZE FAILED

:END

rem Now unfreeze the system

0
0 1890