Pesquisar

Question
· Juil 10, 2024

Capturing the SQL command sent to Cache for an external system

Is there a way to capture the SQL command that was sent to Cache ? I need to know how to do this. Any help would be appreciated. It is from an external application using JDBC or OBDC. Thanks

4 Comments
Discussion (4)2
Connectez-vous ou inscrivez-vous pour continuer
Résumé
· Juil 10, 2024

InterSystems Community Q&A Monthly Newsletter #38

Top new questions
Can you answer these questions?
#InterSystems IRIS
Keyboard Mapping in iris session when using Windows ssh.exe
By Jeffrey Drumm
Migrating source control projects from Subversion to Github with IRIS
By Kevin Kindschuh
How to "real" training a machine learning model
By Kurro Lopez
Component registration
By ala zaalouni
Global Mirroring
By Meenakshi Muthu
Increase performance of production
By Meenakshi Muthu
Deferred lock
By Meenakshi Muthu
Error: Invalid Community Edition license, may have exceeded core limit. - Shutting down the system : $zu(56,2)= 0
By Moussa SAMB
Polybase and IRIS
By Adam Doherty
Why does the Rule Editor display a sad face?
By Joshua Wigley
Which are the best practises to handle large JSON?
By Pietro Di Leo
%DynamicObject (JSON) Response into Class Structure
By Scott Roth
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "IRIS"
By Saghir Hussain
Error importing globals from Caché to Iris
By Josep Balagué
Global can be shared by all namespace
By Meenakshi Muthu
How to read from a file
By Smythe Smythee
%session & passing credentials between ZenPages that reside on different healthshare servers
By Carl Maklad
How to call another method in a generated method
By Shuheng Liu
How to send WRITE formatted output to a variable
By Lynn Lantz
CREATE TABLE AS SELECT fails when one specific field is present
By Stefan Schick
How to convert an embeddings vector to be saved as %Vector
By Ditmar Tybussek
Problem with handling Nacks/Errors on IRIS
By Ali Chaib
How can i see the request size in kilobytes/megabytes?
By omer
Migration from Intersystems IRIS to Oracle DB
By Meenakshi Muthu
OnInit() Question - Ens.BusinessOperation (HTTP.OutboundAdapter)
By Scott Roth
#InterSystems IRIS for Health
Best Practice Question - Connecting to REST API's outside of the network
By Scott Roth
JWT enabled FHIR Server web app access
By Ashok Kumar
VS Code client-side editing and class/package changes
By Robert Barbiaux
How to pass the cloned-object from one rule to another, and send the modified object to target Process or Operation in Rule Editor?
By William Liu
Has anyone worked with in Fhir R4 Binary deserialization (From Athena)?
By Victor Castanon
Testing XML input to Router Management Portal or via XML document viewer
By Thomas Haig
Handling non-8-bit characters in HTTP headers.
By Otto Medin
Why do I have running jobs with no Process ID?
By Chris Pursey
Interpreting Application Error Log
By Kim Trieu
Create a unique constraint on an existing table
By Michael Wood
SQL DatePart Not Working With ISO 8601 Formatted Date & Time
By Carl (booz Allen) Deitrich
Looking for examples of creating a JSON web service as "business service" and converting the JSON data received to a HL-7 message in a Transformation.
By Will
Recommended way to read ???? ?? ??? files
By Yone Moreno Jimenez
How to remove line feed and carriage return from start and end, but not from the middle of a string
By Yone Moreno Jimenez
How to apply huge amount of Biz Rules on a cloned object by using Rule Editor?
By William Liu
#InterSystems IRIS BI (DeepSee)
#Ensemble
#HealthShare
#TrakCare
#VSCode
#38Monthly Q&A fromInterSystems Developers
Question
· Juil 10, 2024

Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "IRIS"

Hi

I get the following error when I am trying to create a linked server connection via MS OLE DB Provider for ODBC Drivers in MS SQL Server Management Studio. The message I get is:

The OLE DB provider "MSDASQL" for linked server "IRIS" reported an error. The provider did not give any information about the error.
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "IRIS". (Framework Microsoft SqlClient Data Provider)

I have setup the InterSystems ODBC setting on the server. Have enabled a number SPN settings but still getting this error

The full error message is :

 

===================================

The linked server has been created but failed a connection test. Do you want to keep the linked server?

===================================

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------
Program Location:

   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType, Boolean retry)
   at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(String cmd, Boolean retry)
   at Microsoft.SqlServer.Management.Smo.LinkedServer.TestConnection()
   at Microsoft.SqlServer.Management.SqlManagerUI.LinkedServerProperties.DoPreProcessExecution(RunType runType, ExecutionMode& executionResult)

===================================

The OLE DB provider "MSDASQL" for linked server "IRIS" reported an error. The provider did not give any information about the error.
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "IRIS". (Framework Microsoft SqlClient Data Provider)

------------------------------
For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqls...

------------------------------
Server Name: ........\..........
Error Number: 7399
Severity: 16
State: 1
Procedure: sp_testlinkedserver
Line Number: 1

Any thoughts?

2 Comments
Discussion (2)1
Connectez-vous ou inscrivez-vous pour continuer
Question
· Juil 10, 2024

Component registration

When registering the components: I used this command:
"Utils.migrate("/external/src/CoreModel/Python/settings.py)" ;
The error appears: "An error has occurred: iris.cls: error finding class",
I changed with these two lines:
result = subprocess.run(["iop", "-m", "/external/src/CoreModel/Python/settings.py"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
subprocess.run(["iop", "-m", "/external/src/CoreModel/Python/settings.py"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)

 also there is an error:
"An error occurred: Command '['iop', '-m', '/external/src/CoreModel/Python/settings.py']' returned non-zero exit status 1."

Could you please help me?
 

2 Comments
Discussion (2)1
Connectez-vous ou inscrivez-vous pour continuer
Article
· Juil 10, 2024 5m de lecture

IRISでシャドウイングの代わりにミラーリングを構成する方法-プログラム編

これは InterSystems FAQ サイトの記事です。
 

こちらの記事では、「IRISでシャドウイングの代わりにミラーリングを構成する方法」を紹介しました。

今回は、「プログラムでシャドウイングの代わりにミラーリングを構成する方法(Windows版)」を紹介します。


【今回のサンプル・ミラー構成について】

  正サーバ(ミラー・プライマリ) 副サーバ(ミラー・非同期)
ミラー名 MIRRORSET MIRRORSET
ミラーメンバ名 MACHINEA MACHINEC
IPアドレス 35.77.84.159 54.248.39.237


では、ミラーの構成手順をご紹介します。手順は以下になります。
 

<ミラーリングのプライマリ設定>     // MACHINEA(正サーバ)

1. ISCAgentの自動起動設定および起動         ※Windowsコマンドプロンプトで実行

C:\Users\Administrator>sc config ISCAgent start=auto
C:\Users\Administrator>sc start ISCAgent

 

2. [システム管理] > [構成] > [ミラーサービスの有効化]     ※IRISターミナルで実行

zn "%SYS"
set status=##class(Security.Services).Get("%Service_Mirror", .svcProps)
set svcProps("Enabled") = 1
set status=##class(Security.Services).Modify("%Service_Mirror", .svcProps)

 

3. [システム管理] > [構成] > [ミラーの作成]     ※IRISターミナルで実行

zn "%SYS"
set MirrorSetName="MIRRORSET"
set SystemName = "MIRRORA"     // 任意で設定。設定しない場合、既定で$sysytem 変数の内容を利用(例:<デバイス名>/IRIS)
set MirrorInfo("UseSSL") = 0
set MirrorInfo("ECPAddress") = "xxx.xxx.xxx.xxx"      // this is the SuperServer Address, default value is result of $System.INetInfo.LocalHostName().
set sc = ##class(SYS.Mirror).CreateNewMirrorSet(MirrorSetName, SystemName, .MirrorInfo)
write $system.Mirror.GetMemberType()
// (出力) Failover
write $system.Mirror.GetStatus()
// (出力) PRIMARY、TRANSITIONの場合は少し待って再度実行

 

4. ローカルデータベースの作成(ミラー属性の追加)     ※IRISターミナルで実行

zn "%SYS"
/// ローカルデータベースの作成
Set Directory="c:\intersystems\iris\mgr\mirrordb\"
Set x=$ZF(-100, "/shell", "mkdir", Directory)
Set db=##Class(SYS.Database).%New()
Set db.Directory=Directory
Set status=db.%Save()
Set DBName="MIRRORDB"
Set status=##class(Config.Configuration).AddDatabase(DBName,Directory)
Set NSName=DBName
Set status=##class(Config.Configuration).AddNamespace(NSName,DBName)

/// ミラー属性の追加(プライマリフェイルオーバーメンバのみ)
set status=##class(SYS.Mirror).AddDatabase(Directory)
set db=##Class(SYS.Database).%OpenId(Directory)
write db.Mirrored
// (出力) 1           ; Mirror DB の場合1
kill

 

<ミラーリングのDR非同期設定>     // MACHINEC(副サーバ)

1. ISCAgentの自動起動設定および起動         ※Windowsコマンドプロンプトで実行

C:\Users\Administrator>sc config ISCAgent start=auto
C:\Users\Administrator>sc start ISCAgent


2. ミラーサービスの有効化
 *[システム管理] > [構成] > [ミラーサービスの有効化]     ※IRISターミナルで実行

zn "%SYS"
set status=##class(Security.Services).Get("%Service_Mirror", .svcProps)
set svcProps("Enabled") = 1
set status=##class(Security.Services).Modify("%Service_Mirror", .svcProps)


3. 非同期としてミラーに参加
 *[システム管理] > [構成] > [非同期として参加]     ※IRISターミナルで実行

zn "%SYS"
set MirrorSetName="MIRRORSET"
set InstanceName="IRIS"            // primary instanace name
set AgentAddress="xxx.xxx.xxx.xxx" // primary member DNS name or IPaddress
set AsyncMemberType=0              // DR:0, Reporting R only:1, Reporting R/W:2
set SystemName = "MIRRORC"         // 任意で設定。設定しない場合、既定で$sysytem 変数の内容を利用
set LocalInfo("ECPAddress") = "yyy.yyy.yyy.yyy" // this is the SuperServer Address, default value is result of $System.INetInfo.LocalHostName().
set status=##class(SYS.Mirror).JoinMirrorAsAsyncMember(MirrorSetName,SystemName  ,InstanceName,AgentAddress,,AsyncMemberType,.LocalInfo)
write $system.Mirror.GetMemberType()
// (出力) Disaster Recovery
write $system.Mirror.GetStatus()
// (出力) CONNECTED、TRANSITIONの場合は少し待って再度実行


4. ミラーデータベースの準備

非同期の副サーバ:MACHINEC に、正サーバ:MACHINEA のバックアップファイルをリストアします。

【補足】
データベースファイル(IRIS.DAT)のコピーによるバックアップの場合は(=正サーバで Backup.Generalクラスの ExternalFreeze()/ExternalThaw() を利用してバックアップを取っている場合)、非同期データベースをディスマンとした状態でデータベースファイル(IRIS.DAT)を置換します。

※ローカルデータベースの作成手順は、正サーバ:MACHINEAと同じです。
  (4の「ローカルデータベースの作成」、ミラー属性の追加 以外を行います)

※外部/オンラインバックアップ・リストアについては、以下の記事で詳細手順を説明していますので、参考になさってください。
外部バックアップについて
オンラインバックアップについて


5. ミラーモニターでのジャーナルの有効化、キャッチアップ     ※IRISターミナルで実行

zn "%SYS"
set Directory="c:\intersystems\iris\mgr\mirrordb\"
set status=##class(SYS.Mirror).ActivateMirroredDatabase(Directory)  // 有効化
set db=##class(SYS.Database).%OpenId(Directory)
set sfn= db.SFN  // sfn system file number データベーステーブル(内部情報)内の番号
kill db
set status=##class(SYS.Mirror).CatchupDB($lb(sfn))  // キャッチアップ
write status     // 1 でキャッチアップ成功。それ以外の場合は write $SYSTEM.Status.DisplayError(status) でエラーの内容を確認


6. 管理ポータルで、キャッチアップしたことを確認(こちらで構成は終了です)
 *[システムオペレーション] > [ミラーモニタ]

 
 

各種設定の詳細は以下のドキュメントをご覧ください。
Security.Services
SYS.Mirror
$SYSTEM.Mirror


enlightened【ご参考】
Cache Mirroring 101:簡単なガイドとよくある質問  
ミラーリングの機能について
ミラージャーナルファイルの削除のタイミングと要件
IRISでシャドウイングの代わりにミラーリングを構成する方法

Discussion (0)0
Connectez-vous ou inscrivez-vous pour continuer