Hello Sai,

You might need to give more details on what your operation/service code looks like to determine what's going on. The WRC or your InterSystems rep could probably help with this.

The TCP adapter (including counted) docs can be found here. There are similar docs for the outbound, but it's pretty much the same but swapped for outbound:

Overview of Inbound TCP Adapter

"EnsLib.TCP.CountedInboundAdapter supports incoming TCP connections over which a TCP client and TCP listener exchange blocks of data, with the block length specified in the first 4 bytes of the block. The adapter uses the block length to acquire the meaningful portion of the data from the client application."

The above doc page also includes some guidance for setting up a TCP service.

Is there a particular reason you are using a Counted operation/service rather than generic TCP? I'm unfamiliar with the use case for the Counted adapters.

Connecting Systems with Interoperability Productions > Introducing Interoperability Productions > Connectivity Options

The above suggests that the counted adapters are meant for handling "counted data blocks".

The error you are getting seems to indicate a mismatch between the block size being sent, and the expected size. Looking at the traffic in a Wireshark could be helpful to understand what is happening.

Hello Fábio,

I'm just quoting the class reference I linked:

"This method is called to remove data from the %SYS.PTools.SQLStats table. It does not remove data from %SYS_PTools.SQLQuery, those rows are cleaned up when a query is compiled"

You can take a look at what's actually filling up your CACHE database to determine if this will work for you. For a complete purging, I'd go with purging cached queries, as that's the "full" solution.

Hello Fábio,

In IRIS there is a convenient SQL Runtime Statistics page where you can purge those stats.

Using the SQL Runtime Statistics Tool

On your version, the equivalent tool only offers the option to purge cached queries, so I think that's what you'll need to do. %SYS.PTools.SQLStats.Purge will purge some of the SQL stats data, though not all.

"Purging a cached query purges any related SQL Stats data. Dropping a table or view purges any related SQL Stats data."

edit: corrected, CE 2018.1.5 does not have the purge stats option that IRIS does.

Hello Alex,

Have you confirmed that the original transaction process goes away when the VPN disconnects? How are you opening the terminal in the first place?

If disconnecting the VPN leaves the original process around, it won't have a chance to rollback the transaction.

edit: perhaps this is related to your Journal Freeze on error setting?

Hello Kevin,

I'm not very familiar with 3rd party tools that could be good for this (I'm sure they exist), but you should be able to design a Caché-role that has the restrictions you are looking for. I think you should be able to use SQL and portal permissions to lock down a role to your specifications.

Using Custom Resources with the Management Portal

SQL Privileges and System Privileges

Hello Adrian,

Some people already talked about the system mode for the portal, but John (one of your commenters) previously wrote a different post about adding information to the terminal prompt itself which may be useful as well:

https://community.intersystems.com/post/where-am-i-adding-extra-information-terminal-prompt

There's a documentation link on that page, but you can have your terminal be prefixed by host name or instance name, for example.

Re: mirroring HSSYS (or other system / library databases), please make sure you review the documentation for the product you are using specifically. Documentation for older versions of HealthShare Information Exchange's documentation is not available online, but in recent versions HSSYS can and should be mirrored.

Example from HS 2018.1 docs:

Mirroring a New Information Exchange

"Now that you have created the mirror, you can mirror the databases. For a new installation, you only have to mirror one database, HSSYS. When you configure Information Exchange using the Installer Wizard (or an installer script), all of the databases that are created in that process will then be automatically mirrored."

Hello Augusto,

Please check out the mirroring documentation, which is quite robust. After joining your async to the mirror you will need to sync the databases.

"Only a local database on the current primary failover member can be added to a mirror; it is added on the primary first, then on the backup, and then on any desired async members. All mirrored databases must be journaled.

You must add the same set of mirrored databases to both the primary and backup failover members, as well as to any DR async members; which mirrored databases you add to reporting async members depends on your reporting needs. "

Add an Existing Database to the Mirror

This documentation covers some ways of syncing a database from the primary to the other members.

Hope that helps!

Piggybacking on Dmitry's comment, here's the documentation for:

Data Display Options

"For most data types, the three SelectMode modes return the same results. The following data types are affected by the SelectMode option:

Date, Time, and Timestamp data types. InterSystems SQL supports numerous Date, Time, and Timestamp data types (%Library.Date, %Library.Time, %Library.PosixTime, %Library.TimeStamp, and %MV.Date). With the exception of %Library.TimeStamp, these data types use different representations for Logical, Display, and ODBC modes."

Martin,

This makes sense to me. Access to databases is controlled by that database resource setting, which can be customized and assigned to various roles. A role that is assigned %DB_%DEFAULT access will grant access to any databases that are controlled by that resource.

If you are concerned, you could review the other databases and make sure that you want your user to have access to the other databases secured by %DB_%DEFAULT. If you wanted more restriction, you could assign your databases a different resource other than %DB_%DEFAULT, such as having specific database resources for each database. That way, you only grant permissions for 1 specific database when granting the custom resource. 

See documentation here:

Database Resources

Hope that helps.

Hello Martin,

The <PROTECT> error is on the UKERALL database so I would start there. The first thing that comes to mind for me is whether that database has a different resource securing it, as under the "Roles" list I don't necessarily see a role that seems to correspond to that database exactly. This is dependent on how your roles and database resources are configured.

Does your admin user have %ALL or some subset of permissions? If not %ALL, you could try comparing the admin user's permissions to the user getting the error here.