Article Megumi Kakechi · Oct 2 2m read How to compare the contents of two globals InterSystems FAQ rubric The ^%GCMP utility can be used to compare the contents of two globals. For example, to compare ^test and ^test in the USER and SAMPLES namespaces, it would look like this:*In the example below, 700 identical globals are created in the two namespaces, and the contents of one of them is changed to make it the detection target. #ObjectScript #Tips & Tricks #InterSystems IRIS #Caché #Ensemble #InterSystems IRIS for Health 5 0 1 35
Article Megumi Kakechi · Sep 25 2m read About parallel queries (%PARALLEL) InterSystems FAQ rubric One way to optimize query performance is to use query parallelism on a per-query or system-wide basis (a standard feature). This is a technique for dividing the execution of a particular query among processors on a multi-processor system. The query optimizer will execute parallel processing only if there is a possibility of benefiting from parallel processing. Parallel processing is only applicable to SELECT statements. #SQL #Tips & Tricks #InterSystems IRIS #Caché #Ensemble #InterSystems IRIS for Health 2 0 0 28
Article Megumi Kakechi · Sep 4 2m read Link tables programmatically InterSystems FAQ rubric In InterSystems IRIS, you can create linked tables using commands, instead of using System Explorer > SQL > Wizard > Linked Tables in the Management Portal: #Tips & Tricks #InterSystems IRIS #InterSystems IRIS for Health 3 0 1 62
Article Megumi Kakechi · Dec 5, 2024 1m read How to raise a custom error InterSystems FAQ rubric If you want to raise an arbitrary custom error in a TRY block, you can pass an exception with a throw as follows. In the following example, a custom error is raised if Stcount is less than 1. #ObjectScript #Tips & Tricks #InterSystems IRIS #Caché #Ensemble #InterSystems IRIS for Health 12 1 2 418
Article Megumi Kakechi · Nov 14, 2024 1m read How to control the order of columns displayed when accessing from an ODBC tool InterSystems FAQ rubric By default, the order of columns in a table is determined automatically by the system. To change the order, explicitly set the order for each property using the property keyword SqlColumnNumber when defining the class. Example: Property Name As %String [SqlColumnNumber = 2]; Please see the documentation below. #SQL #Tips & Tricks #InterSystems IRIS #Caché #Ensemble #InterSystems IRIS for Health 8 0 0 208
Article Megumi Kakechi · Nov 7, 2024 1m read How to programmatically obtain a list of configured namespaces InterSystems FAQ rubric It can be obtained with a List query of the %SYS.Namespace class. 1. Create a routine like this: #System Administration #Tips & Tricks #InterSystems IRIS #Caché #Ensemble #InterSystems IRIS for Health 6 4 1 465
Article Megumi Kakechi · Sep 26, 2024 1m read How to change the instance (configuration) name InterSystems FAQ rubric On Windows, this cannot be changed, but on Unix-like platforms, it can be changed using the iris rename command. iris rename instname(<current instance name>) newname(<new instane name>) For more information about the iris rename command, please refer to the following document: About the iris command #Tips & Tricks #InterSystems IRIS #InterSystems IRIS for Health 2 0 0 281
Article Megumi Kakechi · Aug 15, 2024 3m read How to identify which temporary globals are consuming size in the IRISTEMP database InterSystems FAQ rubric Temporary globals stored in the IRISTEMP/CACHETEMP databases are used when a process does not need to store data indefinitely, but requires the powerful performance of globals. The IRISTEMP/CACHETEMP databases are not journaled, so using temporary globals does not create journal files. The system uses the IRISTEMP/CACHETEMP databases for temporary storage and are available to users for the same. #Globals #System Administration #Tips & Tricks #InterSystems IRIS #Caché #Ensemble #InterSystems IRIS for Health 5 0 6 381
Article Megumi Kakechi · Jul 18, 2024 1m read How to put application logs into the global ^ERRORS InterSystems FAQ rubric This can be done with TRY-CATCH: #ObjectScript #Tips & Tricks #InterSystems IRIS #Caché #Ensemble #InterSystems IRIS for Health 10 1 0 262
Article Megumi Kakechi · May 23, 2024 2m read TIMESTAMP type format InterSystems FAQ rubric The TIMESTAMP type corresponds to the %Library.TimeStamp data type (=%TimeStamp) in InterSystems products, and the format is YYYY-MM-DD HH:MM:SS.nnnnnnnnn. If you want to change the precision after the decimal point, set it using the following method. 1) Set system-wide #ObjectScript #SQL #Tips & Tricks #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 3 0 0 294
Article Megumi Kakechi · Apr 18, 2024 1m read How to restore the prompt when an error occurs while running a program in the terminal InterSystems FAQ rubric When you run a routine in the terminal and an error occurs in the program, if you have not set the error trap properly, the program will enter debug mode as shown below. #Terminal #Tips & Tricks #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 6 0 1 223
Article Megumi Kakechi · Jan 11, 2024 2m read What to do with the error 5369: Class is currently being compiled by process InterSystems FAQ rubric This error occurs when an instance of the class is already open at compile time. There are two ways to deal with this issue: Terminate the process or application that has the instance open Compile options in the studio build menu: Check the compile flag “Compile classes in use” and compile. If you want to determine which process is using the class, try the sample routine below. #Tips & Tricks #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 4 1 0 200
Article Megumi Kakechi · Jan 4, 2024 1m read What to do when a large amount of memory is used while processing relationships InterSystems FAQ rubric If a relationship is set and there is a large number of n in a 1:n ratio, a large amount of memory may be consumed due to sequential processing of the relationship. After referencing a many-sided object in a program and internally swizzling it, simply releasing the variable containing the OREF (deleting it, setting another value, etc.) will not free the many-sided object and the relationship object. This is the cause. #Tips & Tricks #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 3 0 0 309
Article Megumi Kakechi · Dec 7, 2023 2m read What to do if a <PROTECT> error occurs when importing a routine with % InterSystems FAQ rubric To resolve the error <PROTECT>, remove the read-only attribute of the system-wide library database (IRISLIB for InterSystems IRIS, CACHELIB for Caché/Ensemble/HealthShare (Caché-based)) Once you have finished importing the routine, remember to change it back to read-only. [Version 2013.1 and above][Management Portal] > [System Administration] > [Configuration] > [System Configuration] > [Local Database] Uncheck "Mount read-only" from the database name link. #System Administration #Tips & Tricks #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 4 3 0 516
Article Megumi Kakechi · Nov 23, 2023 1m read How to execute the OS commands InterSystems FAQ rubric When executing OS commands, use $ZF(-100). #ObjectScript #Tips & Tricks #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 4 2 1 482
Article Megumi Kakechi · Oct 19, 2023 2m read How to know the size of database cache (global buffer) in use InterSystems FAQ rubric A tool (^GLOBUFF utility) is available to check the database cache usage for each global variable. You can run the utility directly or programmatically in the %SYS namespace. Here's how to run the utility directly: #ObjectScript #Tips & Tricks #Tools #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 9 5 1 874
Article Megumi Kakechi · Sep 28, 2023 2m read How to save and restore images in an object using Base64 strings InterSystems FAQ rubric In the sample below, an image file is encoded into a Base64 string in a class property, saved, decoded again with Base64, and restored to another file. 【Usage class】 Class User.test Extends %Persistent { Property pics As %GlobalBinaryStream; } 【When importing】 #ObjectScript #Tips & Tricks #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 7 2 2 649
Article Megumi Kakechi · Aug 24, 2023 1m read How to get database's free space programmatically InterSystems FAQ rubric You can see the free available space for the database using the radio button "Free Space View" in Management Portal: System Operation > Databases. And it can be obtained programmatically by the FreeSpace query of the system class SYS.Database. #Databases #System Administration #Tips & Tricks #Tools #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health 2 0 1 313
Article Megumi Kakechi · Aug 10, 2023 2m read How to compare multiple globals and routines in two databases InterSystems FAQ rubric ※Use this method if you want to compare databases that have been replicated using mirroring, shadowing, or some other mechanism. You can use the DATACHECK utility to compare global variables. Please refer to the document below.Overview of DataCheck [IRIS] *** Routine comparisons use the system routine %RCMP or the Management Portal. Below is how to use it in the Management Portal. #System Administration #Tips & Tricks #Caché #InterSystems IRIS #InterSystems IRIS for Health 6 0 2 392
Article Megumi Kakechi · Aug 3, 2023 1m read How to customize web gateway error messages InterSystems FAQ rubric You can set individual error pages for the following Web Gateway error messages/system responses: server error server busy server unavailable server timeout connection closed Settings are made on the Web Gateway Management screen ([Management Portal] > [System Administration] > [Configuration] > [Web Gateway Management] > [Configuration] > [Default Parameters]). In the Error Page section of the Default Parameters menu, set the filename of the html page to display or the URL to redirect to when an error occurs. #CSP #Tips & Tricks #Web Gateway #InterSystems IRIS #InterSystems IRIS for Health 1 0 1 346