Move WEM SQL database to a new SQL instance with/without SysAdmin permissions

Move WEM SQL database to a new SQL instance with/without SysAdmin permissions

book

Article ID: CTX224553

calendar_today

Updated On:

Description

Unable to perform a migration of the WEM Database to a new SQL Server due to minimal permissions in SQL.  SysAdmin permissions on new SQL Server are not allowed and thus can not be used from the WEM broker.

Environment

Citrix is not responsible for and does not endorse or accept any responsibility for the contents or your use of these third party Web sites. Citrix is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement by Citrix of the linked Web site. It is your responsibility to take precautions to ensure that whatever Web site you use is free of viruses or other harmful items.

Resolution

#1: While still connected to the original SQL server, create a specific password for the vuemUser by using the Broker Service Configuration Console present on the WEM Server itself.

----Click on the "Advanced Settings" tab, select the button for "Set VUEM SQL User specific password" and enter the desired password into the box, then select "Save Configuration" which is at the top of the console Window.

#2: Perform a full backup of the WEM Database within SQL Server Management Studio

#3: Copy the Database to the new SQL Server and perform a Full Restore of that Database.
---Make sure that the vuemUser does NOT exist in the Login section under Security within the SQL Server Management Studio console (keep in mind that the vuemUser will exist as a user in the database itself - do not touch this)

#4: Run the following New Queries against the WEM Database on the new DB server (one at a time):
***DISCLAIMER: The execution of any/all queries SQL should only be performed by a Database Administrator.***
****Substitute "YourDB" with the name of your WEM Database****
****Substitute "Password12345" with the specific password that you set previously for the vuemUser on the original Database server in Step #1****

 
USE YourDB
GO
EXEC sp_change_users_login 'Report'
GO
USE YourDB
GO
EXEC sp_change_users_login 'Auto_Fix', 'vuemUser', NULL, 'Password12345'
GO
USE YourDB
GO
EXEC sp_change_users_login 'update_one', 'vuemUser', 'vuemUser'
GO
After running these 3 Queries, the vuem User will exist within the Login section under Security inside the SQL Server Management Studio Console.

#4a: If the lack of SysAdmin privileges on new DB Server hinders the ability to run the scripts just mentioned, do the following steps instead..... then finish with Step #5:
------#1: See the following URL which contains a Microsoft script which can be used as an alternative. https://support.microsoft.com/en-us/help/918992/how-to-transfer-logins-and-passwords-between-instances-of-sql-server
------#2: From the above URL, on the original DB server where SySadmin privileges exist, run the sp_help_revlogin stored procedure to output all of the login scripting
------#3: Copy this script (removing all other logins except vuemUser) and run it against the new SQL Instance on the new Database server.
***You should now have the vuemUser created in SQL which matches the ID/SID/Password of the vuem User inside the database that was restored.***

#5: Restart the WEM Broker server(s), be sure that inside the Broker Server configuration, the new Database server is being used and launch the WEM Administration Console to connect to the WEM site.

Problem Cause

The New Database server to which the WEM Database was migrated did not have the vuemUser permissions configured correctly on WEM Database due to minimal permissions

Issue/Introduction

This article explains how to migrate a WEM database to a new SQL server with full sysadmin privileges on both SQL Server. If SysAdmin privileges are not available, some guidance is given via URL for support.microsoft.com to help on specific steps as listed in the article.