Yes, I have also tried this method (It is used in the CURRENT^%IS routine). But it does not return the changed size. Here it returns fixed 80 for column , even changed to 132.
- Log in to post comments
Yes, I have also tried this method (It is used in the CURRENT^%IS routine). But it does not return the changed size. Here it returns fixed 80 for column , even changed to 132.
Thanks Vitaliy Serdtsev, now I understand where the values are stored.With that I know the limitations in obtaining this data.
Completing Lucas Scarduelli's answer.The solution we found was to change the accent characters (ex: á, é, í, ó, ú, ç ..) by entity characters (https://developer.mozilla.org/en-US/docs/Glossary/Entity).
We did a test creating an HTML file with no accented character and imported it without error.
Thank you for helping Eduard Lebedyuk.
Lucas Scarduelli and I followed that idea.Just by contributing, we developed the following method:
Cool, I learned using ZNSPACE (in the 2008 version) to change between namespaces in the routines. Looking at the documentation actually recommends the 'set $namespace = ... '.Caché always surprising ...
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_cznspace
So, I enabled the Network Activities view (In the Atelier: Window> Show View> Other> Atelier> Network Activities) and performed the project compilation.
I noticed that when the 'Failed to read' error occurs in the Network Activities view it displays a TimeOut error in this request:
<<<!!! Time:1532368945008 Server: cache201713 POST:/api/atelier/v1/ERP/action/compile?flags=ck Message:Error: java.net.SocketTimeoutException: Read timed out Total time:30057
This compilation, by terminal, lasts 10 minutes or more. I'm doing some testing to see if compile time is related. Because in namespace with few classes this does not happen, when I create an Atelier project of these.
Does your project last this build time by terminal?
I tried this method.But it seems that it returns from the current process, not from the referenced process.
%SYS>s p1 = ##class(%SYS.ProcessQuery).Open("P3276") w p1.GetCPUTime()
63,47
%SYS>s p2 = ##class(%SYS.ProcessQuery).Open("P7796") w p2.GetCPUTime()
63,47
%SYS>w ##class(%SYS.ProcessQuery).GetCPUTime()
63,47%SYS>s p1 = ##class(%SYS.ProcessQuery).Open("P3276") w p1.GetCPUTime()
63,47
%SYS>s p2 = ##class(%SYS.ProcessQuery).Open("P7796") w p2.GetCPUTime()
78,47
%SYS>w ##class(%SYS.ProcessQuery).GetCPUTime()
78,47%SYS>s p1 = ##class(%SYS.ProcessQuery).Open("P3276") w p1.GetCPUTime()
78,47
%SYS>s p2 = ##class(%SYS.ProcessQuery).Open("P7796") w p2.GetCPUTime()
78,47
%SYS>w ##class(%SYS.ProcessQuery).GetCPUTime()
78,47
Thanks Eduard
Nice! I was looking for something like that.
If it is when you add Group By, it can be:
Thank you Eduard. That's what I was looking for. I also found the method that exports and imports the settings:
do ##class(%SYS.Portal.Resources).Export("CustomPortalResourcesExport.xml")
do ##class(%SYS.Portal.Resources).Import("CustomPortalResourcesExport.xml")
Thank you Evgeny and Benjamin for answering.
I used the method store procedure to solve this recursion problem.
We use Zabbix through Caché's SNMP protocol. Monitoring five instances of Caché on different servers successfully.
You can try to use %IGNOREINDEX
Usually, I follow the order of indexes or column selectivity (this is a general rule in all databases). For large tables or complex queries, this can influence. However, it seems that the Caché SQL optimizer chooses the best query plan.
Maybe the "Next" method is missing.
Ex:
SET rs = ##class(%SQL.Statement).%ExecDirect(, "SELECT * FROM LISDB.ExternalUsers WHERE UserId = 83")
do rs.%Next()
write rs.%Get("Prefix")
If that doesn't work, put the command sequence you're running.
Thank you @Igor Titarenko, it is exactly what I was looking for.
Hi @Robert Cemper, I'm going to do some tests with your example, thank you!
Very useful. I have had this problem many times.
At Caché I usually use it:
SELECT Routine, Query FROM %Library.SQLCatalog_SQLCachedQueryInfo()Is there a difference?
I also don't know the %SQL_Manager.CachedQueryTree() and I didn't find it in the Doc. I don't know if there's a difference.
In Caché I use this:
set path = ##class(Config.Databases).Open("USER").Directoryset database = ##class(SYS.Database).%OpenId($get(path)) do database.DisableJournaling() set status = database.%Save() do database.EnableJournaling() set status = database.%Save()
You can try this using EmergencyId mode. Stop IRIS and start with the parameter:
Linux
iris start IRIS EmergencyId=user,passwordWindows
iris start IRIS /EmergencyId=user,passwordUser and password can be anything. This will be used for login.
Once logged in as this user by the terminal, you can use the ^SECURITY routine in the %SYS namespace to change the password of _SYSTEM.
Documentation (Temporary):
As @Danny.Wijnschenksaid, on Windows it needs to be /EmergencyId=.
There are a few more instructions in the Documentation, like "Start a command prompt, running it as an administrator", etc.
I'm using Zabbix to monitor all IRIS status and it works great. Zabbix has alert features (Triggers) that communicate with me via email or communication channels (like slack) when an incident occurs. I collect status information, errors, performance, etc. I use SNMP protocol indicators and other indicators through ODBC, some created by me and others obtained through monitor collections.
You can also try rebuilding the Index Table or clearing Cached Queries. Portal uses cached query and in its code it uses Embedded SQL (&sql) - Doc.: There is no need for a cache for Embedded SQL, because Embedded SQL statements are replaced with inline code at compilation time.
I didn't know about this change in IRIS. Thanks for clarifying.
Based on the ODBC source program maybe you can get it with Delegated Authentication. Depending on the origin, the user would receive additional Roles or not with (Using Privileged Routine Applications).
To create additional or specific Roles for each user or user group see RBAC documentation.
You can review the 'UnknownUser' user's permissions. In the documentation it says that 'Embedded SQL' does not check permissions:
InterSystems SQL enforces privilege checking for ODBC, JDBC, Dynamic SQL, and the SQL Shell interface on InterSystems IRIS data platform. Embedded SQL statements do not perform privilege checking;
Or use an authenticated user with the proper permissions;
About privileges and users: Users, Roles, and Privileges
About authentication: Authentication and Authorization
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