• Thanks, tried the way you test, it looks like if the user is added to the database without any other permissions, and it has server role view server definition, it will work.

    I will also use create user to replace sp_adduser in the last statment.

    Thanks much