#Caché

1 Follower · 4.5K Posts

  

InterSystems Caché is a multi-model DBMS and application server. See more details here.

Documentation.

Article Megumi Kakechi · Jun 15, 2023 1m read

InterSystems FAQ rubric

Query cache can be purged programmatically using the Purge* methods of the %SYSTEM.SQL class.

*For details of each method, please refer to the following documents.

%SYSTEM.SQL class【IRIS】

%SYSTEM.SQL class

① When deleting all query caches in the system

Do $SYSTEM.SQL.PurgeAllNamespaces()


② When deleting the query cache in the namespace

// delete all cached queries in namespace
Do $SYSTEM.SQL.Purge()
// when deleting the query cache specified by date
// the following deletes the cache not used in the last 30 days

Do $SYSTEM.SQL.Purge(30) 
0
0 386
Question Michael Gosselin · Jun 12, 2023

This is for the veteran programmers out there (you know who you are; you started programming before date 60000). 

I'm in the middle of updates for our system, and I've come across many $ZU() calls. Most of them are documented in the "Replacement List", but two are missing: $ZUtil(0) and $ZUtil(1).

I honestly don't remember what these are for (and I'm pretty sure I used them in code in a previous century), so if someone can tell me, great.  If you can provide a link to a reference, better!  

As always, I appreciate your help.

10
0 476
Question Hari Haran · Jun 14, 2023

This is my delphi code

procedure TForm2.Button1Click(Sender: TObject);
var
 cmd:string;
 sResult:string;
begin
    cmd:='$$Check^logininput()';
    vism1.Code:=cmd;
    sResult:=vism1.Value;
end;

end.

1
0 259
Article Hiroshi Sato · May 25, 2023 2m read

This is an article on the InterSystems FAQ site.

 1. Export API

a. Use $system.OBJ.Export() to specify individual routines to export. For example:

do $system.OBJ.Export("TEST1.mac,TEST2.mac","c:\temp\routines.xml",,.errors)

The format to specify is routine name.extension, and the extension is mac, bas, int, inc, obj.

Errors during export are stored in errors.

See the class reference %SYSTEM.OBJ for details on $system.OBJ.Export().

b. Use $system.OBJ.Export() even when exporting with wildcards. For example:

do $system.OBJ.Export("*.mac",c:\temp\allmacroutines.xml")
2
2 761
Question Nick Hershberger · Jun 13, 2023

We've implemented SAML authentication for our application where we are the service provider and various other entities are the identity providers. We've done successful connections with several identity providers including Okta, Duo Mobile, Ping Identity, and Azure. Validating the SAML response with signed assertions has been working great. Now, I am trying implement support for the SAML assertions in the response being encrypted for a new identity provider and struggling to understand procedurally how to go about this. From the sample XML below, I assume I need to decrypt the <CipherData>

0
0 445
InterSystems Official Bob Kuszewski · Jun 2, 2023

We often get questions about recent and upcoming changes to the list of platforms and frameworks that are supported by the InterSystems IRIS data platform.  This update aims to share recent changes as well as our best current knowledge on upcoming changes, but predicting the future is tricky business and this shouldn’t be considered a committed roadmap. 

With that said, on to the update…

2
0 581
Question Dominic Chui · Apr 6, 2022

Is there a reason why calling %ExecDirect() (or %Execute) won't set the %SQLCODE of the result set to 100 even when the query returns no data?

Here is the code in question with a bit of contrivance to force the issue:

set statement = ##class(%SQL.Statement).%New()
set result = ##class(%SQL.Statement).%ExecDirect(statement,"select top 0 0 from Example.Testing")
w result.%SQLCODE

The %SQLCODE is set to 0 in this case. The same happens if I use %Prepare and %Execute, e.g.

8
0 741
Article Mihoko Iijima · Jun 8, 2023 1m read

InterSystems FAQ rubric

Since SELECT ... FOR UPDATE is implemented in many RDBMS as a method of explicit row lock acquisition, I think there are many cases where this function is used.

This syntax is not an error for InterSystems products, but it does not acquire row locks as expected.

This article will show you how to achieve equivalent functionality.

DECLARE CURSOR C1 IS
SELECT Name FROM Person WHERE Name LIKE 'A%' FOR UPDATE
OPEN C1
LOOP FETCH C1 INTO name 
... show name
... EXIT the LOOP when finished
END LOOP
CLOSE C1
0
0 369
Article Hiroshi Sato · May 18, 2023 2m read

InterSystems FAQ rubric

Using the Config.Configuration class and SYS.Database class methods, you can create and register a namespace database from the terminal.

Below is a series of execution examples that create database file /CacheDB/AAA/cache.dat and register database AAA and namespace AAA in the configuration file (cache.cpf).
* Execute in the %SYS namespace. *

* Make sure that this script runs as the user  that is used for all IRIS processes to ensure that the directory has appropriate ownership and permissions *

3
0 483
Question Kevin McGinn · Jun 5, 2023

I need to mount a database from another system. We have copied a device from another systems and mounted the device. I want to mount the cache database on this new device to our current instance of cache. If I add the name and path of this new device to the cpf file, the instance fails to start stating the database does not exist. If I attempt to create the database via the management portal, the new device is not accessible. I am missing something but I am not sure what it is. What do I need to do to make the imported device accessible by my cache instance?

3
0 226
Article David Hockenbroch · Jun 2, 2023 5m read

We are looking at what we need to do to migrate from our current usage of Zen reports to InterSystems Reports. One of the hurdles for us is figuring out ways to interact with InterSystems reports programmatically from ObjectScript routines. There is a Java API for it, but it is possible to generate a report from InterSystems reports to a stream object in ObjectScript without diving into Java by using a %Net.HttpRequest. Here is a code example, followed by an explanation:

0
0 253
Question Thembelani Mlalazi · May 18, 2023

I am trying to call to a website that renders a xml structure as a response.if I put the url on the browser an xml rendered page is returned but if i call to this using the below code I get an object reference error which I am finding had to understand is there anyone who could help understand this error or point me in the right direction thanks.

Set tSC=$$$OK

2
0 375
Question Clarissa John · May 31, 2023

I have been trying to do a backup from tape using the D ^DBREST command.  I am not able to connect to the tape drive, that recently got replaced.  It is configured and I can see it with IBM's ITDT.  I did a test and it came back with the error below:

Are there any suggestions on how to fix this or what commands to use to get this opened and connected?  I do appreciate it.

0
0 156
Question Fabio Care · May 26, 2023

In the Windows Ressource Manager I can observe multiple parallel processes coming from cache.exe with read operations to journaling files.

All except one of these processes have the same reads(Byte/s). The processes point to different journal files and constantly read between 200 and 3000 Bytes/s.

The corresponding process via PID in the management portal of Caché shows the process %SYS.Monitor.Control.1. In 3 days of uptime on the server it has run 181.632.583 commands and modified 32.140.642 globals. 

2
0 256
Question Ran Kahane · May 17, 2023

Hello,

We have recently encountered an issue which requires us to define a new identity field (named xMDA in the attached example), instead of using the default ID field.

We need to run an SQL query which unfortunately overrides the ID field (see attached image) but we still need to be able to access the ID field in said query.

We are however unable to get the attached solution to work. Is there a way to get around this issue?

0
0 203
Question Lucas Galdino · Apr 27, 2023

Dear experts,
Please, could you help me?

Im trying import a global:

ACB> K ^GlobalManualSend
ACB> D $System.OBJ.Load("C:\Users\BNAPC\GlobalManualSend.xml")
ACB> Set sc = ##class(%Studio.Project).InstallFromGbl("^GlobalManualSend","fv")

But is returning a error about version:

Please, could you help me about it?

Thank you.

5
0 338
Question Stella Ticker · May 12, 2023

Has anyone had success with passing in a collections  property within a SOAP request to a Soap Service in Ensemble? Please reply with how you set up that collections property. I am able to successfully send a SOAP request correctly containing the elements of the collection property to Cache, as seen in a custom soap log file which I am using to troubleshoot. But the collection property in the  Ensemble request is not getting serialized, meaning MyContainers has nothing.

My.Request consists of a property, MyContainers, which can have 0 or more Containers (My.Container)

1
0 209
Article Robert Cemper · Feb 16, 2021 2m read

As you know ObjectScript has neither FOREACH system command nor system function.
But it has a wide room for creativity.

The task is to loop over a global or local array and do something FOR EACH element.

There are 2 possible solutions:

  • creating a macro that generates the required code sequences
  • creating an Extended Command to perform the action. Both ways are presented here. The macro is a generic and quite flexible solution and easy to adapt if required.
1
2 1187
Question Kevin McGinn · Apr 20, 2023

Reviewing a client console log, I am finding the message:

Terminal disconnect: The specified network name is no longer available.
 

This message is repeated in the log dozens of times per day over the last month. The client has not raised a concern and our monitoring has not detected any issues with client ops. The client is not aware of any recent changes with their apps. I am not familiar with this message and whether this message is benign or whether there is any action required,

1
0 427
Article Mihoko Iijima · May 11, 2023 2m read

InterSystems FAQ rubric

You can use the system routine ^DBSIZE to estimate the backup file size (see also Note 1).

^DBSIZE estimates the file size of full, cumulative, and differential backups of the databases selected in the database backup list.

The database backup list is created from [System Administration] > [Configuration] > [Database Backup] > [Database Backup List] in the Management Portal.

For more information, please refer to the document below.

Estimate backup size with ^DBSIZE [IRIS]

Estimate backup size with ^DBSIZE

An execution example is as follows.

0
0 359
Article Mauro Aguirre · May 11, 2023 13m read

Several steps should be done in order to secure the connection through xDBC clients to an IRIS Server instance using TLS. Most of the information can be obtained from the documentation about TLS on IRIS here, about configuring the security layer for encrypted connections. In the next paragraphs we will cover an step-by-step guide on how to configure and test the connection using SQL Clients apps using ODBC and JDBC.

You can download the drivers from InterSystems IRIS Driver Packages

Configuring IRIS SuperServer to use TLS

IRIS Documentation on this link

0
2 1117
Question Anna Golitsyna · Apr 13, 2023

Is there any ObjectScript or a basic function that takes a string and separates it into words + punctuation/spaces array/list? Just not to reinvent the wheel. Say, process "It is a test, after all" into "It", space, "is", space, "a", space, "test", ", ", "after", space, "all". Or something to that effect.

9
0 405
Article Eduard Lebedyuk · Apr 17, 2017 4m read

In this article I'll cover testing and debugging Caché web applications (mainly REST) with external tools. Second part covers Caché tools.

You wrote server-side code and want to test it from a client or already have a web application and it doesn't work. Here comes debugging. In this article I'll go from the easiest to use tools (browser) to the most comprehensive (packet analyzer), but first let's talk a little about most common errors and how they can be resolved.

2
5 3803
Question Vinay Purohit · Apr 28, 2023

Hi,

I have created two CSP pages. One is the Login page and the other page show the patient details from the database.

I want to set the session dynamically just after the successful login and after login it will be redirected to the Patient Details page. If session timeout, then wants to redirect back to the login page.

Thanks in advance.

Vinay Purohit

1
0 340
Question Sai Vusirikapally · Apr 28, 2021

Hi everyone,

I'm currently developing a TCP inbound Service to read some XML sent from a TCP Operation that uses EnsLib.TCP.CountedOutboundAdapter.

1) I have tried EnsLib.TCP.Inbound adapter but that gives this error:

ERROR <Ens>ErrException: <METHOD DOES NOT EXIST>zinitConfig+7 ^Ens.Host.1 *%New,EnsLib.TCP.InboundAdapter -- logged as '-'
number - @'
Set ..Adapter = $classmethod(..#ADAPTER,"%New")'

Due to this, the adapter is unable to start listening for incoming connections.

7
0 1049