#Caché

1 Follower · 4.5K Posts

  

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

Documentation.

Question Fiona Griffiths · Nov 17, 2020

Hi 

Has anyone found a good terminal emulator replacement for Cache Terminal?  

We want one where the up arrow works to bring back the last command typed (without extraneous characters appearing at the beginning of the line) and be able to run D ^JOURNAL and have it display correctly. 

I tried WebTerminal a couple of years back and but it didn't work properly with the journal.  I've tried RoyalTS and that doesn't do up arrow or the journal correctly even though it's supposed to be emulating a VT400. 

Any suggestions?

thanks

4
0 358
Question Kevin Furze · Nov 15, 2020

version cache for windows, 2017.2.1 build 801_3 - windows 10

I had this system set up for 3+ years now, and background tasks such as converting emails,  have always worked, suddenly it's stopped working and I've tracked it down to any network references.

reading the emails, I look for any attachment files, and save them to a network drive before processing them within a class method,

I've been testing it by sending exactly the same email repeatedly and checking the saving of the attached file in both the background and in the terminal.

11
0 596
Question Mikhail Akselrod · Nov 11, 2020

Hi,

Please, advise how to programmatically set "System Mode" value.

Manually this value can be set via Management Portal > System > Configuration > Memory and Startup > System Mode dropdown.

Value can be programmatically obtained via $SYSTEM.Version.SystemMode() , but  I couldn't  find a programmatical way to set it.

Thank you.

5
0 667
Article Alex Kogan · Nov 15, 2020 11m read

Hello all,

               I would like to share the Foreign Key setup I recently used for my project and found it is very useful.  When asking around, I realized that there are some developers out there, who would like more information on explicit foreign key setup, so I would like to briefly discuss explicit foreign key setup and give a quick sample on how to set it up

3
1 817
Question James Casazza · Nov 12, 2020

In Cache WIndows environment:

Trying to use the $SYSTEM.SQL.DDLImport to import XML File that has ClassMethods, no SQL Table, but it doesn't appear to be working. I can use this ClassMethod to create SQL Tables. The manual method I have been using is to go into Cache Management Portal, Classes, Import.

I create an XML file first, then run the following to import but get no errors. Any ideas?

 Do $SYSTEM.SQL.DDLImport("Oracle",%ID,dlxml,logfl,0,"",";",2)

Beginning of XML file looks like...

2
0 273
Question Eduardo Raupp · Nov 13, 2020

Hello there,

Someone know which impact would have my database changing the locale and its collationTable? I understand it should works fine, without any drawback.

Could someone else confirm my assumption or tell me what could happen? Has anyone changed something like that? (Not to russian, japanese, chinese, etc..) 

 About queries.. is there any side effect? 

Regards

1
0 259
Question Florian Hansmann · Nov 10, 2020

Hey Intersystems Community,

I have a Problem with the Session Handling in .csp.

I wrote all my Web Services in .csp-Pages and do the work for example in the OnPreHttp Method for to get some data.

After that the Web Service response is in JSON.

I call These Web Services via fetch in my react Single Page application, also Many request parallel. The react App is Rolled out as index.html.
Everything Works Fine with the session Handling via Cookie.

3
0 524
Question Mark O'Reilly · Nov 10, 2020

Hi:

I have noticed a problem in some new code I did on one of our productions. I think it is leading to 2 problems. 

I have a file, lets call it 1111111111_2300.pdf. 

We make the file UNIQUE to avoid an issue. This filename in the working directory gets a session ID Added to it before the .pdf. So lets say it was session ID 9 it would be 1111111111_2300#SID9.pdf in a working directory . 

There are further operations to be done on this document before it is sent. For various errors an email is sent back to service users. 

3
0 215
Discussion Andre Larsen Barbosa · Nov 10, 2020

I have already asked a question about migrating an Oracle database to Caché, and I was promptly answered.Now, I have one more question, however it is more conceptual.In general, any tool defends its benefits, and looking at Caché's, among many, there is a lot of talk about speed.The question is, if I already have a database, and at the moment, its performance is not a problem, I would like to know what else could influence the change of this database?Remembering that it is functional and without any apparent problem.

2
1 292
Question Daniel Aguilar · Nov 4, 2020

Good Morning,

I have this question for a long time. When I make an insert by SQL from an external application in the fields of type %String, if they are empty, it writes the character $c(0) in the global.

Is there a way so that if an Insert is received in a field of type% String with null value instead of the $ c (0) it leaves it empty?:

I have the class defined like this:

Class User.MiClase Extends (% Persistent,% XML.Adaptor)

and the property like this:

Property myProperty As% String;

I have tried creating a trigger or setting default values but it doesn't work.

7
0 1201
Discussion Dmitry Maslennikov · Nov 9, 2020

Let's imagine you have to implement a method with a definition

/// Set value to %session.Data
ClassMethod setValue(params...) As %Status
{
}

How it should work

do ..setValue("key1", "val")

is equal to

set %session.Data("key1") = "val"

and 

do ..setValue("key1", "key2", "key3", "key4", "val")

is equal to 

set %session.Data("key1", "key2", "key3", "key4") = "val"

so, quite simple, any amount of arguments, while the latest one is a value, and any previous is an index, should accept at least 2 arguments.

How would you implement this method?

15
0 330
Question Kranthi kiran · Nov 6, 2020

Hi Cache team, I am in the need of listing all the user defined schemas that are present my Cache db and also the user defined tables and views and Columns of those tables and views through Queries. So that I can write some JDBC code to run the queries and fetch the above metadata. Any help is appreciated.

Thanks in Advance,

Kranthi kiran.

2
0 2883
Question Nael Nasereldeen · Apr 16, 2018

Hi,

I need to read a UTF8 encoded text file and translate the content to 8-bit.

Using %File class and $ZCVT(TXT,"I","UTF8") works , but I see that if the content is larger than max string  (32000) and we cut the content

To max string chunks, we can get a <translate> error if we cut it in the "wrong" point..

Is there a better way to do this task?

My code looks like this:

    S file=##class(%File).%New(..LocalFileName)
    D file.Open("R")
    While 'file.AtEnd {    
        S Line=$ZCVT(Line,"I","UTF8")
    }
    D file.Close()

and an example of such an error:

10
0 2211
Job Raju K · Nov 3, 2020

Position: Intersystems Developer / IRIS Developer (Please send me your resume to  raju@intellisofttech.com  )

Location: 100% Remote

Duration: 6 Months Contract To Hire

Skills:   Cache DB, Object Script, Intersystem, Ensemble (oldest one , )Healthconnect (Middle version ), Healthshare(Latest version ), Mumps

Top Requirements:

2
0 444
Question John Lisa · Oct 30, 2020

I'm looking for the best strategy for extracting data from a Cache table that houses 86 Million lines of data and around 190 columns. I'm currently using DBeaver and the Invoice Service dates go back to 1996. Optimistically I'm looking to pull to a pipe delimited flat file, but even a year's worth of data takes many hours to get query results.

Any suggestions for the best practice/strategy?

Thanks,

John

2
0 431
Article Eduard Lebedyuk · Feb 5, 2016 11m read

Class Queries in InterSystems IRIS (and Cache, Ensemble, HealthShare) is a useful tool that separates SQL queries from Object Script code. Basically, it works like this: suppose that you want to use the same SQL query with different arguments in several different places.In this case you can avoid code duplication by declaring the query body as a class query and then calling this query by name. This approach is also convenient for custom queries, in which the task of obtaining the next row is defined by a developer. Sounds interesting? Then read on!

17
7 7568
Question Jude Mukkadayil · Oct 29, 2020

Hi,

         Can anyone please recommend an editor for cache database. I am looking for free version.

I am using winsql free version but data is missing while extracting or copying data from winsql.

Thanks

Jude

3
0 520
Question Phuc Nguyen · Oct 27, 2020

Hello,

I have a csp that occasionally will show Timeout error.

 


I am looking at the SQL Statements tab of the SQL Explorer:

The Average time is around 1.4, what would cause the CSP page to timeout if the query average time is 1.4 while the CSPGateway Server Response Timeout and Queued Request Timeout are default to 60 seconds? Does sql query from CSP that causes web pages to timeout get logged into SQL Statements ?

Thanks

9
0 405
Question Arun Kumar · Oct 29, 2020

Hi All,

Can you please guide me on how to restore the .cbk file from the 2015 Cache version into the 2017 version or any other versions of Cache or IRIS software? I have a new instance on my server. It's an entirely new server. I have a .cbk backup file.  I want to restore the backup file into a new namespace which one I will create on my new server.  When I am trying on ^DBREST utility, I am getting "This is not a Cache Backup File" this error. 

Please advise on this. It's a bit urgent.

Thanks,

Arun Kumar. 

6
0 562
Article Steven Hobbs · Oct 8, 2019 7m read

$LIST string format and %DynamicArray and %DynamicObject classes

IRIS, and previously Cache, contain several different ways to create a sequence containing a mixture of data values.  A data sequence that has been available for many years is the $LIST string.  Another more recent data sequence is the %DynamicArray class, which along with the %DynamicObject class, is part of the IRIS support for JSON string representation.  These two sequences involve very different tradeoffs.

$LIST String Format

4
10 3292
Question Daniel Buxton · Oct 20, 2020

Hey, 

I have a value in epoch time in which I need convert in order to be able to lookup a table that has dates in YYYY-MM-DD HH:MM:SS format

I thought the below would work but it is not.

select COUNT ('Arrival Time') FROM dbo.table where 'Arrival Time' < DATEADD(ms, CONVERT(int,LEFT(1603173432000, 20)), '1970-01-01 00:00:00')

8
0 424
Article Anton Umnikov · Apr 7, 2016 1m read

Presenter: Anton Umnikov
Task: Identify your slowest SQL queries and tune them for better performance
Approach: Use InterSystems’ query profiling and analysis tools. Discuss how system configuration can affect performance
 

This session will show you how you identify the weakest link in your application SQL and introduce you to the fine art of tuning those queries. To do this we will take a look at InterSystems query profiling and analysis tools, as well as how system configuration can impact SQL performance.

Problem: Obscurity on how our SQL engine works

2
0 403
Article Mikhail Khomenko · May 15, 2017 12m read

Prometheus is one of the monitoring systems adapted for collecting time series data.

Its installation and initial configuration are relatively easy. The system has a built-in graphic subsystem called PromDashfor visualizing data, but developers recommend using a free third-party product called Grafana. Prometheus can monitor a lot of things (hardware, containers, various DBMS's), but in this article, I would like to take a look at the monitoring of a Caché instance (to be exact, it will be an Ensemble instance, but the metrics will be from Caché). If you are interested – read along.

9
5 4457