modifity status RW database
Hi folks!
I need to change a status database to RW with the class
I used scripts for this, for example, I can create a database like this
setup_database() {
csession -B -U "%SYS" <<-EOF
zw ##class(SYS.Database).CreateDatabase("/InterSystems/cachedb/mydatabase")
set Properties("Directory")="/InterSystems/cachedb/mydatabase"
zw ##Class(Config.Databases).Create("MYDATABASE",.Properties)
halt
EOF
How can I modify this status R/W?
Product version: Caché 2018.1
Discussion (2)0
Comments
From classreference:
Properties which can be modified for an already created database are:
ReadOnly
.......
So, after the creation of the database:
Set db=##Class(SYS.Database).%OpenId("/InterSystems/cachedb/mydatabase")
Set db.ReadOnly=0
Write db.%Save()
Enrico
Thanks Enrico!