Migrate UserLock data from SQL Server to another
Move the UserLock database to a new SQL Server instance during an infrastructure change or upgrade, while preserving all existing data.
In some situations, you may need to move the UserLock SQL database to a new server — for example during an infrastructure upgrade, hardware replacement, or when scaling up from SQL Express to a full SQL Server.
This guide explains how to migrate the database files and reconfigure UserLock to use the new SQL Server.
Before you start:
- Make sure you have administrative rights on both SQL Server instances. 
- See Database architecture for details about how UserLock stores its data. 
- Detach the database - On the current SQL Server, open SQL Server Management Studio with an account that has admin rights. 
- Right-click the - UserLockdatabase → Tasks ▸ Detach.) 
 - In the detach window, check Drop connections and click OK. ) 
 
- Copy the database files - Copy the - UserLock- .mdfand- .ldffiles from the current server to the new one.
 ) 
- Attach the database - On the new SQL Server, open SQL Server Management Studio. 
- Right-click Databases → Attach…. 
- Click Add…, select the copied - UserLockfile, then click OK.
 ) ) ) ) 
- Change the UserLock production database - See the page Define a production database to learn how to connect UserLock to the new database. 
 
- Back up before migration: create a full backup of the UserLock database before detaching it. 
- Check integrity: after attaching on the new server, verify that all tables and data are present. 
- Secure the new environment: configure permissions and backups on the new SQL Server. 
- Archive the old files: keep a copy of the old database files in case rollback is needed. 
)
)
)
)
)
)
)
)
)
)
)
)
)
)