Work with Data Stores from the Command Line

Using the Command Line to Work with Data Stores

About this task

You can create new data stores or delete existing ones from the command line. Before you can work with data stores from the command line, you must follow these steps.

Procedure

  1. Stop all Historian services.
  2. Open a command prompt, or shell, and switch to the directory where ihConfigManager.exe is located.
    By default, this folder is located in: C:\Program Files\Proficy\Historian\x64\Server.
  3. Run ihConfigureManager.exe with the options you choose.

Creating a Data Store

Procedure

To create a new data store, run the following:
ihConfigManager_x64.exe CreateDataStore DataStoreName [StoreType: Historical = 0, Scada = 1] 
[DefaultStore: NotADefault=0, Default = 1] ["OptionalDataStoreDescription"]
Where DataStoreName is the name of the data store you want to create.

Deleting a Data Store

Procedure

To delete an existing data store, run the following:
ihConfigManager_x64.exe DeleteDataStore MyStore [NoConfirm]
Where:
  • MyStore is the name of the data store you want to delete, and
  • NoConfirm allows you delete a data store without a validation message appearing.
    CAUTION: Exercise extreme care in using the NoConfirm option, as it will delete an entire data store without a prompt. This is sometimes helpful in scripting, but it is a dangerous option otherwise.

Examples

Example 1: Create a new historical data store, but do not change my default data store
C:\Program Files\Proficy\Historian\x64\Server\ihConfigManager_x64.exe CreateDataStore MyStore 0 0
Example 2: Create a new historical data store and make it a default data store
C:\Program Files\Proficy\Historian\x64\Server\ihConfigManager_x64.exe CreateDataStore MyStore 0 1 "This is my default historical store"
Example 3: Delete a data store, and display a validation message after it is removed
C:\Program Files\Proficy\Historian\x64\Server\ihConfigManager_x64.exe DeleteDataStore MyStore
Example 4: Delete a data store, but suppress any validation messages
C:\Program Files\Proficy\Historian\x64\Server\ihConfigManager_x64.exe DeleteDataStore MyStore NoConfirm