go to post Tani Frankel · Jan 12, 2017 See this related post with a class that could help with auto-generating the %OnDelete method for your classes.
go to post Tani Frankel · Jan 2, 2017 I added some functionality to register (and report) not only the global names but also the class name (using that global). Thanks Dale for the idea. [Update is available via GitHub, link in the post above] Here also is some sample output - Data Usage Report =========================== Database file size used: 1 Journal file size used: 0 Journal space used: 325108 Globals growth ---------------------- Ens.MessageBodyD .007 Ens.MessageHeaderD .02 Ens.MessageHeaderI .003 Ens.Util.LogD .004 ITest.Proxy.s0.AddressD ITest.Proxy.s0.Address.cls .004 ITest.Proxy.s0.PersonD ITest.Proxy.s0.Person.cls .003 Journal Profile ---------------------- Ens.ActiveMessage 26184 Ens.BusinessProcessD 3308 Ens.BusinessProcessI 1456 Ens.Configuration 424 Ens.JobRequest 132 Ens.JobStatus 112 Ens.MessageBodyD 19508 Ens.MessageHeaderD 34624 Ens.MessageHeaderI 89540 Ens.Queue 37996 Ens.Runtime 50920 Ens.Suspended 100 Ens.Util.LogD 10404 Ens.Util.LogI 12248 ITest.Proxy.s0.AddressD ITest.Proxy.s0.Address.cls 16096 ITest.Proxy.s0.PersonD ITest.Proxy.s0.Person.cls 8624 Globals remaining after purge ---------------------- ITest.Proxy.s0.AddressD ITest.Proxy.s0.Address.cls .004 ITest.Proxy.s0.PersonD ITest.Proxy.s0.Person.cls .003
go to post Tani Frankel · Jan 2, 2017 Thanks for clarifying Dmitry.In this case, if people can't view the images then just replacing the Terminal images with text, will not be enough as their meaning and relevance is accompanied by the related Journal contents screenshots. And I don't think it makes sense to start replacing all of that with text as well. So for now I will leave this post as is. The essence anyway is written up in the body of the post, and the images are just for illustration and/or emphasis.I will though take this into consideration and for future posts prefer text over Terminal images.
go to post Tani Frankel · Jan 1, 2017 Regarding using non-journaled databases I just wanted to point out that this approach was taken by us (InterSystems) internally for certain Ensemble globals.See this from the 2015.1 Ensemble Release Notes. For each Ensemble database another non-journaled database is created, with a naming convention of <myDatabase>ENSTEMP.For example:This database will hold specific data (that used to be in CACHETEMP).Indeed the release note also mentions the mirroring implication.This was done mainly for security considerations (as mentioned in the post above).[Internally one can see JGM092 and JGM097 for details]
go to post Tani Frankel · Jan 1, 2017 I can do this Dmitry, but I am wondering why this is needed.If this is in order to be able to copy & paste code, then in this post's case, the code pasted from terminal is either simple SETs, which have no meaning outside the context of the post's basic example, or if they are sample commands, then they appear elsewhere in the post where they can be copied from.If there is another reason please let me know.Thanks.
go to post Tani Frankel · Dec 8, 2016 Thanks Eduard!This looks great.I'll let you know if we run into anything missing.
go to post Tani Frankel · Oct 5, 2016 William, for more info about using OS authentication see here from the docs. Specifically see also there a note regarding Kerberos on Windows and using Domain users. This might play better for you with your locked-down installation as OS authentication is not on by default (system-wide).Assuming you want to use OS Authentication - you need to first make sure this on system-wide:Then make sure it is on for the service (%Service_Console is this case):And that you have a Caché User with the same name as the OS User (and that of course has the relevant authorization):Then you should be able to run without having to authenticate separately to Caché.For example opening the Terminal without getting prompted for login:[ As opposed to the behavior without OS authentication enabled: ]Hope this helps.
go to post Tani Frankel · Sep 29, 2016 William, following up on Stefano's last answer (and previous comments), I just wanted to add that you can consider using OS Authentication instead of leaving this open for unauthenticated access. This way you can allow only for the appropriate Windows User to run this command from the Windows command prompt.
go to post Tani Frankel · Aug 29, 2016 Here's the follow-up post on this topic.Hope you enjoy the read.
go to post Tani Frankel · Aug 7, 2016 Thanks Dmitry.Indeed the focus here was on finding the possible globals you would want to dive deeper into regarding why they are taking up relatively a lot of journal space, and thinking of ways to mitigate that.When I get a chance I planned to follow-up with another post on ways to avoid journaling for such globals (though not always is that an option). Stay tuned...
go to post Tani Frankel · May 17, 2016 Thanks Luca.Note this is not instead of run-time monitoring and alerting.This is intended for a one-time run (though could be iterative) at development/testing phase. In order to help plan the required disk-space (and validate proper purging). For this I thought something Ensemble-specific, as well as growth process-oriented (capture, run, capture, compare, report) was beneficial. In real-time production phase of course one would put into place the more generic core monitoring functionalities, and would have no use of this framework.
go to post Tani Frankel · Mar 20, 2016 Hi Jon, I'm not sure this is exactly what you were looking for but you should be aware of the %XML.DataSet class. With this class you can run an SQL query (for example returning all the instances of your class, or filter out some subset of it) and get the results in XML format (including the metadata of the result). See more details in the docs. Here's a sample run: SAMPLES>set dataset=##class(%XML.DataSet).%New() SAMPLES>write dataset.Prepare("SELECT TOP 5 ID, Name, DOB FROM Sample.Person WHERE Name %STARTSWITH ?") 1 SAMPLES>write dataset.Execute("b") 1 SAMPLES>do dataset.XMLExport() <SQLResult> <s:schema id="DefaultDataSet" xmlns="" attributeFormDefault="qualified" elementFormDefault="qualified" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <s:element name="DefaultDataSet" msdata:IsDataSet="true"> <s:complexType> <s:choice maxOccurs="unbounded"> <s:element name="SQL"> <s:complexType> <s:sequence> <s:element name="ID" type="s:long" minOccurs="0" /> <s:element name="Name" type="s:string" minOccurs="0" /> <s:element name="DOB" type="s:date" minOccurs="0" /> </s:sequence> </s:complexType> </s:element> </s:choice> </s:complexType> <s:unique name="Constraint1" msdata:PrimaryKey="true"> <s:selector xpath=".//SQL" /> <s:field xpath="ID" /> </s:unique> </s:element> </s:schema> <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"> <DefaultDataSet xmlns=""> <SQL diffgr:id="SQL1" msdata:rowOrder="0"> <ID>3</ID> <Name>Bush,Sam K.</Name> <DOB>1932-05-05</DOB> </SQL> <SQL diffgr:id="SQL2" msdata:rowOrder="1"> <ID>53</ID> <Name>Basile,Rhonda B.</Name> <DOB>2001-07-18</DOB> </SQL> <SQL diffgr:id="SQL3" msdata:rowOrder="2"> <ID>66</ID> <Name>Bachman,Julie M.</Name> <DOB>1959-10-11</DOB> </SQL> <SQL diffgr:id="SQL4" msdata:rowOrder="3"> <ID>102</ID> <Name>Bach,Mo N.</Name> <DOB>1936-01-17</DOB> </SQL> <SQL diffgr:id="SQL5" msdata:rowOrder="4"> <ID>116</ID> <Name>Braam,William V.</Name> <DOB>1983-03-06</DOB> </SQL> </DefaultDataSet> </diffgr:diffgram> </SQLResult>
go to post Tani Frankel · Mar 9, 2016 Hi John,Out of curiosity - if you could share - what is your Plugin going to do?Tani