This article troubleshoots an error that occurs when installing the Data Warehouse license key due to a missing table or permission.
When a user attempts to install the Solver Data Warehouse license key, the receive the following error message:
"There was an error updating the license key."
This error can occur for one of the following reasons:
- The common.license table is missing from the SolverDW database.
- The user defined in the connection string does not have proper permissions to the "common" schema.
The common.license table is missing from your SolverDW
To verify this, you need access to the database via SSMS. In SSMS, expand on the database and verify that the common.license table exists on the database. If it does not, run the following statement on the database:
IF NOT EXISTS(select name from sys.schemas where name = 'common') EXEC('CREATE SCHEMA [common] AUTHORIZATION [dbo]');
IF NOT EXISTS(SELECT name from sys.tables WHERE name = 'Licenses' and schema_id in (SELECT schema_id FROM sys.schemas where name = 'common')) exec ('CREATE TABLE [common].[Licenses]( [CustomerName] [nvarchar](max) NULL, [CustomerId] [uniqueidentifier] NULL, [EffectiveAt] [datetimeoffset](7) NULL, [ExpiresAt] [datetimeoffset](7) NULL, [Data] [nvarchar](max) NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]');
The user defined in the connection string does not have permissions to write to the database
In order to install the license key you must have write permissions to the database. Verify that the user in SQL has db_datawriter permissions to the database. If you are unsure which user is being used to connect to SQL, you can view this in the Data Connection menu.
- Click Settings > Data Connections
- If you do not see this menu option and are an administrator, in your Address bar type in "URL/data-connection" where "URL" is your Private Host URL.
- Find the Data Warehouse connection and click Edit. The user that is being used to update the database is listed here.