In some environments, the SQL Agent job o365.RebuildIndexesJob may fail even though other jobs owned by LicenseManagerUser continue to run successfully. This article explains the cause of the failure and how to resolve it.
Error details
Date: 5/5/2025 1:15:00 AM
Server: SNOWPRDSQL
Job Name: o365.RebuildIndexesJob
Step Name: RebuildIndexesForUserReadModelUsersPerSubscriptionPlanLinkedSlmUserDetails
Duration: 00:00:00
SQL Severity: 16
SQL Message ID: 297
Retries Attempted: 3
Executed as user: LicenseManagerUser.
The user does not have permission to perform this action. [SQLSTATE 42000] (Error 297).
NOTE: The step was retried the requested number of times (3) without succeeding.
The step failed.
Cause
The job runs index fragmentation checks and rebuilds/reorganizes indexes on tables in the O365 schema of the SnowLicenseManager database. This process relies on the dm_db_index_physical_stats function, which requires VIEW SERVER STATE permission when called with NULL parameters.
If LicenseManagerUser does not have this permission, the job will fail.
Grant the required server-level permission to LicenseManagerUser:
GRANT VIEW SERVER STATE TO LicenseManagerUser;
This permission allows the account to use dm_db_index_physical_stats across all databases when parameters are set to NULL.
Once the VIEW SERVER STATE permission is granted, the o365.RebuildIndexesJob will complete successfully, and no further changes are required.
Related Articles
How to send M365 data from Snow Integration Manager to your Snow Atlas environment. 74Number of Views Resolving Commander Installation or Upgrade Failures 719Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago