You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by tom_ <to...@web.de> on 2008/01/09 20:00:20 UTC

Select users from systables

Isn't there a possibility to select the database users from the systables? In
the documentation I've not found it.
-- 
View this message in context: http://www.nabble.com/Select-users-from-systables-tp14718784p14718784.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Select users from systables

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Tom,

Glad to hear that you have found a workaround. If you are interested in 
the peculiarities of Derby schema names and authorization ids, you can 
read up on them in the CREATE SCHEMA section of the Derby Reference 
Guide: http://db.apache.org/derby/docs/10.3/ref/

Regards,
-Rick

tom_ wrote:
> Hi Rick,
>
> in my database it shows the name of the schemas, not of the users that I've
> created afterwards, but I've found a way how to proceed without querying the
> usernames.
>
>
> Rick Hillegas-2 wrote:
>   
>> tom_ wrote:
>>     
>>> Isn't there a possibility to select the database users from the
>>> systables? In
>>> the documentation I've not found it.
>>>   
>>>       
>> Hi Tom,
>>
>> I may be missing the point of your question, but here's some more 
>> information: Derby doesn't have a system table which stores the names of 
>> users who are allowed to connect to a database. This is because 
>> authentication can be (perhaps usually is) handled by an external 
>> service such as an LDAP server. Derby authentication is described in the 
>> "Working with user authentication" section of the Derby Developer's 
>> Guide: http://db.apache.org/derby/docs/10.3/devguide/
>>
>> I think that the closest that you can get to what you want is to list 
>> out the authorization ids of the schemas in a Derby database. The 
>> authorization ids are the names of the users who own those schemas. The 
>> following query will give you those user names:
>>
>>   select distinct authorizationid from sys.sysschemas
>>
>> This will give you the names of some of your users.
>>
>> Hope this helps,
>> -Rick
>>
>>
>>     
>
>   


Re: Select users from systables

Posted by tom_ <to...@web.de>.
Hi Rick,

in my database it shows the name of the schemas, not of the users that I've
created afterwards, but I've found a way how to proceed without querying the
usernames.


Rick Hillegas-2 wrote:
> 
> tom_ wrote:
>> Isn't there a possibility to select the database users from the
>> systables? In
>> the documentation I've not found it.
>>   
> Hi Tom,
> 
> I may be missing the point of your question, but here's some more 
> information: Derby doesn't have a system table which stores the names of 
> users who are allowed to connect to a database. This is because 
> authentication can be (perhaps usually is) handled by an external 
> service such as an LDAP server. Derby authentication is described in the 
> "Working with user authentication" section of the Derby Developer's 
> Guide: http://db.apache.org/derby/docs/10.3/devguide/
> 
> I think that the closest that you can get to what you want is to list 
> out the authorization ids of the schemas in a Derby database. The 
> authorization ids are the names of the users who own those schemas. The 
> following query will give you those user names:
> 
>   select distinct authorizationid from sys.sysschemas
> 
> This will give you the names of some of your users.
> 
> Hope this helps,
> -Rick
> 
> 

-- 
View this message in context: http://www.nabble.com/Select-users-from-systables-tp14718784p14722363.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Re: Select users from systables

Posted by Rick Hillegas <Ri...@Sun.COM>.
tom_ wrote:
> Isn't there a possibility to select the database users from the systables? In
> the documentation I've not found it.
>   
Hi Tom,

I may be missing the point of your question, but here's some more 
information: Derby doesn't have a system table which stores the names of 
users who are allowed to connect to a database. This is because 
authentication can be (perhaps usually is) handled by an external 
service such as an LDAP server. Derby authentication is described in the 
"Working with user authentication" section of the Derby Developer's 
Guide: http://db.apache.org/derby/docs/10.3/devguide/

I think that the closest that you can get to what you want is to list 
out the authorization ids of the schemas in a Derby database. The 
authorization ids are the names of the users who own those schemas. The 
following query will give you those user names:

  select distinct authorizationid from sys.sysschemas

This will give you the names of some of your users.

Hope this helps,
-Rick