how to get the databases that the current login user can visit?

  • hi guys,

        how can i get the database list, using sql statements, that the current login user can vist?  i know the enterprise manager can show this list when viewing the user's properties.  

        thank u.

  • sp_MSdbuseraccess

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

  • sp_helprotect null, 'User_Name'

    Roi Assa


    Kindest Regards,

    Roi Assa

  • sp_MShasdbaccess

  • thank you all,

    to Johnson, sp_mshasdbaccess works well.

    to  Roi Assa , sp_helprotect null, 'User_Name' lists all the current user's rights in the current database,

    to stax88, sp_MSdbuseraccess not exist, maybe you mean sp_mshasdbaccess?

     

  • Sorry, I'm using v9.

    Tim Wilkinson

    "If it doesn't work in practice, you're using the wrong theory"
    - Immanuel Kant

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply