If you are deploying SQL Server AlwaysOn, SQL jobs are created under the SQL Server Agent during the Workspace ONE UEM Database deployment. These jobs must be available in all database servers which belong to the SQL Availability Group.
T-SQL scripts are generated from the jobs, which are then transferred to target databases and run against them to create the same exact jobs.
After deploying the Workspace ONE UEM Database against one of the servers, perform the following:
- Using SSMS (SQL Server Management Studio), navigate to SQL Server Agent > Jobs. Locate the jobs for the target Workspace ONE UEM database which follow the naming convention
AirWatch_<DatabaseName> - <JobName>, including the AAG_EnableJobs job.
- For each Workspace ONE UEM job:
- Right-click the job, then select CREATE TO > New Query Editor Window.
- Save the T-SQL script to your local computer.
- When you have saved all jobs as a script, perform the following steps:
- Transfer all generated T-SQL scripts (for example using a file share) to the database servers which belong to the SQL Availability group.
- Open each T-SQL script in SSMS and run it.
- Verify that all jobs are present by navigating to SQL Server Agent > Jobs (a refresh of the SSMS instance might be necessary).
If the SQL user account used for Workspace ONE UEM has minimal permissions, assign permission to run the AAG_EnableJobs job by running the following command in each database server that contains the AAG_EnableJobs job:
GRANT VIEW SERVER STATE TO [AccountName]
[AccountName] is the SQL user account used to access the Workspace ONE UEM database.
If a target database fails to join the SQL Availability Group, see https://technet.microsoft.com/en-us/library/ms178029(v=sql.120).aspx for troubleshooting steps.