View definition hide from SA user

Can I hide view definition of others users's procedures from SA user. I want to hide business logic.

You can't hide anything from sa or users with sysadmin server role membership. That's by design. Any user with sysadmin membership will skip all permissions checks once they successfully log in.

Regarding sa specifically, it is best to disable the login, and/or rename it to something other than sa, and set the password to something random that even you don't know. Definitely have other sysadmin logins, but only for your database administrators or dedicated system admins, and only for Windows logins.

Why are you concerned about that? Do you really think there are DBA's who are going to 'steal' your code and business logic?

If the code is that sensitive and proprietary, then you need to host the system yourself so you have complete control over who has access.

1 Like

What are you really trying to achieve here? What is the use case? I think there is more to this than meets the eye.