none
how to get / set permissions to sql server database

    Question

  • Hello.

    I am testing a database application running in Windows XP and SQL Server 2005.

    How can I know if the windows user has read/write access to a specific database? And at the same time, how can I select which users to give access to the database?

    Is there any difference if I run it under different combinations of Windows XP, Windows 7, SQL Server 2005 and  SQL Server 2008?

    Thanks.

    Tuesday, April 10, 2012 4:02 AM

Answers

  • How can I know if the windows user has read/write access to a specific database? And at the same time, how can I select which users to give access to the database?

    Is there any difference if I run it under different combinations of Windows XP, Windows 7, SQL Server 2005 and  SQL Server 2008?

    No, there is no difference regarding security within SQL Server.

    To know if the user have particular permission, simply try the action like INSERT/UPDATE and catch the exception, if one raises.


    Olaf Helper
    * cogito ergo sum * errare humanum est * quote erat demonstrandum *
    Wenn ich denke, ist das ein Fehler und das beweise ich täglich
    Blog Xing

    • Marked as answer by KJian_ Monday, April 16, 2012 5:25 AM
    Tuesday, April 10, 2012 5:24 AM