Hi.
I created Image from database backup from Production server.
I'm trying create clone from image and receiving following error:
Clone Agent: The user account login 'DOMAIN\LoginName' hasn't been mapped to a user on the database. Ensure the login is automatically given a user mapping on any new databases and try again. (Exception)
My account(DOMAIN\LoginName) have admin privileges on Windows and SQL Server.
I tried create clone in web browser and in PowerShell. Error the same is everywhere.
How to fix this error?
Comments
2 comments
-
Official comment
Hi SergeyK for providing your solution.
Your solution does makes sense, as the DDL trigger could indeed be interfering with the clone creation process.
Here are some possible reasons why:- Triggers and Permissions: DDL triggers can perform actions like logging schema changes, and in some cases, these actions can require additional permissions or affect the state of the database. If the trigger is set to log schema changes to another database, it could be trying to access resources or log data that isn't available or correctly mapped in the cloned environment.
- Backup Creation Process: When creating a clone, Redgate SQL Clone effectively takes a snapshot of the database. If a DDL trigger is active, it might attempt to execute additional operations that can interfere with the cloning process, especially if it tries to reference external resources or databases that the clone might not have access to at that moment.
- Disabling the Trigger: Disabling the DDL trigger before taking the backup makes sense because it prevents any additional operations from being triggered during the clone creation, ensuring that the backup is clean and doesn't have any external dependencies.
To summarize: The issue likely arose because the DDL trigger was executing and possibly trying to log changes to an external database, leading to conflicts or missing mappings. Disabling or removing the trigger resolves this issue, as it prevents those additional operations from interfering with the clone creation.
Glad that you have resolved your concern, and this information may come in useful in the future for someone else getting the same error. -
it seems that the problem was in the DDL trigger, on the cloned database. The trigger logs schema changes to another database. Fix: removing/disabling the DDL trigger before starting backup creation
Add comment
Please sign in to leave a comment.