| Author |
Query/test for db_owner role?
|
|
| R Baker 2006-03-05, 8:23 pm |
| Is there a SQL query that can explicitly return the roles that the current
SQL user has been explicitly assigned? I'm trying to find out if the user
has been given the db_owner role (versus it being implied by the user being
an administrator).
Thanks!
| |
|
|
| Ben Nevarez 2006-03-05, 8:23 pm |
|
Would this work for you?
sp_helprolemember 'db_owner'
Ben Nevarez, MCDBA, OCP
Database Administrator
"R Baker" wrote:
> Is there a SQL query that can explicitly return the roles that the current
> SQL user has been explicitly assigned? I'm trying to find out if the user
> has been given the db_owner role (versus it being implied by the user being
> an administrator).
>
> Thanks!
>
>
>
| |
| R Baker 2006-03-05, 8:23 pm |
| Yes, that might. I'll have to figure out how to process the result set using
the MFC CDatabase classes, but it seems doable.
Thanks.
"Ben Nevarez" < BenNevarez@discussio
ns.microsoft.com> wrote in message
news:33F82F3D-CDA3-4040-B160- 22E6D96B3D55@microso
ft.com...[color=darkred]
>
> Would this work for you?
>
> sp_helprolemember 'db_owner'
>
> Ben Nevarez, MCDBA, OCP
> Database Administrator
>
>
> "R Baker" wrote:
>
| |
|
|
| Tibor Karaszi 2006-03-05, 8:24 pm |
| It is only one resultset, so you would process it like any resultset (as if you were sending a
SELECT from your app, or executing your own stored procedure which returns a result set).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/
Blog: http:// solidqualitylearning
.com/blogs/tibor/
"R Baker" <nospamx@nospamx.com> wrote in message news:eTB3u8WPGHA.3936@TK2MSFTNGP10.phx.gbl...
> Yes, that might. I'll have to figure out how to process the result set using the MFC CDatabase
> classes, but it seems doable.
>
> Thanks.
>
> "Ben Nevarez" < BenNevarez@discussio
ns.microsoft.com> wrote in message
> news:33F82F3D-CDA3-4040-B160- 22E6D96B3D55@microso
ft.com...
>
>
|
|
|
|