Nova postagem

Encontrar

Artigo
· Out. 10, 2024 3min de leitura

Cómo utilizar la consulta FreeSpace de la clase SYS.Database para comprobar el espacio libre en el disco donde se encuentra la base de datos

Rúbrica de preguntas frecuentes de InterSystems

Podéis comprobar el espacio libre en disco en cualquier momento usando la clase de utilidad del sistema: SYS.Database y la consulta: FreeSpace.

Aquí tenéis cómo probarlo en el terminal de IRIS (id al espacio de nombres %SYS y luego ejecutadlo):

zn "%SYS"
set stmt=##class(%SQL.Statement).%New()
set st=stmt.%PrepareClassQuery("SYS.Database","FreeSpace")
set rset=stmt.%Execute()
do rset.%Display()

El resultado de salida es el siguiente:

*En el ejemplo de ejecución del comando, todas las bases de datos están ubicadas en el mismo disco, por lo que el espacio libre en disco (DiskFreeSpace) devuelve el mismo valor.

Dumping result #1
DatabaseName         Directory         MaxSize Size   ExpansionSize   AvailableFreeDiskFreeSpace      Status  SizeInt AvailableNum    DiskFreeSpaceNum        ReadOnly
IRISSYS c:\intersystems\irishealth3\mgr\        sin límites  159MB   sistema por defecto           ト      18MB    11.32   245.81GB        Montaje/RW      159     18      2517050
ENSLIB  c:\intersystems\irishealth3\mgr\enslib\ sin límites  226MB   sistema por defecto           ト      19MB    8.4     245.81GB        Montaje/R      226     19      2517051
      <parcialmente omitido>
IRISTEMP        c:\intersystems\irishealth3\mgr\iristemp\       sin límites  51 MB Sys.     sistema por defecto  49MB    96.07   245.81GB        Montaje/RW     51      49251705           0
USER    c:\intersystems\irishealth3\mgr\user\   sin límites  31MB    sistema por defecto           ト      8.5MB   27.41   245.81GB        Montaje/RW     31      8.5     2517050

Si queréis especificar el directorio de la base de datos al que queréis hacer referencia, ejecutad lo siguiente:

//Use the $LISTBUILD() function to obtain the full path of the database directory you want to view.
set dbdir=$LISTBUILD("c:\intersystems\irishealth3\mgr","c:\intersystems\irishealth3\mgr\user")
set rset=stmt.%Execute(dbdir)
do rset.%Display()

Si queréis obtener solo el Nombre de la Base de Datos (DatabaseName), el Tamaño Actual (Size) en MB, el Espacio Disponible (Available) en MB, el Espacio Libre (Free) y el Espacio Libre en Disco (DiskFreeSpace) en un directorio de base de datos especificado, seguid los pasos a continuación (cread una rutina/clase en VSCode o Studio mientras estáis conectados al espacio de nombres %SYS y escribid el código).

Class ZMyClass.Utils
{
ClassMethod GetDiskFreeSpace()
{
    set dbdir=$LISTBUILD("c:\intersystems\irishealth3\mgr","c:\intersystems\irishealth3\mgr\user")
    set stmt=##class(%SQL.Statement).%New()
    set st=stmt.%PrepareClassQuery("SYS.Database","FreeSpace")
    set rset=stmt.%Execute(dbdir)
    while(rset.%Next()) {
        write rset.%Get("DatabaseName")," - ",
        rset.%Get("Size")," - ",rset.%Get("Available")," - ",
        rset.%Get("Free"),"% - ",rset.%Get("DiskFreeSpace"),!
    }
}
}

NOTA: Si colocáis rutinas o clases definidas por el usuario en el espacio de nombres %SYS, crearlas con nombres que comiencen con Z asegura que el código fuente definido por el usuario permanezca disponible después de una actualización de instalación.

Un ejemplo de ejecución es el siguiente.

USER>zn "%SYS"
%SYS>do ##class(ZMyClass.Utils).GetDiskFreeSpace()

IRISSYS - 159MB - 18MB - 11.32% - 245.81GB
USER - 31MB - 8.5MB - 27.41% - 245.81GB

%SYS>
Discussão (0)0
Entre ou crie uma conta para continuar
Artigo
· Out. 10, 2024 30min de leitura

Conversion de texte en IRIS SQL à l'aide de LangChain

Une expérience sur la manière d'utiliser le cadre LangChain, la recherche vectorielle IRIS et les LLM pour générer une base de données SQL compatible IRIS à partir des invites utilisateur.

Cet article a été rédigé à partir du carnet suivant. Vous pouvez l'utiliser dans un environnement prêt à l'emploi avec l'application suivante dans OpenExchange.

Discussão (0)2
Entre ou crie uma conta para continuar
Pergunta
· Out. 9, 2024

如何启用SSL协议,并能够在使用DBeaver连接时捕获SSL协议交互流量?

如何启用SSL协议,并能够在使用DBeaver连接时捕获SSL协议交互流量?

如果方便的话,能否提供一个假数据的ssl包?

非常感谢

2 Comments
Discussão (2)2
Entre ou crie uma conta para continuar
Artigo
· Out. 9, 2024 3min de leitura

第四十三章 使用 WS-ReliableMessaging - 对 WS-ReliableMessaging 标头进行签名

第四十三章 使用 WS-ReliableMessaging - 对 WS-ReliableMessaging 标头进行签名

WS-ReliableMessaging 标头进行签名

可以通过以下任一方式签署 WS-ReliableMessaging 标头。

使用 SecurityContextToken 对标头进行签名

如果还使用 WS-SecureConversation,则 Web 客户端的 SecurityContextToken 属性包含一个对称密钥,可以使用该密钥对 WS-ReliableMessaging 标头元素进行签名。为此,请在调用 %SOAP.RM.CreateSequence实例的 AddSTR() 方法,并将 SecurityContextToken 属性作为参数传递:

Discussão (0)1
Entre ou crie uma conta para continuar
Artigo
· Out. 9, 2024 3min de leitura

My personal approach to Vectors

Motivated by personal feedback by @Edilson Eberle Carvalho  and 
an excellent presentation of @Michael Braam  related to Vector Search I'd like to share
my personal approach to Vectors.

When I started and met vectors with 256, 384, and over 1200 dimensions - I felt lost.
However my example 
Vector-inside-IRIS - a simplification of iris-vector-search - worked fine.
 
In order to understand the mechanics behind it, I decided to start in small steps.
Our common 3 dimensions describe our physical world quite fine.
Even the half 4th dimension (no negatives) added by Einstein is not to hard to follow.
Cosmologic string theory with 0 to 11+ dimensions was a real border line to me.

So back to start : => 2 dimensions are enough for a beginner.
Geographic coordinates provide a nice starting point with sufficient test data.
VECTOR_COSINE() function was my primary target in my example 
geo-vector-search

The range of results from -1 to +1 is easy to interpret in a quasi-flat projected map.
That's basic mathematics and its transposition to an additional dimension is not a miracle.

But what about some hundred dimensions?

;#1
-.0104943, .01472898, .07107521, .07168121, -.0937807, .05828459, .04451195, -.1045385, -.0110124, -.0240547, -.0032111, -.0030188, -.0414225, -.1092015, .02203945, -.0129255, .14087346, .04734043, -.0181046, -.0458297, .02323769, .02859951, .01124321, .00857456, -.0049756, -.0144282, -.0846236, -.0284645, -.0147692, -.0989931, .04880870, .01899284, -.0176833, .04763242, -.0808972, -.0604988, .05757499, -.0638228, .04217084, .03707900, .03757081, .03086806, .02773610, .02082979, -.0495735, -.0337784, -.0438372, -.0827000, -.0018084, -.0072785, -.0797550, -.0055747, -.0551242, -.0918905, .01140710, -.0115834, -.0088469, -.0445509, .02972822, .04385065, .04125113, .01189815, .01809763
;#2
-.0340279, -.0930349, -.0356242, .03200291, .07393958, -.0164658, -.0218968, .01392244, -.0069597, .02677908, -.0800164, .07227557, -.0430033, -.1134698, -.0561500, -.0520939, -.0306403, .00750979, -.0345837, .03335380, -.0438071, -.0088005, .03423582, .00794844, .01172804, .05204785, .04179215, .01768089, -.0489745, -.0031708, -.0349655, -.0482467, .08090461, -.0596610, -.0565769, -.0043313, .01015284, .07152537, .04189436, -.0475862, -.0171517, .03899634, -.0705699, -.1133416, .08019342, .02138555, .01466019, .00184080, -.0905641, -.1039420, -.0290395, .02753796, .01674868, -.0259464, -.0107869, -.0407411, -.0120343, -.0636389, .00047146, .01514394, -.0694578, -.0204190, -.0024446
;#3
.00350692, .09432639, .01641871, .09951058, .10459023, .00019239, -.0823584, -.0022799, -.0227801, -.0023362, -.0397562, .07449327, -.1137044, .09173037, .08620572, -.0881805, -.0111093, -.0316556, -.0044012, -.1248759, -.0897788, .03191807, -.0147239, -.0198379, -.0849955, -.0026861, .02628867, -.0523788, -.0398543, -.0080245, .06736382, .01456158, .04700677, -.0171667, -.0217174, .06761254, -.0070750, .02879706, .01109632, .02541129, -.0384420, .00410159, .05145533, .06493697, -.0924961, -.0422163, -.0739539, .06107471, .06070494, -.0044191, .00238501, -.0182966, .03546700, .05925614, -.0361021, .09686610, .02930910, .01282224, .02953721, -.0526526, .03977891, .00501585, .00717564

the example here is shortened for readability

After thinking it over for some time I found a personal image:

  • When I search for a target in Google Maps that is not just around the corner I get a choice of routes offered.
  • the shortest one, the fastest one, the one with the least fuel consumption,   public transport, ... 
  • and I make a choice according to my needs
  • interpreting the dimensions of my vectors as numbered intermediate steps to my target I would get a similar picture
  • And by VECTOR_COSINE I get the best proposal

LLM experts may laugh about my simplification.
But to me, it's a picture beyond abstract mathematics and confusing language theories.
And I believe my simple picture based on a daily used process in car driving
helps to understand how results are found.

NOTE: I still have no idea of HOW those vectors are calculated as long as it's consistent.
It was important for me to understand how the matching works. 

 

1 Comment
Discussão (1)2
Entre ou crie uma conta para continuar