schema validation failed on create schema

gemugemu Posts: 17 Bronze 2
Hi,

I get following error when trying to build a package:

VERBOSE: The database update failed
build    27-Apr-2018 14:27:46    Invoke-DlmDatabaseSchemaValidation : Schema validation failed: 40 batches
build    27-Apr-2018 14:27:46    failed. The first error is 'Cannot find the user 'dbo', because it does not
build    27-Apr-2018 14:27:46    exist or you do not have permission.
build    27-Apr-2018 14:27:46    CREATE SCHEMA failed due to previous errors.'.

I have 2 schema declarations:
CREATE SCHEMA [Internal]
AUTHORIZATION [dbo]
GO

CREATE SCHEMA [Util]
AUTHORIZATION [dbo]
GO
I'm executing below command  (without the masking):
sqlci.ps1 -Verbose Build -scriptsFolder *** -packageId myDB-packageVersion 0.4-master -Options ,-ForceColumnOrder,IgnoreNotForReplication,IgnorePermissions -filter F:/SQLCompareFilters/filter.scpf -temporaryDatabaseServer server\instance -temporaryDatabaseName myDB_validate -temporaryDatabaseUserName myUser -temporaryDatabasePassword ******** -dlmDashboardHost mydash.mydomain.com -dlmDashboardPort 19528 -includeDocs
This is my filter:
</code></div><div><code><NamedFilter version="1" type="SQLCompareFilter">
&nbsp; <FilterName>Filter created using SQL Source Control</FilterName>
&nbsp;&nbsp;<Filter version="1" type="DifferenceFilter">
&nbsp;&nbsp;&nbsp;&nbsp;<FilterCaseSensitive>False</FilterCaseSensitive>
&nbsp;&nbsp;&nbsp;&nbsp;<Filters version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<None version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</None>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Assembly version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Assembly>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<AsymmetricKey version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</AsymmetricKey>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Certificate version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Certificate>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Contract version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Contract>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<DdlTrigger version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</DdlTrigger>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Default version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Default>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<ExtendedProperty version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</ExtendedProperty>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<EventNotification version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</EventNotification>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FullTextCatalog version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FullTextCatalog>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<FullTextStoplist version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FullTextStoplist>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Function version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Function>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<MessageType version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</MessageType>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<PartitionFunction version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</PartitionFunction>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<PartitionScheme version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</PartitionScheme>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Queue version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Queue>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Role version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Role>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Route version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Route>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Rule version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Rule>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Schema version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Schema>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SearchPropertyList version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SearchPropertyList>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SecurityPolicy version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SecurityPolicy>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Sequence version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Sequence>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Service version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Service>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<ServiceBinding version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</ServiceBinding>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<StoredProcedure version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</StoredProcedure>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<SymmetricKey version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SymmetricKey>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Synonym version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Synonym>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Table version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</Table>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<User version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</User>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<UserDefinedType version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</UserDefinedType>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<View version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</View>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<XmlSchemaCollection version="1">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Include>True</Include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<Expression>TRUE</Expression>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</XmlSchemaCollection>
&nbsp;&nbsp;&nbsp;&nbsp;</Filters>
&nbsp;&nbsp;</Filter>
</NamedFilter>
</code></div><br>This is my dbo user create statement<br><pre class="CodeBlock"><code>CREATE USER [dbo] FOR LOGIN [dbo_myDB_validate] WITH DEFAULT_SCHEMA=[dbo]<br>GO
I have not checked in any users under security, only schema's and i'm validating on our own database, not the localDB.

Do you have any idea whats going on and how to resolve?

Sign In or Register to comment.