Question Stefan Schick · Jun 12, 2024

Hello Community,

I have encountered the following SQL problem trying to create a table from a SELECT statement.

I narrowed the problem down to the following example:

1. The SELECT statement alone works as expected.

SELECT m.Name, h.Status 
FROM EnsLib_HL7.Message m, Ens.MessageHeader h 
WHERE h.MessageBodyClassName='EnsLib.HL7.Message' AND h.MessageBodyID = m.ID

2. But if "CREATE TABLE ... AS" is added it fails

CREATE TABLE UKEr.Test AS
SELECT m.Name, h.Status
FROM EnsLib_HL7.Message m, Ens.MessageHeader h
WHERE h.MessageBodyClassName='EnsLib.HL7.Message' AND h.MessageBodyID = m.ID
4
0 145
Question Stefan Schick · Nov 8, 2022

Hello,

searching messages in our Message Bank is quite slow, often runs into timeout.

I wanted to perform a tune table on Ens_Enterprise_MsgBank.MessageHeader because this apparently has not been done yet - the Tune Table utility shows no entries for selectivity, etc.

I tried

w $SYSTEM.SQL.Stats.Table.GatherTableStats("""Ens_Enterprise_MsgBank"".MessageHeader")

and got this error message

6
1 600
Question Stefan Schick · Jul 20, 2022

Hello everyone,

I want to restore a database from an external backup with the journal files.

The manual says I should (in short):

  1. Stop journaling with ^JRNSTOP
  2. Restore the database file IRIS.DAT
  3. Run the journal restore utility with ^JRNRESTO
  4. Restart journaling ^JRNSTART

Since I want to restore one database only step 1 would disable journaling for the whole instance, not only for the database to be restored. As I understand, it would be impossible to restore a different database if there occurs a problem while journaling is disabled during the recovery process?

6
0 948
Question Stefan Schick · Mar 24, 2022

Hello,

I'd like to add/remove items to/from a custom HL7 searchtable (which extends EnsLib.HL7.SearchTable).

Adding new items worked fine by:

  • -add new item to class definition
  • compile class in all namespaces
  • reindexing messages with the BuildIndex() method

Question 1:

How can I remove items from the searchtable properly? Doing the same as above (removing them from the class, recompiling, reindexing) seemed to work, but the removed items still appear in the message viewer's search criteria list. So I think there must be an additional step to the procedure. What am I missing?

3
0 545