文章
#InterSystems IRIS
#InterSystems IRIS for Health
公告
问题
七月 01 - 07, 2024Week at a GlanceInterSystems Developer Community
https://es.community.intersystems.com/node/570086
InterSystems 常见问题系列FAQ
如果要让超时功能失效, 在DSN设置查询超时为disabled:
Windows Control Panel > Administrative Tools > Data Sources (ODBC) > System DSN configuration
如果勾选了Disable query timeout , 超时就会失效.
如果想在应用侧修改,你可以在ODBC API 层设置:在连接数据源之前,调用ODBC SQLSetStmtAttr功能设置SQL_ATTR_QUERY_TIMEOUT 属性
https://es.community.intersystems.com/node/570081
https://es.community.intersystems.com/node/570076
InterSystems 常见问题系列FAQ
InterSystems 产品里数据 (表、对象、实例数据) 是存在global 变量里的。
每个global 的数据大小可以从管理门户中中点击属性查看Management Portal > System > Configuration > Local Database > Globals page, 然后在global 属性页点击计算大小Calculate Size 按钮。
你可以在终端上调用^%GSIZE 来在命名空间里显示数据大小,方法如下.
USER>do ^%GSIZE
Directory name: c:\intersystems\ensemble\mgr\user\ =>
All Globals? No => Yes
^DeepSee.ActiveTasks contains no data
Include it anyway? No => Y
Include any other similar globals without asking again? Yes =>
^DeepSee.ActiveTasks contains no data
Include it anyway? No => Yes
Include any other similar globals without asking again? Yes => Yes
^DeepSee.FeatureStats contains no data -- included
^DeepSee.Session contains no data -- included
^oddBIND contains no data -- included
^oddMETA contains no data -- included
^oddStudioDocument contains no data -- included
^oddStudioMenu contains no data -- included
^rINCSAVE contains no data -- included
91 items selected from
91 available globals
Show details?? No => Yes
Device:
Right margin: 80 =>
directory: c:\intersystems\ensemble\mgr\user\ Page: 1 GLOBAL SIZE 26 Jun 2017
6:56 PM
Global Blocks Bytes Used Packing Contig.
-------- -------- --------------- ------- -------
CacheMsg 1 3,812 47 % 0
DeepSee.ActiveTasks
1 24 0 % 0
DeepSee.AgentLog
1 6,008 74 % 0
DeepSee.Agents
1 688 8 % 0
DeepSee.BucketList
1 76 1 % 0
DeepSee.Cache.Axis
25 142,616 70 % 14
DeepSee.Cache.Listing
15 87,728 72 % 11
DeepSee.Cache.Results
31 183,200 72 % 17
DeepSee.Cubes
3 17,936 73 % 0
to continue or '^' to STOP:
https://es.community.intersystems.com/node/570071
InterSystems 常见问题系列FAQ
流程如下
1. 上传到 FTP server
set tmpfile="c:\temp\test.jpg"
set ftp=##class(%Net.FtpSession).%New()
// connect to FTP server
do ftp.Connect("","<username>","<password>")
// set transfer mode to BINARY
do ftp.Binary()
// Move to the directory to upload
do ftp.SetDirectory("/temp/upload")
// Prepare a stream of files to upload
set file=##class(%File).%New(tmpfile)
do file.Open("UK\BIN\")
// upload file
// 1st argument: File name to create at upload destination
// 2nd argument: File stream to upload
do ftp.Store("test.jpg",file)
// Logout from ftp server
do ftp.Logout()
// close the file
do file.Close()
// (Optional) Delete the uploaded file
//do ##class(%File).Delete(tmpfile)
2. 从FTP服务器下载
set ftp=##class(%Net.FtpSession).%New() // Connect to ftp server
do ftp.Connect("","<username>","<password>") // Set the transfer mode to BINARY
do ftp.Binary() // Prepare a file stream to download and store
set stream=##class(%FileBinaryStream).%New()
do stream.LinkToFile("c:\temp\testdownload.jpg")
// Go to the download directory
do ftp.SetDirectory("/temp/download") // Download the file and close the stream
do ftp.Retrieve("test.jpg",stream)
do stream.SaveStream()
Set stream="" // Logout from the ftp server
do ftp.Logout()
https://es.community.intersystems.com/node/570066