アウトライン変更をソース・サーバーの.CHGファイルから読み込み、ターゲット・サーバーの.CHGファイルに書き込みます。この関数は、EssPartitionApplyOtlChangeFileとともにバッチ処理で使用するか、またはEssPartitionReadOtlChangeFileとEssPartitionApplyOtlChangeRecsを組み合せて対話的に使用するように設計されています。
構文
ESS_FUNC_M EssPartitionGetOtlChanges (
hCtx, pQuery, pChangeFile
);
| パラメータ | データ型 | 説明 |
|---|---|---|
hCtx |
ESS_HCTX_T |
APIコンテキスト・ハンドル。 |
pQuery |
ESS_PARTOTL_QUERY_T |
変更クエリー条件。 |
pChangeFile |
ESS_PARTOTL_CHG_FILE_T |
呼出し元が割り当てた変更ファイル情報構造体。 |
備考
pChangeFile内の変更ファイル名文字列を解放するには、EssPartitionFreeOtlChangesを呼び出します。
戻り値
正常終了の場合は0が戻され、失敗した場合はエラー・コードが戻されます。
アクセス
この関数を呼び出すには、データベース・デザイナのアクセス権限が必要です。
例
ESS_FUNC_M Ess_PartitionGetOtlChanges(ESS_HCTX_T hCtx, ESS_HINST_T hInst)
{
ESS_FUNC_M sts;
ESS_STR_T hostname, appname, dbname;
ESS_USHORT_T usType, dataFlowDir;
ESS_ULONG_T uldimfilter=0,ulmbrfilter=0,ulmbrattrfilter=0;
ESS_PARTOTL_QUERY_T MetaQuery;
ESS_PARTOTL_CHG_FILE_T MetaChangeFile;
ESS_PPART_INFO_T partitionp = NULL;
memset(&MetaQuery, 0, sizeof(ESS_PARTOTL_QUERY_T));
hostname = "local";
appname = "app1";
dbname = "src1";
usType = ESS_PARTITION_OP_LINKED;
dataFlowDir = ESS_PARTITION_DATA_SOURCE;
uldimfilter = ESS_PARTITION_OTLDIM_ALL;
ulmbrfilter = ESS_PARTITION_OTLMBR_ALL;
ulmbrattrfilter = ESS_PARTITION_OTLMBRATTR_ALL;
MetaQuery.HostDatabase.pszHostName = hostname;
MetaQuery.HostDatabase.pszAppName = appname;
MetaQuery.HostDatabase.pszDbName = dbname;
MetaQuery.usOperationType = usType;
MetaQuery. usDataDirectionType = dataFlowDir;
MetaQuery.MetaFilter.TimeStamp = 0;
MetaQuery.MetaFilter.ulDimFilter = uldimfilter;
MetaQuery.MetaFilter.ulMbrFilter = ulmbrfilter;
MetaQuery.MetaFilter.ulMbrAttrFilter = ulmbrattrfilter;
sts = EssPartitionGetOtlChanges(hCtx, &MetaQuery, &MetaChangeFile);
printf("EssPartitionGetOtlChanges sts: %ld\n",sts);
if (!sts) {
printf("\tNumber of meta change file found: %d\n",MetaChangeFile.usFileNum);
printf("\tName of meta change file found: %s\n",MetaChangeFile.ppszFileName[0]); }
if(&MetaChangeFile) EssFree(hInst,&MetaChangeFile);
return(sts);
}
関連トピック