DBA > Job Interview Questions > Microsoft SQL Server FAQs

What does HAS_DBACCESS() do?

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

What does HAS_DBACCESS() do?

Answer: Returns a 1 if the current user has access to the database passed in. Explanation: This function returns a 1 if the current user has access to the database named passed to the function and 0 if they do not. It is a way to check access before changing to that database.

(Continued on next question...)

Other Job Interview Questions