Eduard Lebedyuk · Nov 1, 2021 go to post

You can also use this call to expand database non-interactively (size is in mb):

set $namespace = "%SYS"
set sc = ##class(SYS.Database).ModifyDatabase("/path/to/db/folder", size)

It's useful for benchmarks and such.

Eduard Lebedyuk · Oct 27, 2021 go to post

I just like to add that SQL Gateway is an abstraction over both JDBC and ODBC connections.

Eduard Lebedyuk · Oct 23, 2021 go to post

I believe so, but it depends on how large the session is that you have in mind
 

Interoperability Visual Trace starts slowing down on sessions above 100 000 messages, and considerably slows down on 300  000 messages per session.

I'm interested in a tool that would allow me to see these large sessions graphically, currently I work with them via SQL.

Eduard Lebedyuk · Oct 18, 2021 go to post

You can't bypass the challenge.
Neither by $classmetho() nor any code generator as this is all static code frozen and inflexible a runtime.  

Why?

A case where user must be able to:

  • create a code snippet with a predetermined interface
  • choose it for execution among all the code snippets with the same interface

Can be solved in many ways, without indirection (aka executing code stored as a string).

I usually provide a base class, which a user must extend and populate with his own methods. After that in the source app, just call SubclassOf Query from %Dictionary.ClassDefinition to get all implementation and show them to a user to pick from.

Works good enough.

Eduard Lebedyuk · Oct 18, 2021 go to post

Might as well invoke the method directly:

<Invoke Class="%Library.EnsembleMgr" Method="SetAutoStart" CheckStatus="true" >
  <Arg Value="${MyNamespace}" />
  <Arg Value="myProd.Production" />
</Invoke>

Or is there a reason to use a proxy method?

Eduard Lebedyuk · Sep 8, 2021 go to post

The idea of a scrollable result set is to call Save/OpenId - and the result set would continue on a next row automatically. So you don't need to manage to/from indices:

 

Here's an example

It's also about 3 times faster since the query is only executed once:

do ##class(User.Pagination).Time("Save")
Save took 0,0048 sec
do ##class(User.Pagination).Time("NoSave")
NoSave took 0,0143 sec
Eduard Lebedyuk · Sep 5, 2021 go to post

To reclaim disk space from the wsl docker data disk, execute:

wsl --shutdown
diskpart
select vdisk file="C:\Users\<USER>\AppData\Local\Docker\wsl\data\ext4.vhdx"
attach vdisk readonly
compact vdisk
detach vdisk
exit  

Alternatively (requires Windows Pro and HyperV being enabled):

wsl --shutdown
optimize-vhd -Path "C:\Users\<USER>\AppData\Local\Docker\wsl\data\ext4.vhdx" -Mode full
Eduard Lebedyuk · Sep 2, 2021 go to post

Go to System  > Journals, choose any 1GB journal which was just created and press Profile.

Now recalculate by size and you'll see which globals created the most journal records.

Eduard Lebedyuk · Aug 27, 2021 go to post

is there a way for me to execute in SQL for the above?

Of course!

Queries are TVFs, you can CALL them or SELECT from them:

SELECT *
FROM %SYSTEM.License_ConnectionAppList()

Summary:

SELECT *
FROM %SYSTEM.License_Counts()
Eduard Lebedyuk · Aug 26, 2021 go to post

Check %SYSTEM.License queries. There are queries which provide summary and detailed information on license consumption. You can than create a task which runs every minute and if license consumption exceeds say 80%, store current license users into a separate table with a timestamp. Later you can use this table to analyze usage patterns.

Eduard Lebedyuk · Aug 26, 2021 go to post

I need for this operation to run in a same, separate process (on which I need to do bookkeeping) so InProc mode won't work for my use case.

Eduard Lebedyuk · Aug 25, 2021 go to post

Do you have SMP access? If so:

  1. Open any CSP app config, i.e. /csp/user.
  2. Note which folder it takes files from (CSP Files Physical Path property).
  3. Export production/classes/whatever into this folder into one xml file.
  4. Download the file from a browser.
Eduard Lebedyuk · Aug 23, 2021 go to post

Check the permissions/ownership on:

<IRIS>/csp/bin/CSP.ini

Most likely irisusr is unable to access this file.