Rechercher

Article
· Nov 7, 2024 1m de lecture

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:

getnsp
   set statement=##class(%SQL.Statement).%New()
   set status=statement.%PrepareClassQuery("%SYS.Namespace","List")
   set resultset=statement.%Execute()
   while resultset.%Next() {
       write resultset.%Get("Nsp"),!
   }
   quit

2. Run it in your terminal

USER>do ^getnsp
%SYS
DOCBOOK
SAMPLES
USER

The method of executing class queries introduced in this article can be applied in a variety of cases.

You can see various class queries in the class reference. For example,
 %SYS.DatabaseQuery: GetFreeSpace() Free space in database
 %SYS.GlobalQuery: DirectoryList            List of global names in database
 %SYS.GlobalQuery: Size                              Size List of global sizes in database
 %SYS.ProcessQuery: SS                           Process information (same as the list that can be confirmed by the ^%SS utility)
and so on.

There are many other options available, so please feel free to use them.

4 Comments
Discussion (4)3
Connectez-vous ou inscrivez-vous pour continuer
Question
· Nov 7, 2024

is there a script for integrating veeam backup and Cache database?

Customer is trying to use Veeam as backup of Cache database and we need a script to freeze (quiesce) the database for a clean snapshot. i am looking if there is a script already done.

3 Comments
Discussion (3)3
Connectez-vous ou inscrivez-vous pour continuer
Question
· Nov 7, 2024

What is the quickest way to get back into iris lite terminal after a 'halt'?

I hit halt in Iris lite terminal within VS Code and was exited out to PS prompt.  I was just curious what the best way / recommended way to get back into an InterSystems lite terminal would be?  Perhaps it is just to start a new InterSystems lite terminal from a the options listed previously in this post https://community.intersystems.com/post/how-run-objectscript-commands-vs....  I was just curious if there was a way to kick it off again from the PS prompt?

2 Comments
Discussion (2)2
Connectez-vous ou inscrivez-vous pour continuer
Question
· Nov 7, 2024

Existing protections against XSS attacks on CSP pages ?

Is there any mechanism already implemented in IRIS to prevent XSS exploits ? 

This case happen when user input html/javascript content into fields and submit the page. If saved content is rendered as is, it's going to be executed by anyone visiting the page.

What I am looking for : 

  • Built-in protection mechanisms that can be enabled globally (eg: per web application) or per CSP page. Something similar to a web application firewall.
  • Functions to call manually that can detect such content in fields or sanitize them (remove unwanted content). I could implement such functions myself but don't want to re-invent the wheel or to take the risk to be not covering all the cases.
4 Comments
Discussion (4)2
Connectez-vous ou inscrivez-vous pour continuer
Question
· Nov 7, 2024

IRIS Docker template not copying files

Using the Basic template for InterSystems IRIS development environment with Docker: github

If I use the Dockerfile_mini file and COPY a backup, the file shows up.

COPY ./20241104_1448.cbk /home/irisowner/dev 

ARG IMAGE=intersystemsdc/iris-community
FROM $IMAGE

WORKDIR /home/irisowner/dev
COPY ./20241104_1448.cbk /home/irisowner/dev
...

However if I use the Dockerfile with the additional features, the file is copied (via logs) but not on the container filesystem.

Is this a bug?

2 Comments
Discussion (2)1
Connectez-vous ou inscrivez-vous pour continuer