Created
September 27, 2012 19:43
-
-
Save t0nydean/3796034 to your computer and use it in GitHub Desktop.
use of HAS_DBACCESS function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CURSOR FOR | |
SELECT name | |
FROM master.sys.databases | |
GROUP BY name HAVING HAS_DBACCESS(name) = 1 --funtion checks your access to each datbase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment