Find

Article
· 10 hr ago 1m read

Cause and solution of <SLMSPAN> error when killing global

InterSystems FAQ rubric

If you try to kill a global that is mapped at the subscript level from the top node, you will get a <SLMSPAN> error and it will not be deleted. This is because the kill command for subscript-level mapped globals cannot be used across mappings.

// Suppose subscript-mapped globals exist in different databases, as shown below:
^TEST(A*~K*) -> database A
^TEST(L*~Z*) -> database B

// Trying to kill from the top level will result in a <SLMSPAN> error.
NAMESPACE>Kill ^TEST
<SLMSPAN> <- This error is output.

To delete only the global in the current namespace (database), use the following:

NAMESPACE>Kill ^["^^."]TEST

Globals mapped at the subscript level must be moved to the database and killed directly.

To switch to the database, use the following:

zn "^^c:\intersystems\iris\mgr\user"
or
set $namespace="^^c:\intersystems\iris\mgr\user"

When importing globals with $System.OBJ.Load, the default behavior is to kill the globals before importing them. As a result, if the target globals are subscript-level mapped, a <SLMSPAN> error occurs. In this case, specify the /mergeglobal flag as the second argument to $system.OBJ.Load as follows to prevent pre-killing:

Set sc = $System.OBJ.Load(path," /mergeglobal",.errors)

enlightened [Reference]
Mapped globals cannot be exported.
How do I compile mapped classes and routines?

Discussion (0)0
Log in or sign up to continue
Article
· 19 hr ago 1m read

Aprovechando Server Manager al crear extensiones de VS Code que se conectan a servidores de InterSystems

Fue alentador ver a más personas creando extensiones de VS Code para el concurso reciente. Sin embargo, noté que de las tres extensiones que requieren credenciales para realizar sus conexiones, solo la de @John Murraygj :: dataLoader, aprovecha la extensión InterSystems Server Manager, ampliamente establecida y oficialmente soportada, para obtener las definiciones de conexión y gestionar las credenciales de manera segura.

Podéis encontrar más detalles sobre cómo hacerlo en el README de la extensión.

Si tenéis problemas al usar esta funcionalidad, o una opinión sobre por qué las extensiones deberían crear su propia solución en este ámbito, discutámoslo aquí.

Discussion (0)1
Log in or sign up to continue
Discussion
· 19 hr ago

A small challenge for you - enhancing Interoperability message trace for mixed JSON and XML content

Hello community!
I have a small challenge for you :)

One of customers is sending quite a lot of messages between interoperability components, which mix standard request content and streams representing serialized JSON objects. As these JSON streams can be quite long (but not too long, just couple hundreds of characters) they would appreciate if the JSON content of stream was displayed in a nice-to-read way, using syntax highlighting by message trace view.

This picture illustrates the challenge - we are talking about the text framed by a red rectangle:
 I'd love to hear from anyone that you were able to come with some solution and post it to open exchange portal!

Dan

1 new Comment
Discussion (1)2
Log in or sign up to continue
Article
· 20 hr ago 2m read

Indexes: The Silent Power Behind Fast Queries

The Power of Indexing in Database Tables

When working with databases, most developers understand the concept of an index and why it's used: to speed up data retrieval. But the real impact of indexing often becomes clear only when you compare scenarios with and without it.

Do you Know what Happens Without an Index?
Imagine a table with three columns: Name, Age, and MobileNumber.


Now, consider this query:

If the Age column does not have an index, the database engine will:

  • Check if the WHERE condition field has an index.
  • If not, it will scan the entire table (a full table scan).
  • For each row, it will check the Age value and return matches.

This means the engine traverses the entire data structure, which is time-consuming for large tables.

What Happens With an Index?
Now, if the Age column is indexed, the process changes dramatically:

  • The engine goes directly to the index structure.
  • It finds the node for Age = 26.
  • The index points to the corresponding record IDs in the main table.
  • The result is fetched almost instantly.

This is why indexing is such a powerful optimization tool.

A Real-Life Lesson
Recently, we encountered an interesting situation that highlighted the importance of indexes.
Our table had 5 records, and the Age column was indexed. Then, by mistake, we deleted two entries from the index structure (not from the main table). These entries corresponded to IDs X001 and X005, both having Age = 26.


When we ran:
SELECT ID, Age, EmpId, Mobile, NameFROM Company.Employee WHERE Age = 26
We expected 3 records (since the main table still had them), but only 2 records appeared.

Why? Because the query relied on the index, and the index was incomplete.

Key Takeaway
Indexes are powerful, but they must be maintained properly. If an index is accidentally deleted or corrupted, don’t worry, you can rebuild the index using the below command:

Do ##Class(Company.Employee).%BuildIndices()

Moral of the story: Indexes make queries fast, but they also become a single point of truth for retrieval. Handle them carefully!😅

Discussion (0)1
Log in or sign up to continue
Announcement
· 21 hr ago

2025 en retrospectiva: ¡celebrad vuestro año con la comunidad de desarrolladores!

Hola, comunidad:

✨ Mientras cerramos otro año increíble en la comunidad de desarrolladores, es el momento de echar la vista atrás y repasar todo lo que habéis conseguido en 2025. Vuestro resumen personal de 2025 ya está disponible: una visión a medida de vuestra actividad, vuestros logros y el valor que habéis aportado a la comunidad este año.

Desde los artículos que compartisteis hasta los debates que impulsasteis, vuestras contribuciones ayudaron a dar forma al conocimiento y a la colaboración en nuestra plataforma. Ahora podéis revisarlo todo en un solo lugar.

¿Qué incluye vuestro resumen de 2025? Una visión personalizada de vuestro año que incluye:

  • Vuestras publicaciones, comentarios y visualizaciones
  • Vuestra etiqueta favorita
  • Vuestra contribución más destacada
  • Y algunos momentos divertidos que hemos preparado solo para vosotros

Para abrir vuestro resumen, solo tenéis que ir a la página principal y hacer clic en «Ver mi resumen», o abrir vuestro perfil.

Una vez allí, encontraréis un resumen con un formato cuidado que podéis compartir fácilmente con compañeros, amigos o en vuestras redes sociales favoritas, mostrando el impacto que habéis tenido a lo largo del año. Para compartir vuestro resumen con otros, solo tenéis que hacer clic en Compartir en la esquina inferior derecha.

¡Nos encantaría saber a qué club pertenecéis! No dudéis en compartir en los comentarios qué momentos destacados os sorprendieron más.

Celebremos el conocimiento, la innovación y la colaboración que habéis aportado a la comunidad en 2025. ¡Por otro año increíble que está por venir!

Discussion (0)1
Log in or sign up to continue