i want to get all users database name
but sp_helpdb return all database,and
ms advice don't use system table ,how can i do this?
thank youDid u mean, to get all the users in the database. Then use,
sp_helplogins
Thanks
Hari
MCDBA
"frank" <anonymous@.discussions.microsoft.com> wrote in message
news:cab701c3ba43$10011f30$a601280a@.phx.gbl...
> i want to get all users database name
> but sp_helpdb return all database,and
> ms advice don't use system table ,how can i do this?
> thank you|||It's okay to just query it. Updating it is really something you don't want
to do.
btw, you could also use:
select catalog_name [Name of the database where the current user has
permissions.]
from information_schema.schemata
where catalog_name not in
('master','msdb','tempdb','model','northwind','pubs')
--
-oj
RAC v2.2 & QALite!
http://www.rac4sql.net
"frank" <anonymous@.discussions.microsoft.com> wrote in message
news:cab701c3ba43$10011f30$a601280a@.phx.gbl...
> i want to get all users database name
> but sp_helpdb return all database,and
> ms advice don't use system table ,how can i do this?
> thank you|||thanks a lot oj,it's so helpful
>--Original Message--
>It's okay to just query it. Updating it is really
something you don't want
>to do.
>btw, you could also use:
>select catalog_name [Name of the database where the
current user has
>permissions.]
>from information_schema.schemata
>where catalog_name not in
>('master','msdb','tempdb','model','northwind','pubs')
>--
>-oj
>RAC v2.2 & QALite!
>http://www.rac4sql.net
>
>"frank" <anonymous@.discussions.microsoft.com> wrote in
message
>news:cab701c3ba43$10011f30$a601280a@.phx.gbl...
>> i want to get all users database name
>> but sp_helpdb return all database,and
>> ms advice don't use system table ,how can i do this?
>> thank you
>
>.
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment