If you use INSERT with %NOLOCK, then some other process might UPDATE partially inserted row.
Rows inserted as follows:
a) Save inserted row (fill Data global)
b) File index values for inserted row (fill Index global)
Imagine there are two parallel processes A and B. A inserts row with %NOLOCK. B updates the same row without %NOLOCK.
t1) A saves row, filling Data global
t2) B updates the same row, overwriting the value in Data global
t3) B fills Index global with values corresponding to new data of row
t4) A fills Index global with values corresponding to old data of row (as of Insert time)
Now you have row in the table with wrong indices.
Also, please notice that if there is inheritance in classes -- E.g. Sample.Employee inherits from Sample.Person. Then storing row in Data global is at least two SETs, so you might end up with corrupted row, not only wrong index. Also filing index records is not atomic. Each index record is separate SET.
So, I would not recommend to use %NOLOCK. There is one possible use case for %NOLOCK -- bulk-loading data, but there should be only one process accessing the data while loading.
Access Denied error usually means incorrect credentials or lack of required privileges.
You can try to enable Audit in IRIS (Management Portal -> System Administration -> Security -> Auditing). Then enable LoginFailure and Protect events (Auditing -> Configure System Events).
Then reproduce the error and check audit (Auditing -> View Audit Database). If LoginFailure or Protect events appeared -- click on Details, they might give some hints of why you are getting "Access Denied".
These are credentials for CSP Gateway to use for connecting to Caché. If there is no such username/password pair in Caché or if corresponding user does not have enough privileges, then this username/password pair is not valid.
USER>set reg = $system.CSP.GetGatewayRegistry()
USER>set managers = reg.GetGatewayMgrs("a")
USER>write managers.Size // you can have many CSP Gateways connected to this Caché instance
1
USER>set mgr = managers.GetAt(1) // I only have one
USER>write mgr.GetThisServerName(.names)
1
USER>zwrite names // this server is listed in CSP Gateway Configuration as 'LOCAL'.
names(0)="LOCAL"
USER>kill params
USER>set params("Username")="CSPSystem"
USER>set params("Password")="very strong password"
USER>write mgr.SetServerParams("LOCAL",.params)
1
USER>write mgr.CloseConnections("LOCAL") // close connections, forcing to reconnect with new credentials.
1
Please be careful, if username/password are not valid for connection to Caché, then CSP Gateway will not be able to reconnect, and you'll loose connection with CSP Gateway and ability to modify settings using this API.
This message means, that server-side Atelier API -- web-application /api/atelier -- is configured with only Unauthenticated access. So, even though you put Username/Password in Server connection dialog, they are cannot be used, as server-side configuration does not allow this.
To allow password authentication, open Management Portal, then go to Menu (top-left corner) -> Manage Web Applications -> [api/atelier].
Put checkbox near Password in "Allowed Authentication Methods". Save the web application
If you can’t telnet to that server/port from computer with Studio then something in the middle prevents this connection. This is question for network administrators.
go to post
Tuan,
$.TotalSteps
seem to work OK in curl:C:\utl>curl -i -X POST -H "Content-Type: application/json" http://localhost:52774/api/docdb/v1/USER/db/TestDB HTTP/1.1 201 Created ... {"content":{"Name":"TestDB","Class":"ISC.DM.TestDB","properties":[{"Name":"%%OID","Type":"%Library.RawString"},{"Name":"%Concurrency","Type":"%Library.RawString"},{"Name":"%Doc","Type":"%Library.DynamicAbstractObject"},{"Name":"%DocumentId","Type":"%Library.Integer"},{"Name":"%LastModified","Type":"%Library.UTC"}]}} C:\utl>curl -i -X POST -H "Content-Type: application/json" http://localhost:52774/api/docdb/v1/USER/prop/TestDB/TotalSteps?type=%Integer&path=$.TotalSteps HTTP/1.1 201 Created ... {"content":{"Name":"TotalSteps","Type":"%Library.Integer"}}
What error do you get?
go to post
Yes,
there is an API to export and import web-applications info to and from file.
To export:
%SYS>write ##class(Security.Applications).Export("c:\temp\webapp.xml",.n,"/csp/samples,/csp/user")
To import:
%SYS>write ##class(Security.Applications).Import("c:\temp\webapp.xml",.n) 1 %SYS>write n 2
go to post
No, it's not safe to use %NOLOCK on INSERT query.
Doc says following:
%NOLOCK ... should only be used when a single user/process is updating the database.
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...
If you use INSERT with %NOLOCK, then some other process might UPDATE partially inserted row.
Rows inserted as follows:
a) Save inserted row (fill Data global)
b) File index values for inserted row (fill Index global)
Imagine there are two parallel processes A and B. A inserts row with %NOLOCK. B updates the same row without %NOLOCK.
t1) A saves row, filling Data global
t2) B updates the same row, overwriting the value in Data global
t3) B fills Index global with values corresponding to new data of row
t4) A fills Index global with values corresponding to old data of row (as of Insert time)
Now you have row in the table with wrong indices.
Also, please notice that if there is inheritance in classes -- E.g. Sample.Employee inherits from Sample.Person. Then storing row in Data global is at least two SETs, so you might end up with corrupted row, not only wrong index. Also filing index records is not atomic. Each index record is separate SET.
So, I would not recommend to use %NOLOCK. There is one possible use case for %NOLOCK -- bulk-loading data, but there should be only one process accessing the data while loading.
go to post
Hi Roger.
Please notice Eclipse 2018-09 (4.9.0) is not Photon. It seems that it's codename is SimRel (https://www.eclipse.org/downloads/)
Eclipse Photon is 4.8.
Please try to use Atelier 1.3 on top of Eclipse Photon 4.8.
Thank you,
Alexander.
go to post
Hi Xiao.
Many people here know Caché. Not so many know Oracle.
If you would explain what is Oracle CDC. What it does, and what features do you need, then we would be able to answer how you can do this in Caché.
Thank you,
Alexander.
go to post
Daniel,
in the guide https://community.intersystems.com/post/k-means-clustering-iris-dataset Niyaz connects to the InterSystems IRIS using user 'dev' and password '123'. Did you change that to user/password that exists on your system?
Access Denied error usually means incorrect credentials or lack of required privileges.
You can try to enable Audit in IRIS (Management Portal -> System Administration -> Security -> Auditing). Then enable LoginFailure and Protect events (Auditing -> Configure System Events).
Then reproduce the error and check audit (Auditing -> View Audit Database). If LoginFailure or Protect events appeared -- click on Details, they might give some hints of why you are getting "Access Denied".
go to post
These are credentials for CSP Gateway to use for connecting to Caché. If there is no such username/password pair in Caché or if corresponding user does not have enough privileges, then this username/password pair is not valid.
go to post
Yes.
USER>set reg = $system.CSP.GetGatewayRegistry() USER>set managers = reg.GetGatewayMgrs("a") USER>write managers.Size // you can have many CSP Gateways connected to this Caché instance 1 USER>set mgr = managers.GetAt(1) // I only have one USER>write mgr.GetThisServerName(.names) 1 USER>zwrite names // this server is listed in CSP Gateway Configuration as 'LOCAL'. names(0)="LOCAL" USER>kill params USER>set params("Username")="CSPSystem" USER>set params("Password")="very strong password" USER>write mgr.SetServerParams("LOCAL",.params) 1 USER>write mgr.CloseConnections("LOCAL") // close connections, forcing to reconnect with new credentials. 1
Please be careful, if username/password are not valid for connection to Caché, then CSP Gateway will not be able to reconnect, and you'll loose connection with CSP Gateway and ability to modify settings using this API.
For more details see
1. https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...
2. Class reference for classes in package %CSP.Mgr
go to post
Cody, seems that server you connect to uses Server Name Indication.
Caché supports this starting from 2017.2
In 2017.1.1 you can do what Eduard suggests as a workaround.
go to post
Unless you have list with $c(3,1,0) as element
USER>set list = $lb("stri,ng", $c(0), 2, $c(3,1,0), 3) USER>set list = $replace(list, $lb($c(0)), $lb()) USER>zw list list=$c(9,1)_"stri,ng"_$c(1,3,4,2,5,1,1,3,4,3) USER>w $LL(list) W $LL(list) ^ <LIST>
go to post
set $list(list,2,2)=$LB()
?
go to post
I don't know the fastest way. I know a way:
set list = $lb("stri,ng", $c(0), 2) set list2 = "", ptr = 0 while $listnext(list, ptr, elem) { if elem'=$C(0) { set list2 = list2 _ $LB(elem) } else { set list2 = list2 _ $LB() } }
go to post
Hi Sebastian
Maybe you are looking for ^%ISC.ZEN.cssLevel
Or the method %OnDetermineCSSLevel
paragraph "Zen Pages Uses CSS Level 3"
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...
go to post
David,
Have you tried suggestion from
https://community.intersystems.com/post/eclipse-could-not-render-atelier...
?
go to post
Shouldn't it be:
default.driver: com.intersystems.jdbc.IRISDriver
?
go to post
Might be that %Development resource has 'Public Permission' -- see Management Portal -> System Administration -> Security -> Resources.
Might be that %Development resource is granted not to user directly, but to web application.
So, I would check that security settings are the same on both 2016.2 and 2017.2 instances
go to post
This message means, that server-side Atelier API -- web-application /api/atelier -- is configured with only Unauthenticated access. So, even though you put Username/Password in Server connection dialog, they are cannot be used, as server-side configuration does not allow this.
To allow password authentication, open Management Portal, then go to Menu (top-left corner) -> Manage Web Applications -> [api/atelier].
Put checkbox near Password in "Allowed Authentication Methods". Save the web application
go to post
Dan,
also try to put following lines in/configuration/config.ini
osgi.module.lock.timeout=600 equinox.statechange.timeout=600
go to post
Hi Dan.
There were three questions for error with RuntimeDelegateImpl. Have you looked there? Maybe they have some solutions for your question
https://community.intersystems.com/search?search=Runtimedelegateimpl
go to post
If you can’t telnet to that server/port from computer with Studio then something in the middle prevents this connection. This is question for network administrators.