contains an unresolved reference to an object
Cross-database access with three-part object coulifier are not supported in Always Encrypt.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I was activating always encryted in my database when this error showed:
Error SQL71501: Error validating element [dbo].[VIEW_NAME]: View: [dbo].[VIEW_NAME] contains an unresolved reference to an object. Either the object does not exist or the reference is ambiguous because it could refer to any of the following objects: [dbo].[TABLE_NAME].[c], [dbo].[TABLE_NAME].[Id] or [dbo].[TABLE_NAME].[c].
There were a lot of this kind of messages, just to be clear the column I was encrypted had nothing to do with the view.
I found that all the views with problems have reference to anoter database, let see:
In database_1 i have view_1 that uses by a synonymous to access table_A on database_2.
How i can activate always encrypted in my database?
contains an unresolved reference to an object
Cross-database access with three-part object coulifier are not supported in Always Encrypt.
I don't know what Olaf means with three-part object references not being supported with Always Encrypted. Clearly, if you have a view that is working, and you encrypt a column that has no relation to the view, that view should keep working. If SSDT starts to freak out because of this, I would consider throwing SSDT out the window. (No, I don't use SSDT myself.)
But you say:
In database_1 i have view_1 that uses by a synonymous to access table_A on database_2.
So, view_1 is like this?
CREATE VIEW view_1 AS
SELECT * FROM database_2.dbo.table_A
If so, I think it is better to use synonyms instead:
CREATE SYNONYM view_1 FOR database_2.dbo.table_A
This is a little more lightweight. But if it stops SSDT from barfing, I don't know.
always encrypted means the client encrypts and decrypts. the database uses the encrypted value for compares and this limits the use of the column in join and where clauses.
as values are compared while encrypted, a deterministic encryption must be used, and if two columns are compared they must use the same encryption and keys. you can see this causes some limitations.
see limitations:
you can implement secure enclaves (allow the server to decrypt columns internally) and get pattern matching of encrypted columns
.