---
title: "\u30D0\u30C3\u30C1\u30D5\u30A1\u30A4\u30EB\u306E\u30B5\u30F3\u30D7\u30EB"
description: "Invantive Data Hub\u306F\u901A\u5E38\u3001\u4EE5\u4E0B\u306E\u3088\u3046\u306A\u30D0\u30C3\u30C1\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u8D77\u52D5\u3057\u307E\u3059\u3002"
language: ja
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/ja/docs/invantive-data-hub/sample-batch-file
original: https://documentation.invantive.eu/en/docs/invantive-data-hub/sample-batch-file
updated: 2026-12-04T01:05:40Z
license: https://documentation.invantive.eu/ja/
---

Invantive Data Hubは通常、以下のようなバッチファイルから起動します。 手作業でバッチファイルを作成することもできますが、Invantive Query Toolを使うと、[[Batch File]]で説明するとおり、そのようなバッチファイルをより簡単に作成できます。

```bat
@echo off
rem
rem Batch script to run an Invantive SQL file with possible Invantive Script statements.
rem
rem Please note that the encrypted password is bound to the PC used to generate this file.
rem When you want to run this batch file on another PC, please generate a new encrypted password at that PC.
rem
rem In Invantive Query Tool and Data Hub you can use the 'local encrypt password' statement to generate.
rem a new encrypted password.
rem
rem As an alternative you can use cloud.invantive.eu to generate a pre-authenticated connection.
rem
rem Find more information on documentation.invantive.eu.
rem
rem Created by Invantive Query Tool on 03/10/2026 16:16:42 (UTC).
rem

set INVANTIVE_USR=<<USERNAME>>

set INVANTIVE_ENCRYPTED_PWD=<<ENCRYPTED_PWD>>

set INVANTIVE_DB=<<GROUP>>\<<NAME>>

set INVANTIVE_SQL_FILE=C:\temp\file.sql

set INVANTIVE_LOG_FILE=file-%%Y%%m.log

set INVANTIVE_LOG_FILE_OVERWRITE=False

set INVANTIVE_INTERACTIVE=False

set INVANTIVE_PRG=C:\Program Files (x86)\Invantive Software BV\Invantive Data Hub 26.0\Invantive.Producer.Data.Hub.exe

"%INVANTIVE_PRG%" /verbose /database:"%INVANTIVE_DB%" /user:"%INVANTIVE_USR%" /encryptedpassword:"%INVANTIVE_ENCRYPTED_PWD%" /file:"%INVANTIVE_SQL_FILE%" /logfile:"%INVANTIVE_LOG_FILE%" /logoverwrite:"%INVANTIVE_LOG_FILE_OVERWRITE%" /interactive:%INVANTIVE_INTERACTIVE%

IF %ERRORLEVEL% NEQ 0 (
  echo Job failed with exit code %ERRORLEVEL%.
  exit /b %ERRORLEVEL%
)

echo Completed job with exit code %ERRORLEVEL%.
```

バッチファイルはInvantive Data Hubの終了コードで終わるため、スケジューラーは実行が成功したかどうかを確認できます。[[Exit Code]]を参照してください。 ログファイル名にはUTCの年と月(`%Y%m`)が含まれるため、月ごとに個別のログファイルが作成されます。

`INVANTIVE_PRG`は、インストールされたリリースのフォルダーを示します。 リリース27.0までを含むリリースでは、Invantive Data Hubは例のとおり`C:\Program Files (x86)\Invantive Software BV`の下にインストールされます。リリース27.1からは`C:\Program Files\Invantive Software BV`の下にインストールされます。例えば`C:\Program Files\Invantive Software BV\Invantive Data Hub 27.1\Invantive.Producer.Data.Hub.exe`のようになります。 したがって、バッチファイルはいずれにせよリリースに応じて変わります。



## リリース情報

- [Invantive Data Hub](/ja/release-notes/products/invantive-data-hub)
  - [26.0 ～ 27.0](/ja/release-notes/products/invantive-data-hub?step=26.0-to-27.0)
  - [25.0 ～ 26.0](/ja/release-notes/products/invantive-data-hub?step=25.0-to-26.0)
