User bio

Graduated in Software Engineering and Information Security.
I work as a Caché developer and currently as a Caché Database Administrator, managing and automating multiple instances in the Cloud Environment.

My areas of interest are Security, Performance Database and Linux Environment.

Member since Dec 5, 2018
Replies:

The same example but in a different form:

    try {

        set result=##class(%ResultSet).%New("%DynamicQuery:SQL")
        $$$ThrowOnError(result.Prepare("SELECT ... "))
        
    } catch error {
        do error.Log()
    }

The error details will be in the Application Error Log

In Caché, as an alternative to Portal, you can use Terminal and run:

SAMPLES>do $SYSTEM.SQL.Shell()

SQL Command Line Shell
----------------------------------------------------

Or the %SQL.Statement

Or try an external tool like dbeaver (https://dbeaver.io/)

Another suggestion,

If you use an exclusive Resource in your database (example %DB_<database-name>), you can use it as a reference. It is included in the .DAT and you can check it even with the database not created, just the physical file.

Example:

w ##class(SYS.Database).%OpenId("/usr/irissys/mgr/test1/").ResourceName

The SYS.Database class also gets other information, but nothing relevant for identification.

--

Or (perhaps not recommended) you can extract the original path directly from the .DAT, for example:

$ strings /usr/irissys/mgr/test2/IRIS.DAT | head -3
Cache DB
/usr/irissys/mgr/test1/
%DB_TEST1

Followers:
Following:
Global Masters badges:
Lucas has no Global Masters badges yet.