How to check if I currently own a database owner for SQL 2000/2005/2008

I can’t remember how to do this in a TSQL query. It was a one-liner suitable for testing before starting DML. The query was similar to SELECT IS_DBO () or SELECT IS (DBO).

+3
source share
1 answer

You are probably looking for a function IS_MEMBER:

SELECT IS_MEMBER('db_owner')
+4
source

Source: https://habr.com/ru/post/1706857/


All Articles