Skip to main content

Config.Journal

persistent class Config.Journal extends %Library.Persistent, Config.CommonSingleMethods, Config.CommonProperties, %SYSTEM.Help [ Final ]

SQL Table Name: Config.Journal

This class allows you to modify and view the [Journal] section of the CPF file through programatic APIs. While properties are usually modified through the System Management portal, there may be some occasion where modifying them through the API's is best for your system. In all the Config methods, if you do not specify the CPFFile parameter, the currently active CPF file is used. If you wish to modify a CPF file which is not the currently active one, then specify the CPFFile you wish to modify in the method call.
The Flags parameter does not normally need to be specified; the defaults are usually sufficient for most cases.
You can use the provided API's (Get/Modify) to modify the properties by passing in the correct parameters.

NOTE: You cannot use object syntax to directly modify the [Journal] parameters. You MUST use the API's found in this class.

EXAMPLE:

; Use class methods to modify properties
%SYS>s Status=##Class(Config.Journal).Get(.Properties)
%SYS>i 'Status w !,"Error="_$SYSTEM.Status.GetErrorText(Status)
%SYS>zw Properties
Properties("AlternateDirectory")="C:\AppDB1\Mgr\Journal\"
Properties("ArchiveName")=""
Properties("BackupsBeforePurge")=2
Properties("CurrentDirectory")="C:\AppDB1\Mgr\Journal\"
Properties("CompressFiles")=1
Properties("DaysBeforePurge")=2
Properties("FileSizeLimit")=2048
Properties("FreezeOnError")=0
Properties("JournalFilePrefix")=""
Properties("JournalcspSession")=1
Properties("PurgeArchived")=0
%SYS>s Properties("FileSizeLimit")=1024
%SYS>s Status=##Class(Config.Journal).Modify(.Properties)
%SYS>i 'Status w !,"Error="_$SYSTEM.Status.GetErrorText(Status)

Property Inventory

Method Inventory

Parameters

parameter NOTRANSACTIONS = 1;
Setting this flag keeps the journal updates outside of a transaction When %Save() is called in the API's.

Properties

property AlternateDirectory as %SysPath;
Alternate journal directory.
Property methods: AlternateDirectoryDisplayToLogical(), AlternateDirectoryGet(), AlternateDirectoryGetStored(), AlternateDirectoryIsValid(), AlternateDirectoryLogicalToDisplay(), AlternateDirectoryLogicalToOdbc(), AlternateDirectoryNormalize()
property ArchiveName as %String (MAXLEN = 256);
The destination for archiving journal files, given as the name of an archive target defined in the [Archives] section.
Property methods: ArchiveNameDisplayToLogical(), ArchiveNameGet(), ArchiveNameGetStored(), ArchiveNameIsValid(), ArchiveNameLogicalToDisplay(), ArchiveNameLogicalToOdbc(), ArchiveNameNormalize(), ArchiveNameSet()
property BackupsBeforePurge as %Integer (MAXVAL = 10, MINVAL = 0) [ InitialExpression = 2 ];
Number of backups before the journal files (or the archived copies) are automatically purged.
Property methods: BackupsBeforePurgeDisplayToLogical(), BackupsBeforePurgeGet(), BackupsBeforePurgeGetStored(), BackupsBeforePurgeIsValid(), BackupsBeforePurgeLogicalToDisplay(), BackupsBeforePurgeNormalize(), BackupsBeforePurgeSet(), BackupsBeforePurgeXSDToLogical()
property CurrentDirectory as %SysPath;
Primary journal directory.
Property methods: CurrentDirectoryDisplayToLogical(), CurrentDirectoryGet(), CurrentDirectoryGetStored(), CurrentDirectoryIsValid(), CurrentDirectoryLogicalToDisplay(), CurrentDirectoryLogicalToOdbc(), CurrentDirectoryNormalize()
property DaysBeforePurge as %Integer (MAXVAL = 100, MINVAL = 0) [ InitialExpression = 2 , Required ];
Number of days before the journal files are purged.
Property methods: DaysBeforePurgeDisplayToLogical(), DaysBeforePurgeGet(), DaysBeforePurgeGetStored(), DaysBeforePurgeIsValid(), DaysBeforePurgeLogicalToDisplay(), DaysBeforePurgeNormalize(), DaysBeforePurgeSet(), DaysBeforePurgeXSDToLogical()
property FileSizeLimit as %Integer (MAXVAL = 4079, MINVAL = 0) [ InitialExpression = 1024 , Required ];
Maximum size of each journal file in MB.
Property methods: FileSizeLimitDisplayToLogical(), FileSizeLimitGet(), FileSizeLimitGetStored(), FileSizeLimitIsValid(), FileSizeLimitLogicalToDisplay(), FileSizeLimitNormalize(), FileSizeLimitSet(), FileSizeLimitXSDToLogical()
property FreezeOnError as Security.Datatype.BooleanYN [ InitialExpression = 0 , Required ];
Freeze the system if there is an error writing to the journal.
If this option is set to true (1), as soon as the error occurs all global activities that are normally journaled are blocked, which causes other jobs to block. The typical outcome is that the system goes into a hang state until the journaling problem is resolved, and then resumes running. While InterSystems IRIS is hanging, the administrator can take corrective measures, such as freeing up space on a disk that is full, switching the journal to a new disk, etc. This option has the advantage that once the problem is fixed and InterSystems IRIS resumes running, no journal information has been lost. It has the disadvantage that the system is less available while the problem is being solved.
If this option is set to false (0), when a journaling error occurs journaling is entirely disabled, while the system continues running as normal. The system sends a console message to alert the administrator, who can fix the problem and then run ^JRNSWTCH at the console to restart journaling.
Property methods: FreezeOnErrorDisplayToLogical(), FreezeOnErrorGet(), FreezeOnErrorGetStored(), FreezeOnErrorIsValid(), FreezeOnErrorLogicalToDisplay(), FreezeOnErrorLogicalToOdbc(), FreezeOnErrorLogicalToXSD(), FreezeOnErrorNormalize(), FreezeOnErrorOdbcToLogical(), FreezeOnErrorSet(), FreezeOnErrorXSDToLogical()
property JournalFilePrefix as %String (MAXLEN = 64, MINLEN = 0);
Prefixes journal file names with this string.
May be used to distinguish journal files from different instances in the same directory.
Property methods: JournalFilePrefixDisplayToLogical(), JournalFilePrefixGet(), JournalFilePrefixGetStored(), JournalFilePrefixLogicalToDisplay(), JournalFilePrefixLogicalToOdbc(), JournalFilePrefixNormalize(), JournalFilePrefixSet()
property JournalcspSession as Security.Datatype.BooleanYN [ InitialExpression = 0 , Required ];
%cspSession global will be mapped to the TEMP database and not journaled.
Property methods: JournalcspSessionDisplayToLogical(), JournalcspSessionGet(), JournalcspSessionGetStored(), JournalcspSessionIsValid(), JournalcspSessionLogicalToDisplay(), JournalcspSessionLogicalToOdbc(), JournalcspSessionLogicalToXSD(), JournalcspSessionNormalize(), JournalcspSessionOdbcToLogical(), JournalcspSessionSet(), JournalcspSessionXSDToLogical()
property PurgeArchived as %Boolean [ InitialExpression = 0 ];
Whether to purge journal files as soon as they are copied to archive.
Note that purging never occur if files are needed by the system (for crash recovery, mirroring, etc.)
Property methods: PurgeArchivedDisplayToLogical(), PurgeArchivedGet(), PurgeArchivedGetStored(), PurgeArchivedIsValid(), PurgeArchivedLogicalToDisplay(), PurgeArchivedLogicalToXSD(), PurgeArchivedNormalize(), PurgeArchivedSet(), PurgeArchivedXSDToLogical()

Methods

classmethod TranslateTime(TimeValue As %Integer, ByRef ScaleFactor As %Integer) as %Integer
TimeValue: in seconds
Returned value: in seconds, minutes, hours or days, whichever is the largest unit that makes the returned value a whole number.
ScaleFactor: Returned value * ScaleFactor = TimeValue

Indexes

index (CPFNameSectionHeaderName on CPFName,SectionHeader,Name) [IdKey, Type = key, Unique];
Index methods: CPFNameSectionHeaderNameCheck(), CPFNameSectionHeaderNameDelete(), CPFNameSectionHeaderNameExists(), CPFNameSectionHeaderNameOpen(), CPFNameSectionHeaderNameSQLCheckUnique(), CPFNameSectionHeaderNameSQLExists(), CPFNameSectionHeaderNameSQLFindPKeyByConstraint(), CPFNameSectionHeaderNameSQLFindRowIDByConstraint()

Inherited Members

Inherited Properties

Inherited Methods

Storage

Storage Model: Storage (Config.Journal)

^|"^^"_$ZU(12)|SYS("CONFIG")(ID)
=
%%CLASSNAME
AlternateDirectory
BackupsBeforePurge
CurrentDirectory
DaysBeforePurge
FileSizeLimit
FreezeOnError
JournalcspSession
JournalFilePrefix
Comments
CompressFiles
ArchiveName
PurgeArchived
FeedbackOpens in a new tab