What are the challenges you face when working across database platforms? Take the survey

Script verification failed on Active Directory login name

yanyan Posts: 2 New member
edited May 25, 2021 3:13PM in SQL Change Automation

I am testing SQL Change Automation for the first time to improve our work,
following the Video tutorial after creating the first baseline for our Production and comparing the baseline to out Stage database, I have an error: "Script verification failed - failed to verify the migration script against the shadow database"

the script from the baseline:
IF NOT EXISTS (SELECT * FROM master.dbo.syslogins WHERE loginname = N'VMDOM2\daniellel')

from the log file:
Msg 15006, Level 16, State 1, Server SQL1, Line 1
'VMDOM2\danielle' is not a valid name because it contains invalid characters.

we are using out Active Directory to login the database and it looks like the '\' (backslash) is causing the error

is there any solution for that?

Thank you.


  • Options
    Hi Yan,

    Apologies that you hit this error. 

    I suspect that the error text bubbling up here may be misleading. The actual issue may be that the SQL Server can't resolve that specific login name. This can often happen if the production environment is in a different domain and than development.

    There are two things that you might wish to configure when creating the new project, before creating the baseline script:

    1. Do you wish to include users (and related logins) in the project? 
    If you do have some segmentation between your domains and the users and related logins which are being scripted aren't valid everywhere, then you probably wish to filter these out.

    To do this, when creating a project, on the "Options" screen there is an opportunity to specify a filter file that excludes  users from the project. This filter file can be created and saved using the SQL Compare GUI.(Screenshot at the bottom of this post)

    I created a filter file excluding users and popped it in this Gist.  

    More information is here on how to do this in case you'd like to do this yourself, or you want to create a more complex filter that also excludes other things.

    2. Do you wish to include any permissions outside of role based permissions in the project?

    Sometimes permissions have been granted to individual users inside the database on specific objects. Often if you want to filter out users, you also want to change a comparison option so that only role-based permissions are included.

    To configure this, on the options tab when creating the project, hit the "Edit comparison options" button. This is right below where you configure the filter. 

    Select "Users' permissions and role memberships" (screenshot below).

    Hope this helps!


  • Options
    yanyan Posts: 2 New member
    Hi Kendra,

    Thank you for your answer, I'll go ahead any try that.

    Much appreciated.
Sign In or Register to comment.