Layton ServiceDesk - Workflows - Bulk Change Email Domain
From Layton Support
Contents |
Overview
If the domain for user email addresses needs to be changed, e.g., due to a company acquisition, importing End Users or Analysts will cause duplicates, because the email addresses are different. This script will change the domain without altering the name in front of the @ symbol. It is recommended that you test this operation on a test database prior to committing to live.
This procedure applies to both Analysts and End Users. There are a total of three scripts:
- LSD Bulk Change Email Domain 01 Create Stored Procedures.sql: Creates two Stored Procedures for updating the Analyst and End User tables
- LSD Bulk Change Email Domain 02 Execute Stored Procedure Analyst.sql: Executes the Stored Procedure for Analysts
- LSD Bulk Change Email Domain 03 Execute Stored Procedure End User.sql: Executes the Stored Procedure for End Users.
Procedure
- Back up your database. It would be wise to also test this on a copy of your database before doing this on live.
- Download the package of SQL scripts.
- Open both in Management Studio.
- Execute the first, LSD Bulk Change Email Domain 01 Create Stored Procedure.sql.
- Execute the second, LSD Bulk Change Email Domain 02 Execute Stored Procedure.sql:
- Execute the query.
- The top results pane will display the contents of the End User table. The lower pane will list just the domains present in the table, without the @ symbol, for reference.
- Copy the domain to be changed from the lower list of domains.
- Replace the string ENTEROLDDOMAIN with the copied domain. Note: Do not enter the @ symbol.
- Replace the string ENTERNEWDOMAIN with the new domain, without the @ symbol.
- Execute again to change the domain. The two lists will be presented again, for checking the results.