How can we help you today? How can we help you today?
Kendra_Little
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.[image] [image] (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! Kendra ----- [image] [image] / comments
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 ...
0 votes
Hi Peter, As you've found, this is a limitation from Microsoft -- syntax for code that is specific to Azure SQL Database features can only be executed successfully against Azure SQL Database.  This requirement means that if you do want to use Azure SQL Database-only features and be able to validate them well, the simplest solution is to use an Azure SQL Database to host your development infrastructure as well. (I suspect from the Microsoft perspective, if one wanted a local dev environment for Azure SQL Database their answer is that this is becoming available from an Azure Arc perspective. But that's not nearly as cost effective (free) as traditional Developer Edition.) It is potentially possible to work around this with Dynamic SQL in some situations. For example in our CreateDatabase.sql script (in the provisioning folder), we use this code: PRINT N'CUSTOM: Creating database [$(DatabaseName)]...'; GO IF SERVERPROPERTY('EngineEdition') = 5   EXEC sp_executesql N'CREATE DATABASE [$(DatabaseName)] (EDITION = ''Basic'');'; ELSE   CREATE DATABASE [$(DatabaseName)]; GO One could do something similar for External Table code potentially. Exactly how you would approach it might be dependent on whether you have things like views that depend on the external table or not. Options might be leaving the External Table out of local environments, or perhaps creating a view instead of an external table in text environments? One extra bit of info is that our SQL Compare team has just released support for External Tables, and this support will be moving into SQL Source Control and SQL Change Automation soon. If you are using SCA to generate migrations against a non-Azure SQL Database dev environment then I don't think this will impact you, but wanted to mention it just in case it comes up in some way and causes you some confusion. Cheers, Kendra / comments
Hi Peter,As you've found, this is a limitation from Microsoft -- syntax for code that is specific to Azure SQL Database features can only be executed successfully against Azure SQL Database. This r...
0 votes