搜索​​​​

清除过滤器
文章
Qiao Peng · 二月 18, 2022

SQL语句与数据模式(Select Mode)

InterSystems IRIS和InterSystems Caché 里,是否您遇到过执行一个SQL Insert/Update语句,明明给的是正确的日期值,但被告知“值‘2022-01-01’ 校验失败”的类似情况,并感到困惑? 如果有,那么您需要了解一下InterSystems IRIS和InterSystems Caché保存和显示数据的模式。 一 数据模式 InterSystems IRIS和InterSystems Caché里,数据有3种模式,称之为SELECT MODE:逻辑模式:这是数据被保存到InterSystems IRIS和InterSystems Cache'时的格式。例如,%Date类型的数据,在数据库里被保存为一个整数,即从1840年12月31号到这个日期的天数,而不是YYYY-MM-DD的格式。 ODBC模式:这是ODBC对数据定义的格式。在这个模式下,%Date类型的数据就会显示为YYYY-MM-DD的格式。 显示模式:这是数据在InterSystems IRIS和InterSystems Caché里默认的显示格式。例如在美国语言环境下,%Date的默认显示格式是DD/MM/YYYY格式。 InterSystems IRIS和InterSystems Caché只会使用逻辑模式保存数据,但可以以任何模式显示数据。 二 数据类型与数据模式 大多数数据类型在3种数据模式下的格式是一样的,例如%String、%Integer等。但有些情况下,数据在不同数据模式下的格式是不一样的: 时间、日期类型的数据 InterSystems提供多种时间、日期数据类型,包括%Date、%Time、%PosixTime、%TimeStamp 和%MV.Date。除了%TimeStamp,这些时间日期数据类型的3种数据模式下的格式都是不同的。 列表类型的数据 作为一个多模型数据库,可以指定数据为列表类型(%ListOfDataTypes)。列表类型数据的在不同数据模式下的格式也是不同的。例如一个定义为list of %String的属性/字段,中文数据以显示模式和ODBC模式看,数据显示是没问题的,但逻辑模式下看似乱码(其实并非乱码)。 指定了VALUELIST 和 DISPLAYLIST的数据 例如在建立患者模型时,我们指定其性别数据类型为%String,但通过VALUELIST限定它的值只可以是0、1、2、9,通过DISPLAYLIST设置这4个值的显示值为“未知的性别"、 "男性"、"女性"、"未说明的性别"。这样,数据被保存到数据库时,保存的是0、1、2、9,而显示值和ODBC值都是中文说明。 空字符串和空字符流数据 在逻辑模式下,空字符串和 空BLOB 由不可显示的字符 $CHAR(0) 表示。在显示模式下,它们由一个空字符串 ("") 表示。 三 SQL与数据模式 InterSystems提供很多种SQL操作的方式,而其当使用SQL操作数据的时候,很多操作和数据模式有关,例如数据排序。 SQL操作的方式 您是如何使用SQL的?是通过ODBC/JDBC,还是在Object Script里通过嵌入式SQL或动态SQL,抑或是通过Terminal或管理门户的SQL操作页面? 1. ODBC/JDBC 通过ODBC/JDBC连接到InterSystems数据库时,问题很简单:无论是插入或更新数据,还是查询数据,作为值、查询条件的数据和返回的数据显示结果都是按ODBC格式的。也就是说,这种情况下,您不需要关心数据模式。 2. 嵌入式SQL 如果您在使用嵌入式SQL(&SQL)操作数据,那么就需要留心数据模式了。可以通过#SQLCompile Select这个预处理器指令设置需要的数据模式,例如设置为ODBC模式: ClassMethod Test(pDocNo = "Doc123456") { #SQLCompile Select=ODBC &SQL(Insert into Test.Table( DocumentNo, DOB, name_Value) values( :pDocNo, '2001-10-10', '预防接种史描述') ) } #SQLCompile Select可以设置为逻辑模式(Logical)、显示模式(Display)、 ODBC模式(ODBC)或 运行时模式(RuntimeMode)。而RuntimeMode默认为逻辑模式。 3. 动态SQL 如果是使用动态SQL,对于%SQL.Statement,它有一个属性%SelectMode,可以用来设置数据模式。它的可选值为:0 (逻辑模式)、1 (ODBC模式) 、2(显示模式),0(逻辑模式)是默认值。 例如下面的例子将数据模式设置为逻辑模式: SET myquery = 3 SET myquery(1) = "SELECT {t '12:04:29'} AS time1," SET myquery(2) = "{t '12:4:29'} AS time2," SET myquery(3) = "{t '12:04:29.00000'} AS time3" SET tStatement = ##class(%SQL.Statement).%New() SET tStatement.%SelectMode=0 SET tStatus = tStatement.%Prepare(.myquery) SET rset = tStatement.%Execute() DO rset.%Display() 4. Terminal的SQL shell 当使用Do $System.SQL.Shell()进入Terminal的SQL操作环境时,可以使用SET SELECTMODE命令来查询和设置数据模式。 直接使用SET SELECTMODE命令,返回的是当前数据模式。要设置数据模式,使用SET SELECTMODE=odbc/logic/display,例如SET SELECTMODE=odbc将当前SQL操作环境的数据模式设置为ODBC模式。 注意:SET SELECTMODE=odbc,等号前后不能有空格! 5. 管理门户的SQL操作页面 在管理门户的SQL操作页面中,通过下拉列表来选择当前的数据模式。 例如下面的逻辑模式的数据显示结果: 这是相同的数据在显示模式下的数据显示结果: 6. 在同一个SQL语句中显示不同的数据模式 有可能出于某种原因,你希望在SQL语句中对不同的字段使用不同的数据模式。这时,可以使用SQL函数:%EXTERNAL、%INTERNAL和 %ODBCOUT 来控制输出模式。 %EXTERNAL:按显示模式输出表达式结果%INTERNAL:按逻辑模式输出表达式结果 %ODBCOUT :按ODBC模式输出表达式结果 例如对于相同的数据,我们采用不同的数据模式输出: 那么除了显示和赋值,哪些操作和数据模式相关呢? 和数据模式相关的操作 1. 比较谓语 在where子句中进行比较的谓语,包括=、>、<、BETWEEN和 IN,这些比较谓语操作时,都会用逻辑模式的值进行比较操作,但可以通过SQL函数做其他数据模式到逻辑模式的数据转换。 例如,我们做日期类型的比较,当前的数据模式是ODBC模式,mydate是ODBC模式,比较条件值也应该是ODBC模式,可以这样写: ... WHERE mydate > '2010-01-01' 而如果数据模式是逻辑数据模式,上面的SQL写法将不会得到你想要的结果,因为这时mydate是逻辑模式的值。你可以用SQL函数TO_DATE将ODBC格式的日期值转为逻辑值: ... WHERE mydate>TO_DATE('2010-01-01','YYYY-MM-DD') 2. 模式谓语在where子句中进行模式分析的谓语,包括%INLIST、 LIKE、 %MATCHES、 %PATTERN、 %STARTSWITH、 [ (包含操作符) 和 ] (跟随操作符),这些模式分析操作也是用逻辑值进行比较,但不能用SQL函数进行其他模式到逻辑模式的转换。 当然,你可以考虑用模式转换函数将数据转换为字符串进行模式分析,例如下面的SQL使用%ODBCOUT将mydate转为ODBC格式的字符串,并看其模式是否满足以“2010-”开头。 ...WHERE %ODBCOut(mydate) %STARTSWITH '2010-' 注意,这时SQL引擎不会使用mydate上的索引,有可能造成性能降低。 3. 排序操作 无论使用哪种数据模式,ORDER BY 都使用逻辑模式的值进行排序。
文章
TZ Zhuang · 六月 2, 2021

FAQ 常见问题系列--系统管理篇 如何进行数据库备份

InterSystems产品有四种备份方法:(1) 外部备份(2) 在线备份(3) 冷备份(4) 传统的并行外部备份有关这些方法的细节请参考在线文档 https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI.Page.cls?KEY=GCDI_BACKUP 以下是对每种备份方法的简要描述: (1) 外部备份外部备份是InterSystems推荐的最佳备份方式。外部备份一般是对数据库文件所在的存储创建快照的方式来实现。创建快照可以在多个层面进行,例如存储层面,操作系统层面,等等,因此这些相关技术和工具一般由第三方来提供。在做快照前,一定要先停止对数据库文件的写入(InterSystems IRIS的IRIS.DAT,Caché/Ensemble的CACHE.DAT)。但是用户进程可以继续对内存进行更新,而不需要中断。InterSystems提供了停止对数据库文件写入的方法,用户可以把这个加入到快照工具的脚本里。外部备份一般包括以下几步:1. 使用Backup.General.ExternalFreeze()方法来停止对数据库文件的写入。2. 使用第三方快照工具来对文件系统创建快照。3. 使用Backup.General.ExternalThaw()方法来恢复对数据库文件的写入。4. 把快照拷贝到备份介质上(用于存储备份的磁盘,磁带,等等)。5. 删除快照。 (2) 在线备份在线备份是InterSystems自己特有的备份方式,可实现无宕机备份。但是,在线备份只能备份数据库文件(InterSystems IRIS的IRIS.DAT,Caché/Ensemble的CACHE.DAT),并且会把所有需要备份的数据库文件中的数据块写入到一个.cbk的备份文件。因此如果想要使用在线备份来备份整个系统环境,除了数据库文件外,还需要额外备份很多系统文件,例如InterSystems产品的安装目录,WIJ文件,主日志和备日志目录等等。在线备份包括3种类型:1. 全备份 -- 把所有使用的数据块写入到一个.cbk文件。2. 累积备份 -- 从上一次全备份起,所有变化过的数据块写入到一个.cbk文件。恢复时,需要和上一次全备份一起恢复。3. 增量备份 -- 从上一次备份起,所有变化过的数据块写入到一个.cbk文件。恢复时,需要和上一次全备份及中间所有备份一起恢复。在线备份的这些特性,并不适用于作为数据量大的生产系统的备份方案。 (3) 冷备份冷备份是在数据库系统正常停机状态下,所做的外部备份,即拷贝文件系统到存储介质。 (4) 传统的并行外部备份传统的并行外部备份是一种在特殊情况下才可行的备份方法。一般需要满足以下条件:1. 数据库在一个集群里,并且不能有宕机时间。2. 没有快照功能。3. 在线备份不能满足需求。并行外部备份结合了数据库文件(*.DAT)拷贝和在线备份里增量备份的功能。其步骤如下:1. 在数据库中设置备份启动标志。2. 拷贝数据库文件(*.DAT)。3. 对该拷贝时间内被修改的数据进行在线备份的增量备份。具体使用情况和详情也请参考在线文档 https://docs.intersystems.com/irisforhealthlatest/csp/docbook/Doc.View.cls?KEY=GCDI_backup#GCDI_backup_methods_ext_concurrent 最新版本InterSystems IRIS for Health示例:===============================================================1. 设置标志,开始备份数据库。Set ^ClearOK=$CLRINC^DBACK("QUIET")2. 拷贝操作系统上的数据库文件(*.DAT)。3. 运行下面的命令,表明你已经使用了一个外部备份工具。Set x=$$BACKUP^DBACK("","E","Dirty external backup","","","")4. 进行增量备份。Set x=$$BACKUP^DBACK("","I","incremental","test.cbk","Y","bck.log","QUIET","Y","Y")===============================================================InterSystems产品中的上述处理可以做成例程Routine或类方法,并与批处理相结合进行操作。关于传统并行外部备份中使用的^DBACK例程的更多信息,请参考以下文件https://docs.intersystems.com/irisforhealthlatest/csp/docbook/Doc.View.cls?KEY=GCDI_backup#GCDI_backup_util_DBACK_entry_backup
公告
Claire Zheng · 六月 13, 2022

2022 SUTA培训报名启动啦!

SUTA培训是InterSystems专为SUTA有效期客户提供的原厂产品技术服务,具体包括产品的基础管理、编程管理、高级管理和开发培训等。即日起2022 SUTA培训报名启动,本年度为针对InterSystems数据平台产品的线上培训,一共6期12个课程,其中每期两个课程,时间安排在周五下午半天(6月24日—8月5号),6期培训总时长共计三天。点击此处报名,或者扫描下图中的二维码报名,在您的报名信息经过审核后,我们会与您进一步沟通线上培训细节。快来报名吧! 点击下载,了解2022 SUTA培训课程安排详情。
文章
Tingting Jiang · 三月 21, 2023

实习生招聘

注意:请投递时,发送英文简历! 工作概述 每年夏天InterSystems都会招聘实习生在中国办公室工作,从事专门围绕InterSystems产品设计的项目。我们信任实习生团队在导师的指导下可独立的工作。除了在项目中工作外,实习生还能融入我们的团队,与我们的全职员工一起解决所面对的工作问题。 InterSystems的带薪暑期实习项目可以让学生接触到在重要的职业生涯中出类拔萃所需的各种技术和软技能。 我们希望实习生可以累计工作时长4个月,预计于2023年6月份开始。 工作职责 参加必要的培训课程,成功完成实习期间分配的项目。 在导师和其他InterSytems员工的指导下,成功地完成分配给他们团队的项目。 向高层领导和InterSystems的员工展示他们的项目。 遵守实习计划的所有要求(包括出勤、着装、行为)。 遵守公司关于实习的合理指示。 在公司规定的时间内可以进行活动。 如果在实习期间有任何计划外的缺席,请及时通知人力资源部门。 遵守适合公司的职业行为标准。 遵守公司的政策和程序,包括那些与WHS和就业公平和多样性有关的政策和程序。 在任何时候都要适当地、负责任地使用公司的资源。 承担所有与实习有关的评估活动。 对在实习期间获得的有关公司、员工、客户和公司业务的信息进行保密。 公司可能不时地指示其他职责。 任职条件 优先有以下一种或多种编码经验:Python、InterSystems ObjectScript、Node.js、SQL、XSLT和AngularJS在敏捷团队中工作,或类似的经验。 技术上的好奇心。 对复杂的技术挑战有创造力。 协作的团队心态。 在不断变化的工作环境中表现出灵活的态度。 主动为自己的职业生涯打下技术基础。 专业要求 计算机等相关专业的本科生、硕士生或者博士在读学生。 薪资 本科生:RMB6,000/月;硕士生:RMB7,000/月;博士生:RMB8,000/月。 工作地点 北京市朝阳区建国门外大街1号银泰中心写字楼C座2701 如何申请 请点击链接InterSystems Careers, 或在2023年4月30日前发送邮件至recruitment.asiapacific@intersystems.com。 不知道我可不可以 你可以给实习生当老师 哈哈哈哈
公告
Claire Zheng · 五月 9, 2021

欢迎中文社区新版主@刘文艺

亲爱的社区开发者们, 我很高兴地向大家介绍一位我们的新版主@刘文艺。 @刘文艺在嘉和美康(北京)科技股份有限公司任职集成平台研发部产品经理。 以下是@刘文艺的自我介绍: 大家好,我带领团队主导了多家大型医院的信息平台开发、系统集成和互联互通项目,有丰富的基于InterSystems产品的开发、部署和项目经验,对医疗信息行业有很深的认识和独特的想法,熟悉医疗行业相关标准,并获得HL7认证证书,和InterSystems技术认证证书。 本人乐于参与组织各种活动,分享经验,协作能力强,善于与人交流,很荣幸在InterSystems开发者社区(中文版)与大家相识,今后希望通过与大家共同努力,不断完善开发者社区的内容建设,提高社区人气的活跃度和忠诚度。让社区更好地为开发者提供知识传播、在线学习等服务。 感谢@刘文艺,恭喜你成为新版主! 热烈欢迎! 欢迎欢迎! 欢迎刘文艺! 作为国内首位开发者大赛的获奖者,请多多和大家分享你的经验哈
公告
Claire Zheng · 七月 11, 2022

欢迎中文社区新版主@黄念刚

亲爱的社区开发者们, 我很高兴地向大家介绍一位我们的新版主@黄念刚。 让我们以热烈的掌声欢迎 @黄念刚! @黄念刚目前任职于东华医为(Mediway),担任技术支持中心开发工程师一职。 以下是@黄念刚的自我简介: 我从2012年入职东华后开始接触InterSystems 的集成平台。使用过 InterSystems早期的Caché版本, Ensemble,目前使用的最高版本是Ensemble2016。 本人有接近10年的医疗信息化经验,熟悉 HL7 V2/V3,有着丰富的领域知识。 InterSystems 平台是一个非常优秀的集成平台,借助该技术,给我们业务带来了非常大的便利。我希望这么优秀的技术,能给更多的兄弟单位和合作伙伴创造价值。我希望能够在社区与大家一起交流,分享自己的一些实践经验,此外希望借助社区这个平台,向大家学习一些优秀的实践。我们一起成长,共同进步! 再次欢迎我们的新版主@黄念刚👏🏼👏🏼👏🏼👏🏼👏🏼 期待你在DC成长为一名优秀版主! 热烈欢迎!!!
公告
Claire Zheng · 十一月 14, 2021

大突破:全球开发者社区已有1万名成员! 中国开发者社区不到一年时间突破270人!增速全球第一!

亲爱的开发者们,我们很高兴地跟大家分享一个好消息! 我们的社区全球注册会员突破10000名!中国开发者社区不到一年时间突破270人!增速全球第一!这是一个了不起的成就!感谢大家的支持🎊 在InterSystems,我们相信社区的力量。所以我们非常感谢你们在过去六年里所做的贡献,并期待未来的道路! 我们希望与大家分享一些有趣的数据,全球社区: 2015年12月上线 总计发布 - 8,600篇 共计提问 - 5,500次 总计浏览 - 430万 中文社区 2021年1月上线 总计发布 - 748篇 共计提问 - 100+次 总计浏览 - 21000+ 不到一年的时间,能够有如此大的成绩,非常感谢所有人的参与和贡献,感谢你们的热情和分享!我们非常感谢大家的帮助,使我们的社区成为InterSystems乃至整个医疗信息化开发人员更好的地方。大家真的很棒! 请随时分享您成为InterSystems开发人员全球和中国大家庭一员的感受! 再次感谢大家,共同成就了这个可爱的大社区! 敬上,开发者社区团队 ❤️
文章
Jingwei Wang · 九月 27, 2021

IRIS 2021 技术文档 First Look 21 数据弹性(恢复、高可用与灾备)和镜像

html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: "Lucida Console",Consolas,"Courier",monospace; --title-bar-height: 20px; } .mac-os-11 { --title-bar-height: 28px; } html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; } body { margin: 0px; padding: 0px; height: auto; inset: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; tab-size: 4; background-position: inherit; background-repeat: inherit; } iframe { margin: auto; } a.url { word-break: break-all; } a:active, a:hover { outline: 0px; } .in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); } #write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 36px; } #write.first-line-indent p { text-indent: 2em; } #write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; } #write.first-line-indent li { margin-left: 2em; } .for-image #write { padding-left: 8px; padding-right: 8px; } body.typora-export { padding-left: 30px; padding-right: 30px; } .typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; } .typora-export .task-list-item input { pointer-events: none; } @media screen and (max-width: 500px) { body.typora-export { padding-left: 0px; padding-right: 0px; } #write { padding-left: 20px; padding-right: 20px; } .CodeMirror-sizer { margin-left: 0px !important; } .CodeMirror-gutters { display: none !important; } } #write li > figure:last-child { margin-bottom: 0.5rem; } #write ol, #write ul { position: relative; } img { max-width: 100%; vertical-align: middle; image-orientation: from-image; } button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; } input[type="checkbox"], input[type="radio"] { line-height: normal; padding: 0px; } *, ::after, ::before { box-sizing: border-box; } #write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; } #write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; } p { line-height: inherit; } h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 4; } p { orphans: 4; } h1 { font-size: 2rem; } h2 { font-size: 1.8rem; } h3 { font-size: 1.6rem; } h4 { font-size: 1.4rem; } h5 { font-size: 1.2rem; } h6 { font-size: 1rem; } .md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; } .hidden { display: none; } .md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; } a { cursor: pointer; } sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.7); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; } sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; } #write input[type="checkbox"] { cursor: pointer; width: inherit; height: inherit; } figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; } figure > table { margin: 0px; } tr { break-inside: avoid; break-after: auto; } thead { display: table-header-group; } table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; } table.md-table td { min-width: 32px; } .CodeMirror-gutters { border-right-width: 0px; background-color: inherit; } .CodeMirror-linenumber { } .CodeMirror { text-align: left; } .CodeMirror-placeholder { opacity: 0.3; } .CodeMirror pre { padding: 0px 4px; } .CodeMirror-lines { padding: 0px; } div.hr:focus { cursor: none; } #write pre { white-space: pre-wrap; } #write.fences-no-line-wrapping pre { white-space: pre; } #write pre.ty-contain-cm { white-space: normal; } .CodeMirror-gutters { margin-right: 4px; } .md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit; background-repeat: inherit; } .md-fences-adv-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; } #write .md-fences.mock-cm { white-space: pre-wrap; } .md-fences.md-fences-with-lineno { padding-left: 0px; } #write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; } .md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; } .CodeMirror-line, twitterwidget { break-inside: avoid; } .footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; } .footnotes + .footnotes { margin-top: 0px; } .md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; } li div { padding-top: 0px; } blockquote { margin: 1rem 0px; } li .mathjax-block, li p { margin: 0.5rem 0px; } li blockquote { margin: 1rem 0px; } li { margin: 0px; position: relative; } blockquote > :last-child { margin-bottom: 0px; } blockquote > :first-child, li > :first-child { margin-top: 0px; } .footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; } #write .footnote-line { white-space: pre-wrap; } @media print { body, html { border: 1px solid transparent; height: 99%; break-after: avoid; break-before: avoid; font-variant-ligatures: no-common-ligatures; } #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; } .typora-export * { -webkit-print-color-adjust: exact; } .typora-export #write { break-after: avoid; } .typora-export #write::after { height: 0px; } .is-mac table { break-inside: avoid; } .typora-export-show-outline .typora-export-sidebar { display: none; } } .footnote-line { margin-top: 0.714em; font-size: 0.7em; } a img, img a { cursor: pointer; } pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; } p > .md-image:only-child:not(.md-img-error) img, p > img:only-child { display: block; margin: auto; } #write.first-line-indent p > .md-image:only-child:not(.md-img-error) img { left: -2em; position: relative; } p > .md-image:only-child { display: inline-block; width: 100%; } #write .MathJax_Display { margin: 0.8em 0px 0px; } .md-math-block { width: 100%; } .md-math-block:not(:empty)::after { display: none; } .MathJax_ref { fill: currentcolor; } [contenteditable="true"]:active, [contenteditable="true"]:focus, [contenteditable="false"]:active, [contenteditable="false"]:focus { outline: 0px; box-shadow: none; } .md-task-list-item { position: relative; list-style-type: none; } .task-list-item.md-task-list-item { padding-left: 0px; } .md-task-list-item > input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; } .math { font-size: 1rem; } .md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; } .md-toc-content { position: relative; margin-left: 0px; } .md-toc-content::after, .md-toc::after { display: none; } .md-toc-item { display: block; color: rgb(65, 131, 196); } .md-toc-item a { text-decoration: none; } .md-toc-inner:hover { text-decoration: underline; } .md-toc-inner { display: inline-block; cursor: pointer; } .md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; } .md-toc-h2 .md-toc-inner { margin-left: 2em; } .md-toc-h3 .md-toc-inner { margin-left: 4em; } .md-toc-h4 .md-toc-inner { margin-left: 6em; } .md-toc-h5 .md-toc-inner { margin-left: 8em; } .md-toc-h6 .md-toc-inner { margin-left: 10em; } @media screen and (max-width: 48em) { .md-toc-h3 .md-toc-inner { margin-left: 3.5em; } .md-toc-h4 .md-toc-inner { margin-left: 5em; } .md-toc-h5 .md-toc-inner { margin-left: 6.5em; } .md-toc-h6 .md-toc-inner { margin-left: 8em; } } a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; } .footnote-line a:not(.reversefootnote) { color: inherit; } .md-attr { display: none; } .md-fn-count::after { content: "."; } code, pre, samp, tt { font-family: var(--monospace); } kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; } .md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); } code { text-align: left; } a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; } .md-inline-math .MathJax_SVG .noError { display: none !important; } .html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; } .md-fences-math .MathJax_SVG_Display, .md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: visible; display: block !important; } .MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; } .MathJax_SVG .MJX-monospace { font-family: var(--monospace); } .MathJax_SVG .MJX-sans-serif { font-family: sans-serif; } .MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; zoom: 90%; } #math-inline-preview-content { zoom: 1.1; } .MathJax_SVG * { transition: none; } .MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; margin-top: 0px !important; } .os-windows.monocolor-emoji .md-emoji { font-family: "Segoe UI Symbol", sans-serif; } .md-diagram-panel > svg { max-width: 100%; } [lang="flow"] svg, [lang="mermaid"] svg { max-width: 100%; height: auto; } [lang="mermaid"] .node text { font-size: 1rem; } table tr th { border-bottom-width: 0px; } video { max-width: 100%; display: block; margin: 0px auto; } iframe { max-width: 100%; width: 100%; border: none; } .highlight td, .highlight tr { border: 0px; } mark { background-color: rgb(255, 255, 0); color: rgb(0, 0, 0); } .md-html-inline .md-plain, .md-html-inline strong, mark .md-inline-math, mark strong { color: inherit; } .md-expand mark .md-meta { opacity: 0.3 !important; } mark .md-meta { color: rgb(0, 0, 0); } @media print { .typora-export h1, .typora-export h2, .typora-export h3, .typora-export h4, .typora-export h5, .typora-export h6 { break-inside: avoid; } } .md-diagram-panel .messageText { stroke: none !important; } .md-diagram-panel .start-state { fill: var(--node-fill); } .md-diagram-panel .edgeLabel rect { opacity: 1 !important; } .md-require-zoom-fix foreignObject { font-size: var(--mermaid-font-zoom); } .md-fences.md-fences-math { font-size: 1em; } .md-fences-math .MathJax_SVG_Display { margin-top: 8px; cursor: default; } .md-fences-advanced:not(.md-focus) { padding: 0px; white-space: nowrap; border: 0px; } .md-fences-advanced:not(.md-focus) { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit; background-repeat: inherit; } .typora-export-show-outline .typora-export-content { max-width: 1440px; margin: auto; display: flex; flex-direction: row; } .typora-export-sidebar { width: 300px; font-size: 0.8rem; margin-top: 80px; margin-right: 18px; } .typora-export-show-outline #write { --webkit-flex: 2; flex: 2 1 0%; } .typora-export-sidebar .outline-content { position: fixed; top: 0px; max-height: 100%; overflow: hidden auto; padding-bottom: 30px; padding-top: 60px; width: 300px; } @media screen and (max-width: 1024px) { .typora-export-sidebar, .typora-export-sidebar .outline-content { width: 240px; } } @media screen and (max-width: 800px) { .typora-export-sidebar { display: none; } } .outline-content li, .outline-content ul { margin-left: 0px; margin-right: 0px; padding-left: 0px; padding-right: 0px; list-style: none; } .outline-content ul { margin-top: 0px; margin-bottom: 0px; } .outline-content strong { font-weight: 400; } .outline-expander { width: 1rem; height: 1.428571429rem; position: relative; display: table-cell; vertical-align: middle; cursor: pointer; padding-left: 4px; } .outline-expander::before { content: ''; position: relative; font-family: Ionicons; display: inline-block; font-size: 8px; vertical-align: middle; } .outline-item { padding-top: 3px; padding-bottom: 3px; cursor: pointer; } .outline-expander:hover::before { content: ''; } .outline-h1 > .outline-item { padding-left: 0px; } .outline-h2 > .outline-item { padding-left: 1em; } .outline-h3 > .outline-item { padding-left: 2em; } .outline-h4 > .outline-item { padding-left: 3em; } .outline-h5 > .outline-item { padding-left: 4em; } .outline-h6 > .outline-item { padding-left: 5em; } .outline-label { cursor: pointer; display: table-cell; vertical-align: middle; text-decoration: none; color: inherit; } .outline-label:hover { text-decoration: underline; } .outline-item:hover { border-color: rgb(245, 245, 245); background-color: var(--item-hover-bg-color); } .outline-item:hover { margin-left: -28px; margin-right: -28px; border-left-width: 28px; border-left-style: solid; border-left-color: transparent; border-right-width: 28px; border-right-style: solid; border-right-color: transparent; } .outline-item-single .outline-expander::before, .outline-item-single .outline-expander:hover::before { display: none; } .outline-item-open > .outline-item > .outline-expander::before { content: ''; } .outline-children { display: none; } .info-panel-tab-wrapper { display: none; } .outline-item-open > .outline-children { display: block; } .typora-export .outline-item { padding-top: 1px; padding-bottom: 1px; } .typora-export .outline-item:hover { margin-right: -8px; border-right-width: 8px; border-right-style: solid; border-right-color: transparent; } .typora-export .outline-expander::before { content: "+"; font-family: inherit; top: -1px; } .typora-export .outline-expander:hover::before, .typora-export .outline-item-open > .outline-item > .outline-expander::before { content: '−'; } .typora-export-collapse-outline .outline-children { display: none; } .typora-export-collapse-outline .outline-item-open > .outline-children, .typora-export-no-collapse-outline .outline-children { display: block; } .typora-export-no-collapse-outline .outline-expander::before { content: "" !important; } .typora-export-show-outline .outline-item-active > .outline-item .outline-label { font-weight: 700; } .CodeMirror { height: auto; } .CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit; background-repeat: inherit; } .CodeMirror-scroll { overflow: auto hidden; z-index: 3; } .CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); } .CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit; background-repeat: inherit; } .CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); } .cm-s-inner .cm-keyword { color: rgb(119, 0, 136); } .cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); } .cm-s-inner .cm-number { color: rgb(17, 102, 68); } .cm-s-inner .cm-def { color: rgb(0, 0, 255); } .cm-s-inner .cm-variable { color: rgb(0, 0, 0); } .cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); } .cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); } .cm-s-inner .cm-string { color: rgb(170, 17, 17); } .cm-s-inner .cm-property { color: rgb(0, 0, 0); } .cm-s-inner .cm-operator { color: rgb(152, 26, 26); } .cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); } .cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); } .cm-s-inner .cm-meta { color: rgb(85, 85, 85); } .cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); } .cm-s-inner .cm-builtin { color: rgb(51, 0, 170); } .cm-s-inner .cm-bracket { color: rgb(153, 153, 119); } .cm-s-inner .cm-tag { color: rgb(17, 119, 0); } .cm-s-inner .cm-attribute { color: rgb(0, 0, 204); } .cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); } .cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); } .cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); } .cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); } .cm-negative { color: rgb(221, 68, 68); } .cm-positive { color: rgb(34, 153, 34); } .cm-header, .cm-strong { font-weight: 700; } .cm-del { text-decoration: line-through; } .cm-em { font-style: italic; } .cm-link { text-decoration: underline; } .cm-error { color: red; } .cm-invalidchar { color: red; } .cm-constant { color: rgb(38, 139, 210); } .cm-defined { color: rgb(181, 137, 0); } div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); } div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); } .cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit; background-repeat: inherit; } .CodeMirror { position: relative; overflow: hidden; } .CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit; background-repeat: inherit; } .CodeMirror-sizer { position: relative; } .CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; } .CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; } .CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; } .CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; } .CodeMirror-gutter-filler { left: 0px; bottom: 0px; } .CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; } .CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; } .CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; } .CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; } .CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; } .CodeMirror-lines { cursor: text; } .CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; } .CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; } .CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; } .CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; } .CodeMirror-linebackground { position: absolute; inset: 0px; z-index: 0; } .CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; } .CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; } .CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; } .CodeMirror-measure pre { position: static; } .CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; } .CodeMirror div.CodeMirror-cursor { visibility: hidden; } .CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; } .cm-searching { background-color: rgba(255, 255, 0, 0.4); } span.cm-underlined { text-decoration: underline; } span.cm-strikethrough { text-decoration: line-through; } .cm-tw-syntaxerror { color: rgb(255, 255, 255); background-color: rgb(153, 0, 0); } .cm-tw-deleted { text-decoration: line-through; } .cm-tw-header5 { font-weight: 700; } .cm-tw-listitem:first-child { padding-left: 10px; } .cm-tw-box { border-style: solid; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-color: inherit; border-top-width: 0px !important; } .cm-tw-underline { text-decoration: underline; } @media print { .CodeMirror div.CodeMirror-cursor { visibility: hidden; } } :root { --side-bar-bg-color: #fafafa; --control-text-color: #777; } @include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&subset=latin,latin-ext); /* open-sans-regular - latin-ext_latin */ /* open-sans-italic - latin-ext_latin */ /* open-sans-700 - latin-ext_latin */ /* open-sans-700italic - latin-ext_latin */ html { font-size: 16px; } body { font-family: "Open Sans","Clear Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; color: rgb(51, 51, 51); line-height: 1.6; } #write { max-width: 860px; margin: 0 auto; padding: 30px; padding-bottom: 100px; } @media only screen and (min-width: 1400px) { #write { max-width: 1024px; } } @media only screen and (min-width: 1800px) { #write { max-width: 1200px; } } #write > ul:first-child, #write > ol:first-child{ margin-top: 30px; } a { color: #4183C4; } h1, h2, h3, h4, h5, h6 { position: relative; margin-top: 1rem; margin-bottom: 1rem; font-weight: bold; line-height: 1.4; cursor: text; } h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor { text-decoration: none; } h1 tt, h1 code { font-size: inherit; } h2 tt, h2 code { font-size: inherit; } h3 tt, h3 code { font-size: inherit; } h4 tt, h4 code { font-size: inherit; } h5 tt, h5 code { font-size: inherit; } h6 tt, h6 code { font-size: inherit; } h1 { font-size: 2.25em; line-height: 1.2; border-bottom: 1px solid #eee; } h2 { font-size: 1.75em; line-height: 1.225; border-bottom: 1px solid #eee; } /*@media print { .typora-export h1, .typora-export h2 { border-bottom: none; padding-bottom: initial; } .typora-export h1::after, .typora-export h2::after { content: ""; display: block; height: 100px; margin-top: -96px; border-top: 1px solid #eee; } }*/ h3 { font-size: 1.5em; line-height: 1.43; } h4 { font-size: 1.25em; } h5 { font-size: 1em; } h6 { font-size: 1em; color: #777; } p, blockquote, ul, ol, dl, table{ margin: 0.8em 0; } li>ol, li>ul { margin: 0 0; } hr { height: 2px; padding: 0; margin: 16px 0; background-color: #e7e7e7; border: 0 none; overflow: hidden; box-sizing: content-box; } li p.first { display: inline-block; } ul, ol { padding-left: 30px; } ul:first-child, ol:first-child { margin-top: 0; } ul:last-child, ol:last-child { margin-bottom: 0; } blockquote { border-left: 4px solid #dfe2e5; padding: 0 15px; color: #777777; } blockquote blockquote { padding-right: 0; } table { padding: 0; word-break: initial; } table tr { border: 1px solid #dfe2e5; margin: 0; padding: 0; } table tr:nth-child(2n), thead { background-color: #f8f8f8; } table th { font-weight: bold; border: 1px solid #dfe2e5; border-bottom: 0; margin: 0; padding: 6px 13px; } table td { border: 1px solid #dfe2e5; margin: 0; padding: 6px 13px; } table th:first-child, table td:first-child { margin-top: 0; } table th:last-child, table td:last-child { margin-bottom: 0; } .CodeMirror-lines { padding-left: 4px; } .code-tooltip { box-shadow: 0 1px 1px 0 rgba(0,28,36,.3); border-top: 1px solid #eef2f2; } .md-fences, code, tt { border: 1px solid #e7eaed; background-color: #f8f8f8; border-radius: 3px; padding: 0; padding: 2px 4px 0px 4px; font-size: 0.9em; } code { background-color: #f3f4f4; padding: 0 2px 0 2px; } .md-fences { margin-bottom: 15px; margin-top: 15px; padding-top: 8px; padding-bottom: 6px; } .md-task-list-item > input { margin-left: -1.3em; } @media print { html { font-size: 13px; } table, pre { page-break-inside: avoid; } pre { word-wrap: break-word; } } .md-fences { background-color: #f8f8f8; } #write pre.md-meta-block { padding: 1rem; font-size: 85%; line-height: 1.45; background-color: #f7f7f7; border: 0; border-radius: 3px; color: #777777; margin-top: 0 !important; } .mathjax-block>.code-tooltip { bottom: .375rem; } .md-mathjax-midline { background: #fafafa; } #write>h3.md-focus:before{ left: -1.5625rem; top: .375rem; } #write>h4.md-focus:before{ left: -1.5625rem; top: .285714286rem; } #write>h5.md-focus:before{ left: -1.5625rem; top: .285714286rem; } #write>h6.md-focus:before{ left: -1.5625rem; top: .285714286rem; } .md-image>.md-meta { /*border: 1px solid #ddd;*/ border-radius: 3px; padding: 2px 0px 0px 4px; font-size: 0.9em; color: inherit; } .md-tag { color: #a7a7a7; opacity: 1; } .md-toc { margin-top:20px; padding-bottom:20px; } .sidebar-tabs { border-bottom: none; } #typora-quick-open { border: 1px solid #ddd; background-color: #f8f8f8; } #typora-quick-open-item { background-color: #FAFAFA; border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee; border-style: solid; border-width: 1px; } /** focus mode */ .on-focus-mode blockquote { border-left-color: rgba(85, 85, 85, 0.12); } header, .context-menu, .megamenu-content, footer{ font-family: "Segoe UI", "Arial", sans-serif; } .file-node-content:hover .file-node-icon, .file-node-content:hover .file-node-open-state{ visibility: visible; } .mac-seamless-mode #typora-sidebar { background-color: #fafafa; background-color: var(--side-bar-bg-color); } .md-lang { color: #b4654d; } /*.html-for-mac { --item-hover-bg-color: #E6F0FE; }*/ #md-notification .btn { border: 0; } .dropdown-menu .divider { border-color: #e5e5e5; opacity: 0.4; } .ty-preferences .window-content { background-color: #fafafa; } .ty-preferences .nav-group-item.active { color: white; background: #999; } .menu-item-container a.menu-style-btn { background-color: #f5f8fa; background-image: linear-gradient( 180deg , hsla(0, 0%, 100%, 0.8), hsla(0, 0%, 100%, 0)); } :root {--mermaid-font-zoom:1em ;} @media print { @page {margin: 0 0 0 0;} body.typora-export {padding-left: 0; padding-right: 0;} #write {padding:0;}} 目录技术概要:数据弹性和镜像数据弹性(Data Resiliency):InterSystems IRIS 提供什么数据弹性(Data Resiliency):InterSystems IRIS 如何提供写入映像日志(Write Image Journaling):防止物理数据损坏和丢失 日志(Journaling):防止逻辑数据损坏和丢失 镜像(Mirroring):高可用性和灾备解决方案 镜像虚拟化平台使用InterSystems IRIS镜像一个数据库:试一试了解有关 InterSystems 数据弹性的更多信息技术概要:数据弹性和镜像本技术概要(First Look)将向您介绍InterSystems IRIS®数据平台的数据弹性(data resiliency)功能。数据弹性包括三个目标------崩溃恢复、高可用性和灾备------这些都是通过 InterSystems IRIS 的几个功能实现的。InterSystems IRIS 的主要功能之一是能够利用逻辑数据复制提供对数据的连续和不间断访问。数据可以同步复制,以允许在各种故障情况下自动故障转移而不会丢失数据,无论是计划内的(例如软件升级)还是计划外的(例如硬件故障)。同步复制数据需要两个节点之间低延迟,因此并不总是适用于跨国家传输数据的灾备(DR)场景。对于这些场景,InterSystems IRIS 提供了内置的异步数据复制。InterSystems IRIS 的镜像功能提供了高可用性。在了解了 InterSystems IRIS 数据弹性后,您将创建一个镜像(mirror),在主成员上进行数据更改,并自动同步复制到备份成员上,然后关闭主成员,使镜像故障转移到备份上。这些活动只使用默认设置,因此您可以熟悉这些功能的基本原理。有关完整的文档,请参见 InterSystems IRIS Data Integrity Guide(《InterSystems IRIS 数据完整性指南》)。[]{#1_Data_Resiliency:_What_InterSystems_IRI .anchor}要浏览所有的技术概要(First Looks),包括那些可以在免费的云实例或 web 实例上执行的技术概要(First Looks),请参见InterSystems 技术概要。数据弹性(Data Resiliency):InterSystems IRIS 提供什么数据弹性涵盖多个主题,但它们都围绕着一个原则:一旦数据被记录在数据平台上,无论发生什么,它都是可以访问的。为了实现这一目标,有几个不同的地方需要解决:即使在发生错误或电源故障的情况下,也能保证数据的有效性从 InterSystems IRIS 服务器的本地故障中进行崩溃恢复,无论是物理故障还是软件相关的故障。防止全站点灾难(断电、网络问题等。)为了满足这些要求,InterSystems IRIS 提供了:结构化数据库完整性(磁盘上数据库块的内容)和防止内部完整性故障(数据库中表示的数据)通过事务处理、锁定和自动回滚实现逻辑数据库完整性内置的高可用性解决方案,具有自动故障转移功能逻辑数据复制,最大限度地降低了结转物理损坏的风险,并且不依赖共享资源计划内和计划外停机的解决方案通过地理上分散的灾难恢复配置带来业务连续性优势InterSystems IRIS 数据弹性全天候保护您生产系统上的数据。数据弹性:InterSystems IRIS 如何提供数据弹性(Data Resiliency):InterSystems IRIS 如何提供系统停机的成本从数千美元到数百万美元不等,具体取决于停机的类型和时间长度以及受影响的系统类型。从停机中快速恢复固然很重要,但恢复数据并确保您的数据不会丢失和损坏的能力也很重要。InterSystems IRIS 写入映像日志技术(write image journaling technology)提供结构化数据库的完整性(磁盘上数据库块的内容),并防止由于系统崩溃而导致的内部完整性故障(数据库中表示的数据)。InterSystems IRIS 备份和日志系统提供物理完整性故障的快速恢复。数据弹性通过事务处理[]{#2.1_Write_Image_Journaling:_Protection_A .anchor}、锁定和自动回滚确保逻辑数据库完整性。除了日志提供的功能外,InterSystems IRIS 还允许您对数据库进行镜像,以提供快速、高效的数据复制和灾难恢复。写入映像日志(Write Image Journaling):防止物理数据损坏和丢失 任何突然的、意外的磁盘或计算机操作中断都可能在第一个数据块(block)被写入后但在最后一个数据块(block)被更新前停止对多个数据库块的更新。其后果可能与数据库完全不可用一样严重,所有数据都无法通过正常方式恢复。 InterSystems IRIS 写入映像日记技术(Write image journaling,WIJ)可以防止这种数据损坏。它可以防止不完整的更新导致不一致的数据库结构。写入映像日志(WIJ)通过使用两阶段(two-phase)方法来保护数据库更新。InterSystems IRIS 实例首先将更新从内存写入过渡日志,即 IRIS.WIJ 文件,然后再写入数据库。如果系统在第一阶段崩溃,则删除更新而不对数据库进行任何更改;如果崩溃发生在第二阶段,您可以在恢复时重新应用写入映像日志(WIJ)的更新,确保对数据库进行所有更新。写入守护进程(The write daemon)在 InterSystems IRIS 启动时创建写入映像日志(WIJ)文件,并在将数据库更新写入 InterSystems IRIS 数据库之前记录 WIJ 中的数据库更新。一旦它输入对 WIJ 的所有更新,它就在文件中设置一个标志,第二阶段开始,写入守护进程将 WIJ 中记录的同一组块写入磁盘上的数据库中。当第二阶段完成时,写入守护进程在 WIJ 中设置一个标志,表示它已被删除。当 InterSystems IRIS 启动时,它会自动检查 WIJ,并在检测到发生异常关机时运行恢复程序。当该程序成功完成时,将恢复数据库的内部完整性。InterSystems IRIS 还在关机后运行 WIJ 恢复作为安全预防措施,以确保数据可以安全备份。根据 WIJ 在两阶段(two-phase)写入协议进程中的位置,恢复执行以下操作:如果崩溃发生在对 WIJ 的最后一次更新完成之后,但在对数据库的相应更新完成之前,那么 WIJ 将被恢复。如果崩溃发生在最后一次 WIJ 更新被持久地写入数据库之后,则会在最近的 WIJ 更新和受影响的数据库之间进行块比较。日志(Journaling):防止逻辑数据损坏和丢失 日志(Journaling)是一个可以在每个数据库基础上启用的功能,它提供所有数据库修改的完整记录。在发生崩溃的情况下,可以在恢复备份之后,从日志中重新应用自最近备份以来所做的更新,以使数据库恢复到发生崩溃的点。InterSystems IRIS 恢复过程通过使用"前滚"的方法提供最大程度的保护。如果发生系统崩溃,恢复机制将完成正在进行的更新。它还保护了更新的顺序;如果恢复后数据库中存在一个更新,那么之前的所有更新也都存在。这可以保护数据弹性:InterSystems IRIS 如何提供增量备份文件结构以及数据库。您可以在崩溃恢复后运行有效的增量备份。日志是数据弹性的第三个功能:镜像的基础。镜像(Mirroring):高可用性和灾备解决方案 InterSystems IRIS 镜像(Mirroring)属于系统可用性策略中的自动故障转移类别。镜像为数据库的可用性提供了全面、可靠和强健的企业解决方案。依赖共享资源(如共享磁盘)的传统可用性解决方案往往容易受到与该共享资源有关的单点故障的影响。镜像通过在主镜像成员和备份镜像成员上维护独立的资源来降低这种风险。此外,通过使用逻辑数据复制,镜像避免了与物理复制技术(如基于 SAN 的复制)相关的风险,包括无序更新和结转损坏。InterSystems IRIS 为高可用性镜像提供了两个选项:镜像(Mirroring)和虚拟化(Virtualization)。镜像具有自动故障转移功能的 InterSystems IRIS 镜像依赖于完全独立系统之间的逻辑数据复制。这避免了在为多个系统使用共享存储时出现单点故障的风险。它还确保在所有故障场景(系统、存储和网络)中,生产系统可以立即将故障转移到备用 InterSystems IRIS 实例。在 InterSystems IRIS 镜像中,一个被称为主故障转移成员的 InterSystems IRIS 实例,提供对生产数据库的访问。另一台主机上的另一个实例(称之为备份故障转移成员),与主服务器同步通信,检索主服务器的日志记录,确认收到日志记录,并将它们应用到同一数据库的自己的副本上。通过这种方式,主服务器和备份服务器总是知道备份服务器是否拥有来自主服务器的最新日志文件,因此可以精确地将其数据库与主服务器上的数据库进行同步。InterSystems IRIS 镜像的另一大功能是允许配置一个特殊的异步成员,它可以从整个企业的多个镜像中接收更新。您可以为单个镜像的灾备配置一个异步成员,这允许它在需要时无缝地替代一个故障转移成员的位置。一个镜像最多可以包括 16 个成员,这使您可以配置多个地理上分散的 灾备(DR) 异步成员。这种模式为分布式数据复制提供了一个强健的框架,从而确保业务连续性有利于组织。另一个好处是,使用异步成员的镜像允许单个系统充当全面的企业数据仓库。这为您提供了企业范围内的数据挖掘和业务智能。虚拟化平台虚拟化平台通常提供 高可用(HA) 功能,这些功能通常监视客户操作系统和运行它的硬件的状态。在虚拟化环境中使用镜像,构成镜像的 InterSystems IRIS 实例安装在虚拟主机上,创造了一个混合的高可用性解决方案,结合了镜像和虚拟化的优势。虽然镜像通过自动故障转移对计划内或计划外的故障提供即时响应,但虚拟化 HA 软件在计划外的机器或 OS 故障后自动重新启动托管镜像成员的虚拟机。这允许失败的成员快速重新加入镜像,以充当备份(或在必要时作为主要成员接管)。在任何一个发生故障时,虚拟化平台都会根据需要在备用硬件上自动重新启动故障的虚拟机。当 InterSystems IRIS 实例重新启动时,它会自动执行正常的启动恢复,保持结构和逻辑完整性,就像您在物理服务器上重新启动 InterSystems IRIS 一样。使用InterSystems IRIS镜像一个数据库:试一试现在您已经对 InterSystems IRIS 数据弹性及其提供的功能有了一些背景知识,让我们通过镜像来了解其中的一部分。使用 InterSystems IRIS 设置镜像环境很容易。您可以使用自动提供、部署和配置镜像的 InterSystems 云管理器(InterSystems Cloud Manager,ICM),也可以使用管理门户(Management Portal)进行手动配置。本文档介绍如何使用 ICM 部署镜像。(关于使用管理门户[Management Portal]使用两个已安装的 InterSystems IRIS 实例创建镜像的步骤,请参见 High Availability Guide[《高可用性指南》]的 "Mirroring[镜像]"一章中的 Creating a Mirror[创建镜像])。在这种情况下,您将在亚马逊网络服务(Amazon Web Services)公共云中部署一对镜像的 InterSystems IRIS 实例。要做到这一点,请按照《技术概要:InterSystems 云管理器》中 Try It! Deploy InterSystems IRIS in the Cloud with ICM(试一试!使用 ICM 在云中部署 InterSystems IRIS)的 Customize the Sample Configuration Files(自定义示例配置文件)一节中的步骤,进行以下修改:在 defaults.json 文件中,添加"Mirror": "True"。自定义 definitions.json 文件,添加一个 AR 节点定义,指定 arbiter 映像。[ { "Role": "DATA", "Count": "2", "LicenseKey": "ubuntu-sharding-iris.key" }, { "Role": "AR", "Count": "1", "StartCount": "3", "DockerImage": "intersystems/arbiter:stable" }]DockerImage 属性必须是 AR 节点定义的一部分,因为 AR 节点使用不同于 InterSystems IRIS 节点(如 DATA)的 InterSystems 映像(image)。您必须确保 arbiter 映像(image)在本地可用;有关此操作的信息,请参见《技术概要:InterSystems 云管理器》中的 Identify Docker Repository and Credentials(识别 Docker 存储库和凭证)。一旦您定制了配置文件,包括这些变化,就继续执行程序。当您完成了"部署 InterSystems IRIS"步骤(icm run 命令),并且镜像已经部署在云中,继续使用 ICM 命令行来尝试镜像:在主故障转移成员上设置 global,并验证它在备份故障转移成员上也被设置了。触发计划的从主服务器到备份服务器的故障转移。要做到这一点,请使用以下程序:在 ICM 命令行上,通过输入 icm inventory 命令,查看您的镜像成员的名称和镜像角色,其中列出了您已经配置的云主机节点。ICM 提供的节点被命名为 Label-Role-Tag-NNNN;其中 Role 是 ICM 节点类型,在本例中是 DATA,其他部分由您赋值。镜像成员用 +(加号)表示初始主节点,用 -(减号)表示初始备份。本程序其余部分的示例假设您把 label 字段设置为 Acme,把 tag 字段设置为 TEST,从而产生如下所示的 icm inventory 输出:$ icm inventoryMachine IP Address DNS Name Region ZoneAcme-DATA-TEST-0001+ 00.53.183.209 ec2-00-53-183-209.us-west-1.compute.amazonaws.com us-west-1 cAcme-DATA-TEST-0002- 00.53.183.185 ec2-00-53-183-185.us-west-1.compute.amazonaws.com us-west-1 c使用InterSystems IRIS镜像一个数据库:试一试注意: 节点编号和镜像角色之间没有关系。 + 和 - 符号仅表示初始镜像赋值;对于实时镜像状态,请使用 icm ps 命令。通过输入命令在主镜像成员上打开 InterSystems 终端(Terminal):$ icm session -interactive -machine Acme-DATA-TEST-0001当终端(Terminal)窗口打开时,您就处于 DB 命名空间,它被映射到镜像数据库 DB;ICM 默认创建了这两个数据库。输入以下命令在 DB 数据库中创建 global(globals 在 InterSystems IRIS 数据库中存储数据):DB> Set \^myfirstglobal="congratulations"输入以下命令来显示 global 的值:DB> Write \^myfirstglobal congratulations使用以下命令为备份故障转移成员打开终端(Terminal)窗口:$ icm session -interactive -machine Acme-DATA-TEST-0002输入相同的 Write 命令;global 已经存在,并且其值是您在主服务器上设置的。数据被自动同步地镜像到备份中的 DB 数据库。DB> Write \^myfirstglobal congratulations备份中的镜像数据库是只读的;如果您试图改变 global 的值,您会得到一个错误。DB> Set \^myfirstglobal="what next?"<PROTECT>返回到 ICM 命令行,使用以下命令关闭并重新启动其容器内的主要 InterSystems IRIS 实例(ICM 默认将其命名为 IRIS):$ icm exec -command "iris stop IRIS quietly restart" -machine Acme-DATA-TEST-0001注意: -quietly 参数防止 iris stop 命令提示发行者,这将导致 ICM 等待直到超时。另外,您可以交互式地执行命令,如下所示,从而允许您响应提示:$ icm exec -command "iris stop IRIS restart" -interactive -machine Acme-DATA-TEST-0001等待几秒钟,然后返回 Acme-DATA-TEST-0002 上的终端(Terminal)窗口。当主服务器由于计划或计划外的故障而不可用时,镜像将自动故障转移到备份服务器,备份服务器将成为新的主服务器。因此,Acme-DATA-TEST-0002 已经成为主服务器,您现在可以更改 global 的值了。DB> Set \^myfirstglobal="what next?"DB> Write \^myfirstglobal what next?使用 icm ps 命令显示新的镜像角色:$ icm ps了解有关 InterSystems 数据弹性的更多信息为以前的主服务器 Acme-DATA-TEST-0001 打开一个新的终端(Terminal)窗口,重新启动时发现 Acme-DATA-TEST-0002 现在是主服务器,因此成为新的备份。因此,global 的值已经被更新为您在新的主节点上设置的值,您无法更改它。$ icm session -interactive -machine Acme-DATA-TEST-0001 DB> Write \^myfirstglobalwhat next?DB> Set \^myfirstglobal="another First Look!"<PROTECT>备份镜像成员随时准备接管主成员,以保持数据库可用,并保护您的数据不被损坏和丢失。当您完成镜像体验后,请务必返回《技术概要:InterSystems 云管理器》中的 Unprovision the Infrastructure(取消配置基础设施),并根据取消配置您的云节点的程序进行操作。因为 AWS 和其他公共云[]{#4_Learn_More_About_InterSystems_Data_Res .anchor}平台实例会不断产生费用,所以在使用完基础设施后立即取消配置是很重要的。了解有关 InterSystems 数据弹性的更多信息要了解有关 InterSystems IRIS 数据弹性和 ICM 的更多信息,请参见进一步阅读:High Availability Guide(《高可用性指南》)Data Integrity Guide(《数据完整性指南》)InterSystems Cloud Manager Guide(《InterSystems 云管理器指南》)What is InterSystems Cloud Manager?(《什么是 InterSystems 云管理器?》)(视频)The ICM Experience:Pat and Tracy (《ICM 体验:Pat 和 Tracy》) (视频)InterSystems in the Cloud Experience(《云体验中的 InterSystems》) (在线体验)
问题
洪玉 刘 · 二月 8, 2023

license

license和 cpf 文件的使用机制 这个问题有点大,建议先看我们的官方文档后: 有具体问题再继续讨论。 https://docs.intersystems.com/results.html?docs%5Bquery%5D=license, https://docs.intersystems.com/irislatest/csp/docbook/Doc.Results.cls?docs%5Bquery%5D=CPF&docs%5BrefinementList%5D%5Bproduct%5D%5B0%5D=InterSystems%20IRIS&docs%5BrefinementList%5D%5Bversion%5D%5B0%5D=2022.3
文章
Kelly Huang · 三月 28, 2023

安装本地 FHIR 服务器的最快最简单的方法!

嗨大家好! 最近我需要使用 IRIS For Health 设置本地 FHIR 服务器,我认为我找到了有史以来最简单的方法! 只需在终端中运行以下两行: docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/irishealth-community 和 docker exec -it my-iris iris session iris -U "USER" '##class(%ZPM.PackageManager).Shell("install fhir-server")' 您将在 http://localhost:9092/fhir/r4 本地运行 FHIR 服务器。 就是这么简单! FHIR 服务器将使用最新版本的 InterSystems IRIS for Health Community Edition,并将通过 FHIRSERVER 命名空间中的 IPM 包从该应用程序部署 FHIR 服务器。 这是针对 Mac OS的,所以请在评论中添加它在 Windows 中的工作方式。 这是一篇非常短的文章,因为使用 InterSystems IRIS for Health 和IPM Package Manager 设置本地 FHIR 服务器真的很容易。 原文来自于 @ Evgeny Shvarov
公告
Michael Lei · 三月 22, 2023

Caelestinus 2023 孵化器活动正式启动!

大家好! 第二次数字健康互操作与FHIR创业孵化器——Caelestinus,今日启动! 今天,21 支选定的队伍将在 Caelestinus 开始为期八个月的旅程。在孵化期间,团队将数字健康互操作性引入到他们的互联医疗服务或医疗设备创新中,并添加对 FHIR、HL7、DICOM、CDA、X12 和其他数字健康标准的支持,并使用InterSystems IRIS for Health和FHIR Server进行转型在经验丰富的 InterSystems 团队的帮助下。 我很高兴邀请大家观看 Caelestinus 2023 启动活动直播,您可以在其中了解哪些团队被选中以及他们的创新想法。 请从欧洲中部时间下午 3 点开始通过www.caelestinus.tech观看流媒体。 很高兴在在线上与您相见。 祝 Caelestini 初创公司好运!
文章
Michael Lei · 八月 9, 2022

如何以编程/自动化方式为InterSystems IRIS创建新的数据库、命名空间和Web应用程序

下面是一个ObjectScript片段,它允许为InterSystems IRIS创建数据库、命名空间和Web应用程序: ``` set currentNS = $namespace zn "%SYS" write "Create DB ...",! set dbName="testDB" set dbProperties("Directory") = "/InterSystems/IRIS/mgr/testDB" set status=##Class(Config.Databases).Create(dbName,.dbProperties) write:'status $system.Status.DisplayError(status) write "DB """_dbName_""" was created!",!! write "Create namespace ...",! set nsName="testNS" //DB for globals set nsProperties("Globals") = dbName //DB for routines set nsProperties("Routines") = dbName set status=##Class(Config.Namespaces).Create(nsName,.nsProperties) write:'status $system.Status.DisplayError(status) write "Namespace """_nsName_""" was created!",!! write "Create web application ...",! set webName = "/csp/testApplication" set webProperties("NameSpace") = nsName set webProperties("Enabled") = $$$YES set webProperties("IsNameSpaceDefault") = $$$YES set webProperties("CSPZENEnabled") = $$$YES set webProperties("DeepSeeEnabled") = $$$YES set webProperties("AutheEnabled") = $$$AutheCache set status = ##class(Security.Applications).Create(webName, .webProperties) write:'status $system.Status.DisplayError(status) write "Web application """webName""" was created!",! zn currentNS ``` 还有以下其他文档手册: - [创建数据库](https://irisdocs.intersystems.com/iris20181/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=Config.Databases) - [命名空间](https://irisdocs.intersystems.com/iris20181/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=Config.Namespaces) - [CSP 应用](https://irisdocs.intersystems.com/iris20181/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=Security.Applications)
文章
TZ Zhuang · 六月 22, 2021

FAQ 常见问题系列--系统管理篇 每个InterSystems IRIS实例可以创建多少个数据库和命名空间

一个实例中可创建的最大命名空间数量为2048个。这个上限不可修改。 一个实例中可创建的最大数据库数量(包括远程数据库)为15998个。这个上限也不可修改。 一个实例中可创建数据库的总数量还有其他因素制约: 1. 数据库路径信息总量最大为256KB,也就是所有数据库的路径字符加起来不能多于256KB。设置的路径越长,可创建的数据库数量越少。计算公式:最大数据库数量=258048/(平均数据库路径长度+3) 2. 镜像的数据库一个按两个算。也就是创建一个镜像的数据库,相当于创建了2个非镜像数据库。 更多细节请参考在线文档:https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=GSA_config
文章
Claire Zheng · 三月 14, 2023

【视频】互联互通套件赋能数据利用与应用创新

数字化转型已经颠覆了很多行业,相信医疗卫生信息行业也不会例外。我们希望通过InterSystems IRIS医疗版互联互通套件,以互联互通为基础,让医院信息平台成为医疗卫生行业数字化转型的智能核心。