· Dec 25, 2023

Access to a Global like ^name over odbc?

Dear Community,

i need help to access to a Global like ^name over ODBC (SQL)
i will visit this global in a loop from a php site. It a access over SQL or ODBC possible?


Thanks for help and marry Christmas

Product version: IRIS 2022.1
$ZV: IRIS for Windows (x86-64) 2022.1 (Build 209U)
Discussion (6)2
Log in or sign up to continue


You need use Persistent class.

Community article.

Like this.(Display ^Hban global on Dbeaver what used SQL.)

Class Gbl.Hban Extends %Persistent [ SqlRowIdPrivate, StorageStrategy = MyGlobalStorage ]

/// Index
Index KeyIndex On (year, key) [ IdKey, Unique ];

/// first key
Property year As %Integer [ Required, SqlColumnNumber = 2 ];

/// second key
Property key As %String [ Required, SqlColumnNumber = 3 ];

/// third key
Property data As %String;

Storage MyGlobalStorage
<SQLMap name="GblMap">
<Data name="data">
<RowIdSpec name="1">
<RowIdSpec name="2">
<Subscript name="1">
<Subscript name="2">


It is still in IPM. OEX seems to have lost it.  ???

zpm:USER>search global-dump-sql
global-dump-sql 1.0.2
zpm:USER>install global-dump-sql
[USER|global-dump-sql]  Reload START (C:\InterSystems\IRIS\mgr\.modules\USER\global-dump-sql\1.0.2\)
[USER|global-dump-sql]  Reload SUCCESS
[global-dump-sql]       Module object refreshed.
[USER|global-dump-sql]  Validate START
[USER|global-dump-sql]  Validate SUCCESS
[USER|global-dump-sql]  Compile START
[USER|global-dump-sql]  Compile SUCCESS
[USER|global-dump-sql]  Activate START
[USER|global-dump-sql]  Configure START
[USER|global-dump-sql]  Configure SUCCESS
[USER|global-dump-sql]  Activate SUCCESS
Just providing the global name results in a full global dump.
USER>zn "user"
IRISAPP>d $system.SQL.Shell()
SQL Command Line Shell
... select TOP 5 * from zrcc_G.dump where zrcc_G.Dump('^%SYS','"JOURNAL"')=1