Inventory Data Status¶
New in 5.66.1.
The inventory history in each company database is rebuilt once a day by a SQL Server Agent job named Pulse Inventory History Daily Update. When that job stops running, the reports built on the inventory history go on showing the last figures it produced. Settings → Administration → Inventory Data Status... shows how old the inventory history is and, when it is out of date, why, with what to do about it.
When PULSE Dashboard checks¶
PULSE Dashboard checks the inventory history every time it connects to a database. The data counts as out of date after 36 hours without a complete refresh: one daily run, with 12 hours to spare. Every time is read from SQL Server's clock, so a workstation with the wrong date or time zone does not change the answer.
When something needs attention, the Inventory Data Status screen opens once the dashboard has loaded. It opens once per session for each database, and only for users who have the warning switched on.
The status bar¶
The status bar shows the state of the inventory data between the database name and the user name. The text is red when something needs attention, and clicking it opens the Inventory Data Status screen.
| Status bar | Meaning |
|---|---|
| Inventory data: refreshed 9 hours ago | The inventory history is up to date. |
| Inventory data: refreshing | A refresh is running now. |
| Inventory data: 3 days old | The inventory history is out of date. |
| Inventory data: will not refresh | The data is still current, but something will stop the next refresh. |
| Inventory data: never refreshed | No complete refresh has been recorded. |
| Inventory data: not checked | The database could not be read. |
A database without the inventory history installed shows nothing here.
The Inventory Data Status screen¶
The top of the screen says whether the inventory history is up to date and when it was last fully refreshed. Each problem found is listed below that, in bold, with its cause and what to do about it. When nothing needs attention the list reads Nothing needs attention.
Three tabs hold the detail:
- Inventory History: the year balances and the monthly details for the newest fiscal year, with the last result of each, when it started and finished, and how long it took.
- Refresh History: this database's step in the job, newest first, with the result, how long it took and SQL Server Agent's message. SQL Server Agent keeps a limited history, 100 rows per job by default, so older runs drop off.
- What Was Checked: everything the check looked at and what it found, including the job's steps and schedules, its next scheduled run, and how long a successful refresh of this database usually takes.
Check Again runs the check again, for example after starting the job by hand.
Causes it recognizes¶
| What the screen reports | What to do |
|---|---|
| SQL Server Express cannot run the daily update | Express has no SQL Server Agent, so the job never runs. Run EXEC LEAHYCONSULTING.InventoryHistory_DailyUpdate against the database by hand, or move the database to an edition of SQL Server that includes the Agent. |
| SQL Server Agent is not running | Start the Agent in SQL Server Configuration Manager, and set its startup type to Automatic so it starts again after a restart. |
| The daily update job does not exist | Recreate the job in SQL Server Management Studio, or call PULSE support at (513) 723-8095 to reinstall it. |
| The daily update job is disabled | Enable it in SQL Server Management Studio: SQL Server Agent → Jobs, right-click the job, Enable. |
| The daily update job does not include this database | The job has one step per database, named after the database. Add a step for this database that runs the daily update against it. |
| The job's step for this database runs somewhere else | Change the step's database in SQL Server Management Studio. |
| The daily update job has no active schedule | Attach or enable a daily schedule. PULSE Dashboard installs the job with a schedule named Daily at 4:00 AM. |
| The last refresh of this database failed | The screen shows SQL Server Agent's message for the failed run. |
| The last run stopped before it reached this database | A step for another database failed first, and SQL Server Agent does not run the steps after a failed one. Fix the database behind the failing step, or move this database's step ahead of it. |
| Building the inventory history failed | The procedures record a failure for a fiscal year while the job itself reports success. The daily update retries the year on every run. To see the error, run the daily update against the database in SQL Server Management Studio. |
| A refresh started and never finished | The job was stopped, SQL Server restarted, or the session ended part-way through. The next run repeats the work. |
Switching the warning off¶
The screen carries the checkbox Warn me when this database's inventory data is out of date. Clearing it stops the screen opening by itself, for you and for this database only, which suits a test database nobody refreshes. The status bar goes on showing the state of the data either way.
To switch the warning back on, open the screen from the Administration menu or the status bar and tick the checkbox again.
Permissions¶
Inventory Data Status is available to every user, and the only thing it changes is the viewer's own warning setting.
The check reads the inventory history status in the company database, and the job, its steps, schedules and history in SQL Server's msdb database. When the login PULSE Dashboard connects with cannot read msdb, the screen says so. The age of the data is still accurate, because it comes from the company database, but whether the job is missing, disabled or failing cannot be seen, and a SQL Server administrator can check the job in SQL Server Management Studio. Reading whether SQL Server Agent is running needs the VIEW SERVER STATE permission; without it the Agent's state shows as Unknown on the What Was Checked tab.
Getting started
Inventory Data Status runs after the upgrade with nothing to configure. The warning is on for every user until they switch it off.