I am writing a report for a client that will create a report of the current process with a format that mimicks the Management Portal process display. I am writing a cterm script file to generate the report.
In the loop that process the results I am writing the columns in a formatted manner that will result in a CSV format very similar in content and order the process page. However, it appears that the write statement is limited in size such that I can not write out all of the elements of the sys.process query. My query result processing that works correctly is of this format:
I have an ObjectScript class with a Log property of type %Stream.GlobalCharacter. I need to search the end of each of the logs - is there a way to extract the last 10 lines of the Log stream for each object via SQL? Or is my only option to write an ObjectScript routine to walk the table and inspect each Log property one by one?
The goal is to construct a comma separated string, using a loop but the same way $listtostring(var,",") would do (i.e. "a,b,c,d,e,f,g,h" without starting or ending comma).
What is the best way to do it, concerning the readability of the code and its performances?
To do so, there are more than 5 methods, but in this example we will test 4 :
Hello everyone I use cache script, I would like to know from you if there is any function or class in the cache where I can get the start and end date of a given month: Example: What is the first and last day of the month of February 2015.
Upon creating namespace I selected same database for both Globals and Routines. How can I separate both the databases. Please note that I already have data and code saved in database.
I have a complex ZEN PDF report that has multiple tables that essentially are the same but are populated by different global definitions. The code has hardcoded groups for these tables but I would like the number of tables to be variable as many as there are global levels for a particular report.
Is there any way that I could build a report from a variable source of data rather that hardcoding 10 or more exact sections like the code below ?
Interesting issue we found. When making an ODBC connection from a host via RDP, the IP address shown as making the connection is the client IP address, not the host from where the connection initiated. Has anyone seen that or know how to get around it?
Example:
My Computer(10.X.X.112) -> RDP to Host1(10.X.X.93) -> ODBC connection to Server1(10.X.X.12). Cache Portal -> System -> License Usage -> Usage by User shows My Computer's IP address as making the connection rather than Host1.
So I am working with an inherited SQL query that queries 8 different tables. 5 of which have over a million records. I have 3 different servers.
Server 1, Server 2 and Server 3. They all have the same data/tables/structure across all servers. Server 3 has an Iris database engine and the other 2 are Cache 2015.1.4.
I have a problem with views and performance across the servers being inconsistent.
Thankfully Server 1 is the current live server that performs "fast enough". Server 2 is being synced from Server 1 and acts as a report server.
I have created new class in VSCode and upon saving it also saved in Cache DB but when I am deleting from VSCode it is not deleting from Cashe DB. How can I remove both class together?
This post provides useful links and an overview of best practice configuration for low latency storage IO by creating LVM Physical Extent (PE) stripes for database disks on InterSystems Data Platforms; InterSystems IRIS, Caché, and Ensemble.
I'm trying to save a list of AccessTokens a user for a specific user. This way I could present it together with other user-data.
I have tried calling ##class(OAuth2.Server.AccessToken).OpenByCode(authCode) from %OAuth2.Server.Authenticate's AfterAuthenticate() method. This only returns things like State and AuthorizationCode, but the AccessToken is empty at this point (afterwards it becomes filled out).
Is there a way to achieve storing the AccessToken as part of the login system?
The index we want to use is called "iFilter". Currently we use the following technique of ignoring all other indices because the automatically chosen index is always too slow.
I am trying to get a list of databases using the DatabaseByServer method but I am only getting an empty string. I have not found any useful examples of the proper usage of this class/method.
I have tried 2 formats. First
set dbList=""
set db=##class(Config.Databases).DatabasesByServer("my-host",.dbList)
I also tried:
set db=##class(Config.Databases).DatabasesByServer("my-host",.dbList,"/cachesys/")
In each case dbList is empty string. I can not figure out what I am missing.
Is there an InterSystems supported dotnet core library or community contributed repo on the horizon? At this time we are exploring installing the ODBC driver in our containers but would rather use more robust solution.
I am new to cache. In an interview i was asked how to optimize a sql query.
I just said I will create index on conditions which are present in where clause. But as per interviewer I should check How query plan is getting executed. This will help in optimizing Sql queries.
I want to know what will be the answer for how to optimize SQL query in cache.
I am new to cache. I know there are 2 types of methods in cache. One is Instance method (Which can be call through object creation of particular class) and other is Class methods (which can be call through ##Class(MyPackage.Car).CarModels()).
I want to know the difference when to create a instance method vs when to create a class methods.
I wanted to write it as a comment toarticle of @Evgeny Shvarov . But it happens to be so long, so, decided to post it separately.
I would like to add a bit of clarification about how docker uses disk space and how to clean it. I use macOS, so, everything below, is mostly for macOS, but docker commands suit any platform.
The database is increasing a lot (almost a 1TB) and getting bigger with no sense after migration, the use of the plataform did not increase after the migration so is strange for us this increase.
how can I check everything is ok in the database? for example any table getting bigger.
Could you help me please. I am a VistA Application Administrator for the State of Tennessee and I have been using your web site: https://www.bmirwin.com/vnode/dictionary/index.php to write reports for the Health Departments in my state and I see it was shut down on 9/1/21.
I have a client running cache on an AIX platform. I put together a objectscript to allow for the viewing the processes running against the database using a select from SYS.Process. One of the values I want in the view of the processes information is Jobtype but I want to convert it from the numeric value to a string value. In the Intersystems documentation there is a reference to an include file $syPidTab.inc that should include macros that make this translation. I have not been able to track down this include file.
There is a finite list of date formats that users want to use to enter a date in a form. These formats include single digits for month and day and double digits for year. The field is represented by a dateText control.
How would one get to allow a dateText control to accept multiple date formats ? I see only 3 listed here, do those include using single digits for month and day ?
Is there a way for me to break down the what contributes to the 100% highest license use so i can clearly analyze what processes or user has consume these licenses which cause the 100% license usage?
We have an application that is logged using AWS SSO. We are passing username and password from the AWS SSO to our application for validating the user. But what we need is, we need to login to application without using the password. Is there any possible way available for this?