HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Visibility of the Code for a view depends on from where I connect on SQL server

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
thedependsconnectserversqlwhereviewvisibilityforcode

Problem

My SQL Server admin and I are currently struggling with a strange issue. When I connect to the database from the same machine I cannot access a view definition, there is a message:

Property TextHeader is not available for . ... The text is encrypted

When I connect to the same server from the SSMS from another machine I am able to see the view definition. Is there a specific place to look?

In my MySQL world I'd say, the grants for me include the machine from which I connect. In the SQL Server world, I have no clue. My DBA says that my admin account is part of the AD group and access is given at group level.

It is the same database, views that I create on one server are immediately accessible from the other server. But I can access its code from one, but not the other.

We have two servers, a and b, on which the database xyz is synchronized across. I cannot access the database b-xyz from b, since a is the primary node.

If I connect to a-xyz from server b, the database a-xyz is shown as synchronized and I can access the view definitions.

If I use server a to connect to a-xyz, the database does not have the "synchronized" in its name and I cannot access the definition (via "Script View as Create"). My DBA however sees "synchronized" from all machines he is connecting from.

I even created a view just for testing purposes. Accessing the data is no problem, accessing the definition only works from one machine.

Solution

It seems you aren't connecting to the same database. Perhaps you are connected to a developer instance vs a production instance?

If a view definition is encrypted, then it is encrypted. There's no privilege aspect involved here.

(There are tools out there that can decrypt encrypted object definitions, but that is a different topic.)

Context

StackExchange Database Administrators Q#324507, answer score: 3

Revisions (0)

No revisions yet.