IMD SolutionComputing LibraryShop main store

Troubleshooting

Fixing a Historian vValue write permission error on string tags

Edge computing and IIoT Published 7 min read

Short answer

The OLE DB error 'The user did not have permission to write to the column vValue' has two causes, and only one is about permissions: the login writing the extension tables must hold aaAdministrator membership, and a string tag's history must be written through the string-history interface and its Value column, not vValue on History. Alarm and event history accepts SELECT only, so a reason stored there is not correctable in place at all.

On this page
  1. What does the vValue permission error actually mean?
  2. Which login is allowed to write to the extension tables?
  3. Can you update a string tag's stored history with T-SQL?
  4. Is the reason text stored as a string tag or as an alarm record?
  5. Why does the write fail on vValue but succeed on Value?
  6. How do you correct one sample without writing a second one?
  7. What if the reason text is an alarm and event history record?
  8. Questions asked

The provider message "The user did not have permission to write to the column 'vValue'" is two faults wearing one message, and only one of them is about permissions. The login running the statement does not hold the aaAdministrator membership that T-SQL INSERT and UPDATE against the Historian extension tables require. And if the statement addresses vValue on History for a string tag, it is aimed at the wrong interface even after the permissions pass: string-tag history is written through StringHistory and its Value column. Alarm and event history accepts SELECT only, so a reason stored there cannot be corrected in place at all. Fix identity first, then interface, then run the correction with a one-row count check on both sides.

What does the vValue permission error actually mean? #

It means the OLE DB provider refused the write for the connection's login, and it says nothing about whether the tag, the screen binding or the reason string is wrong — fix identity and interface before touching anything on the HMI.

The refusal happens below the screen: the application submits SQL over OLE DB, the provider authenticates a login, checks that login's rights against the extension-table rules, and stops at the first gate that fails. The message names the permission gate, which is why the interface problem behind it stays invisible until the permissions pass.

The extension tables — AnalogHistory, DiscreteHistory, StringHistory, History — are provider-backed interfaces, not ordinary application tables, so a statement that is valid T-SQL for a normal table can still be refused or quietly do the wrong thing here. One screen-side check does belong in this step: if a read-only query already returns the reason you expect and the display still shows the old text, the fault is the display binding or its refresh, not the history — write nothing.

In the reported case, the statement came from a screen correcting the stored reason on Equipment09_DowthermTemp.MV.HiHi.AckMsg, and the provider named vValue in the refusal.

Which login is allowed to write to the extension tables? #

Only a login that is a member of aaAdministrator may run T-SQL INSERT or UPDATE statements against the extension tables; that membership is the requirement for this write path, not a workaround for it.

aaAdministrator is the Historian security role the provider checks; the group and its members live in the Historian's security configuration, so that is where you confirm and grant the membership. What the provider evaluates is the login that opened the connection — the application's service account, not the operator at the screen, and not you. A statement that succeeds in your own administrator session proves nothing about the application's session: verify the account the application actually connects with, reconnect after any change, and re-check the session identity.

If your historian writes to a plain SQL Server database rather than extension tables, the equivalent identity check is confirming the runtime account holds the six database rights a SQL historian runtime needs.

Treat the grant as a privileged change: give aaAdministrator membership to a dedicated service account that only the correction job uses, never to the operator accounts.

Can you update a string tag's stored history with T-SQL? #

Yes — the extension-table documentation states that Transact-SQL INSERT and UPDATE can write AnalogHistory, DiscreteHistory, StringHistory and History, so a stored reason string on a string tag is correctable in place.

The commitment comes with one discipline: the provider implements its own write semantics, which differ from conventional SQL, so build the statement from the documented string-history example for your installed release rather than adapting an ordinary table UPDATE by feel. Follow that example's required fields and its record-selection rules exactly. The same discipline — settle the write path before writing the statement — applies when you are choosing the write path for manual historian entries in any system.

Is the reason text stored as a string tag or as an alarm record? #

Read the tag's configured data type in the Historian tag configuration; Equipment09_DowthermTemp.MV.HiHi.AckMsg could be either, because the name follows the alarm's equipment hierarchy rather than the storage path.

An acknowledgment message can live as a genuine string tag even though its name sits under the alarm hierarchy, and a description shown beside an alarm can come straight from an alarm and event record. The configured data type decides, so confirm it before choosing a write path:

  • Read the configured data type of the tag in Historian configuration — never infer it from the name.
  • Run a read-only SELECT through the application's own connection and retrieve the tag, the timestamp and the current reason string.
  • Capture the complete failed statement and the provider message; note whether it names History or StringHistory, and which value column.
  • Confirm the login that connection uses — the account, not the person at the keyboard.
  • Note the timestamp representation the retrieval returns, UTC or local, before you address any stored sample.
Where the reason text lives What SQL accepts Decision
String-tag history (StringHistory) INSERT and UPDATE, with Historian's documented semantics Correct the sample in place, with an aaAdministrator login
Analog or discrete tag history INSERT and UPDATE, with that table's documented semantics Same write path, that table's example
Alarm and event history SELECT only Keep the record intact; correct beside it, not in it

Why does the write fail on vValue but succeed on Value? #

Because they belong to different interfaces: on Historian 2023 R2, a reported INSERT through History naming vValue failed, while the same insert through the string-history interface naming Value succeeded.

vValue is the column your failing statement named on History; the string-history interface carries its own Value column, and that is the one the string write path uses. Commit to this split for string tags: write through StringHistory and its Value column, and stop addressing vValue on History.

Two cautions come with that report. It was an INSERT observation on one release, 2023 R2, so treat it as the pointer it is and read the exact statement spelling in your installed release's documentation. And clearing the permission gate will expose this interface gate, because the provider stops at the first refusal — expect to fix both before a write lands.

How do you correct one sample without writing a second one? #

Verify with a one-row count on both sides: the window you target must return exactly one row before the UPDATE and exactly one row after it, with the reason string changed — one equals one proves a correction, two proves an insert.

The procedure, in order:

  1. Confirm the application connection's login holds aaAdministrator membership; reconnect and verify the session identity.
  2. Confirm the tag's configured data type is string, and write through StringHistory and its Value column.
  3. Convert the displayed time to the stored time, and confirm the target window returns one row.
  4. Submit the documented UPDATE with the reason string as a parameter.
  5. Requery the same window and accept the change only when the count is still one and the string is the new one.

Worked example, with illustrative values on the case tag. The screen shows the acknowledgment at 2024-06-11 09:32:07 plant time, and the plant runs at UTC−5. The retrieval through the provider returns stored sample times in UTC, so the sample you must address sits at 09:32:07 + 05:00:00 = 14:32:07 UTC. A read-only SELECT over the two-second window 14:32:06.000 to 14:32:08.000 returns one row: the old reason 'Level high - unknown cause'.

Submit the documented UPDATE through StringHistory:

-- illustrative shape; the predicate spelling comes from your release's documented example
UPDATE StringHistory
SET Value = @NewReason   -- string, e.g. 'Level high - condenser fouling (WO 4187)'

Complete the WHERE clause exactly as the documented string-history example spells it — the tag and the UTC timestamp, nothing broader — and pass the reason string as a parameter so operator punctuation is never parsed as SQL. Requery the same window: one row, the new string. Before-count 1 = after-count 1, so the statement corrected the existing sample; a count of 2 means you added a sample, and you address that through your correction procedure before retrying.

What moves the arithmetic is the offset: the same 09:32:07 local at a UTC+1 plant addresses 09:32:07 − 01:00:00 = 08:32:07 UTC. The retrieval mode setting decides whether returned timestamps arrive as UTC or local, so set it once and address what it actually returns.

What if the reason text is an alarm and event history record? #

Then stop: alarm and event history supports SELECT only, no INSERT or UPDATE path exists there, and no permission or syntax change will create one.

The record is the audit trail of what was acknowledged and when, so the decision is to keep it intact. If operators must attach a corrected reason, store the correction where writes are supported — a string tag or an application table — keyed to the original event's tag, timestamp and message, and let the display join the two. That gives you the editable layer the history interface deliberately withholds, and it leaves the original event untouched for anyone who audits it later.

Questions asked

Can you grant write access to vValue alone, without the aaAdministrator membership?

No. The extension tables are provider-backed interfaces, and the stated requirement for INSERT and UPDATE is aaAdministrator membership; there is no per-column grant that opens vValue by itself. The least-privilege arrangement is a dedicated service account in that group, used only by the correction job.

Are the Historian role names the same in every release?

No. The extension-table write requirement is stated as aaAdministrator, while current documentation for connected applications names roles such as Historian Administrator and Historian Power User for other permission scopes. Confirm the exact group name in your installed release's security configuration before granting anything.

Is INSERT a safe substitute when the UPDATE keeps failing?

No. INSERT adds a sample; it does not replace one. Use it only to add history that was never logged. For a wrong stored reason, fix the login and the interface, then run the documented UPDATE and hold the one-row count on both sides of the write.

Why does the statement work in my session but fail in the application?

The provider evaluates the login that opened the connection, not the person at the screen. Applications usually connect with a service account, so a successful test from your own administrator session is a common false pass. Confirm the account the application's connection really uses before assigning the cause.

Keep reading

  • Troubleshooting

    Plant SCADA Connector shows connected but historian tags are NULL

    Connected status on both Connector ends proves the connections, not the reads: with Citect error 29, Bad User Parameters, the driver subsystem rejects the read before any value exists to store. Check the I/O Device special options and the variable tag data types first and leave the historian destination alone.

    Edge computing and IIoT

  • Comparison

    How AVEVA Historian publishes collected data to a client

    Yes — AVEVA Historian publishes collected data, but through a client-matched output rather than one universal server. Seven paths cover the cases: SuiteLink, PCS iData, OMI Replay, SQL History or Live tables, MQTT, OData, and Gateway as an OPC DA client. Keep the OPC UA link as collection, then pick the output by the client's protocol and whether it needs live or stored values.

    Edge computing and IIoT

  • Explainer

    Tag Historian vs SQL Bridge storage for a short-term trend database

    Use Tag Historian for plant-wide short-term trending because it stores narrow, on-change rows; keep SQL Bridge for PLC-to-database handshakes that need one wide row per group execution. Copy closed time partitions and the tag-mapping tables to the downstream historian, and prune only after the copy is confirmed.

    Edge computing and IIoT