Pete Greskoff · Aug 8, 2019 go to post

As far as I know, there is no built-in solution for this, but maybe someone else on here has built something.

If you want to build your own solution, the journal files are accessible via API's (See the %SYS.Journal.Record class, as well as %SYS.Journal.File). The Management Portal has a page with a journal 'Profile' that uses some of the methods in the Record class. It is viewable at <IP>:<port>/csp/sys/op/UtilSysJournals.csp -> Profile. That page simply prints the total number of updates to each global within one journal file, but you could easily do much more with the API's and the files (say, loop through all the journals for a specific date and keep track of the final values of each global throughout the day, and write that into a human-readable CSV  or text file).

Pete Greskoff · Apr 16, 2019 go to post

The short answer is that you cannot restore a CBK from AIX (a big-endian system) onto Windows (a little-endian system). You would need to restore the CBK on another location on AIX (or another big-endian system), and copy the CACHE.DAT to the Windows system, where you can run the cvendian utility to convert the endianness. Note that this comes directly from that page of documentation:

Note:

This utility does not work for backup and journal files. You must restore databases on a platform of the same endian, move the restored databases to the different endian platform, and then use the cvendian utility to convert the databases.

Pete Greskoff · Mar 4, 2019 go to post

One substitution in your code to use $zboolean to account for cases where it had already been enabled (in which case your code would disable it).

Instead of:

Set p("AutheEnabled")=p("AutheEnabled")+16

Use

Set p("AutheEnabled")=$zb(p("AutheEnabled"),16,7)

Documentation for $ZBOOLEAN

Pete Greskoff · Feb 13, 2019 go to post

If the data needs to be synchronized, it needs to live on the database server. If not, then you could improve performance by having it live locally on the application server(s). 

Pete Greskoff · Feb 12, 2019 go to post

You wouldn't share CACHETEMP, but you could easily create a database that is non-journaled that you can share across ECP application servers.

Pete Greskoff · Jan 14, 2019 go to post

First, when you say you "loaded" 2017.2 onto your machine, did you do an install or something else? 

It sounds like you have a corrupt Windows registry. If you didn't do a full installation and just copied files onto the machine, that would certainly have caused this.

If you did do an installation, I'd suggest contacting the WRC, as this should never happen, and we'd like to get to the bottom of it.  We'll definitely want to look at the cconsole.log and the installation log (in C:\Windows\).

Pete Greskoff · Jan 8, 2019 go to post

It might help us all to give better answers if we know why you are looking for these things. What are you trying to accomplish?

Pete Greskoff · Jan 3, 2019 go to post

Mike,

Let me try to clarify some things here. You currently have a ^Person global with data in it. What others are referring to are objects that would be similar to that global. The best way (IMO) to do this would be to convert the data into objects. First, create and compile a class:
Class User.TestPopulate Extends %Persistent
{
Property Name As %String;
Property Gender As %String;
Property Role As %String;

}

In my example, I populated a global:

%SYS>s ^Person(1) = "Pete|MALE|Senior Support Specialist"
%SYS>s ^Person(2) = "Mike|MALE|Developer"

The default global for data storage for your new class will just be <PACKAGE>.<CLASS>D and the index global will be I instead of D. So, for the data, you're looking at, in my case:

%SYS>zw ^User.TestPopulateD

--> This is empty, because I haven't populated the object at all. Now, I wrote a simple routine to iterate through the ^Person global (no matter how large it is, this will work). Note this has minimal error checking:

TestPopulate
= ""
{
= $o(^Person(x),1,y)
q:x=""
personOBJ = ##class(User.TestPopulate).%New()
personOBJ.Name = $p(y,"|",1)
personOBJ.Gender = $p(y,"|",2)
personOBJ.Role = $p(y,"|",3)
sc = personOBJ.%Save()
if (sc'=1) {
$system.OBJ.DisplayError(sc)
}
!,y
}

Note this also just prints out the value of each person as it goes. Now, I run that routine, and then take a look at the 'D' global again:

%SYS>d ^TestPopulate
 
Pete|MALE|Senior Support Specialist
Mike|MALE|Developer
%SYS>zw ^User.TestPopulateD
^User.TestPopulateD=2
^User.TestPopulateD(1)=$lb("","Pete","MALE","Senior Support Specialist")
^User.TestPopulateD(2)=$lb("","Mike","MALE","Developer")

Now, if I want to access  an individual record, I can via objects:

%SYS>s me = ##class(User.TestPopulate).%OpenId(1)
%SYS>w me.Name
Pete

Finally, if you want to access it with SQL, you can, now that it's populated in an object (note I had to use SQLUser instead of User because I chose 'User' as my package name):

%SYS>d $system.SQL.Shell()
SQL Command Line Shell
----------------------------------------------------
 
The command prefix is currently set to: <<nothing>>.
Enter q to quit, ? for help.
%SYS>>select * from SQLUser.TestPopulate
1.      select * from SQLUser.TestPopulate
 
ID      Gender  Name    Role
1       MALE    Pete    Senior Support Specialist
2       MALE    Mike    Developer
 
2 Rows(s) Affected
statement prepare time(s)/globals/lines/disk: 0.0819s/50437/298608/17ms
          execute time(s)/globals/lines/disk: 0.0005s/4/854/1ms
                          cached query class: %sqlcq.pSYS.cls6
---------------------------------------------------------------------------

Hope this helps

Pete Greskoff · Dec 12, 2018 go to post

I agree with the previous answers as a good starting point. If you get past there and want to set up a mirror, take a look at this post.

Pete Greskoff · Nov 14, 2018 go to post

I have a few questions:

1) Why exactly do you need to call these via REST? What scenario do you have where running something like the example code in the documentation wouldn't work for you?

2) Assuming you do have a good reason to make these calls via REST, which part do you need help with? Creating the REST endpoint? Making the REST request?  Writing the code on the back end to run the appropriate commands?

Pete Greskoff · Nov 1, 2018 go to post

I don't think the developer community is the best place for a question like that. I suggest contacting your InterSystems sales rep.

Pete Greskoff · Oct 30, 2018 go to post

I'm still not sure what you mean. I suggest giving either your Sales Engineer or the WRC a call to discuss this.

Pete Greskoff · Oct 29, 2018 go to post

I'll tackle question 2:

For deciding which backups to take in an ECP environment, it really depends on your setup. In a somewhat typical setup, you'd have the data on the database server, and code on the application servers. In that case, you would definitely want to back up the database server (since that's where the data is), but you may not need to back up the application servers if you have some other repository (such as source control) for your code base. 

I am not quite sure what you mean by having multiple data servers with the same instance name and database name. Can you elaborate? It is certainly possible to mirror your database server in an ECP environment.

Finally, I just want to note that you are talking about sharding, but tagged this as a Caché post. Only InterSystems IRIS supports sharding, not Caché. You probably want to tag this post with IRIS instead of Caché (or both, as your 2 questions really are quite separate).

Pete Greskoff · Oct 26, 2018 go to post

I suggest following the same steps I suggested previously and opening an issue with the WRC. 

Pete Greskoff · Oct 25, 2018 go to post

There are no built-in REST APIs to call the API's, but you could easily write one.

All the methods to retrieve the list and add/remove databases from the list are documented in the Backup.General class here. As John mentioned, there is no way to freeze or thaw individual databases; it is a system-wide operation.

Pete Greskoff · Oct 19, 2018 go to post

There are a few good suggestions here, and I just want to add another one. You could write custom code as a wrapper to call API's for whatever you're changing (whether adding users, tasks, etc.). Then, on all mirror members, you could configure a REST service that would accept requests to do the same (aka call your wrappers based on the request payload). Then, when you call a wrapper to, for instance, add a user, your code would call the REST service on the other mirror members, which would trigger adding that user on those members, and call the Security.Users Create method to add the user on the local instance.

Pete Greskoff · Sep 18, 2018 go to post

From what I've gathered from Oracle, CDC is just a way to replicate data onto another system. If that's what you're looking for, Caché mirroring is the answer you're looking for. Take a look at:

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…

That's the general mirroring information for how it works. Contained in that chapter is information about reporting asyncs, which is what it sounds like Oracle's CDC is for:

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…

Though, it looks like Oracle replicates data to a different database on the same system, which mirroring will not allow. If you want to do replication to a different database on the same instance (though I can't think of a use case for that), you could use shadowing instead:

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…

Pete Greskoff · Jul 3, 2018 go to post

For what it's worth, the best way to find the details as to why you are getting this error in the future is to use the Audit Log. Here is the documentation on auditing. More details are in that doc, but the basic steps to look at this are:

1) Enable auditing

2) Go to Configure System Events and make sure the LoginFailure and Protect events are enabled

3) Reproduce the failed login

4) Look at the details of the audit log entry for the LoginFailure or Protect event that presumably occurred when you failed to log in

5) If you don't want auditing on or those events audited, reset the initial state of auditing by either turning off those events or auditing in general

Pete Greskoff · Jun 22, 2018 go to post

You can assign a custom resource to the Message Viewer, per this documentation. See screenshot below (the assign button). You'd just need to make sure users that actually need to be able to use the message viewer have access to whatever custom resource you assign. There's also more information about the Ensemble Management Portal security in general in this documentation, which might help.

Pete Greskoff · Jun 18, 2018 go to post

OK, that should be fine then. I thought maybe you were having an issue with an endian-ness change of the platform, but obviously that's not it. I'd again suggest opening a WRC issue. Try following Robert's suggestion, then collecting the cconsole.log and SYSLOG along with any error output you get from mounting. You could also post it here if you prefer.

Pete Greskoff · Jun 18, 2018 go to post

Did the file come from the same Operating System? Do you get an error when you try to mount it, either when you try to mount it or in the cconsole.log? 

You may want to open a WRC issue to help with this. It would also help to have the Caché SYSLOG (do ^SYSLOG from the %SYS namespace), as errors that occur while mounting files are typically at the system level, which would get logged there.

Pete Greskoff · Jun 5, 2018 go to post

It is definitely worth pursuing if you want to use it. Contact the WRC and give us the version you're using as well as the output from the failed install, and we'll be happy to help. FWIW, I've set it up on Windows and gotten it to work, but not on Mac. 

Pete Greskoff · Jun 4, 2018 go to post

Right, mirroring already takes care of the 'system availability', so this setting is forced to be turned on to also protect 'system integrity' (not to mention so mirroring can more easily detect failures).

I would say though that whether you need this turned on in a non-mirrored setup entirely depends on your application. You may have a major preference towards system availability over system integrity, though I'd say most setups that care enough about the data to journal it would likely want to have this Freeze on error turned on.