Hi!! please kindly help me on this
How can set to my query that the particular is db_owner of that database ?
aside from using the command sp_helplogins.. thanksHi,
use the below script,
declare @.owner varchar(30)
select @.owner=a.name from sysdatabases b,syslogins a
where a.sid=b.sid
and b.name='master'
select @.owner
Thanks
Hari
MCDBA
"Mark Vergara" <markvergara007@.hotmail.com> wrote in message
news:OQ55Oi#DEHA.548@.TK2MSFTNGP10.phx.gbl...
> Hi!! please kindly help me on this
> How can set to my query that the particular is db_owner of that database ?
> aside from using the command sp_helplogins.. thanks
>|||Try:
EXEC sp_helpdb 'MyDatabase'
For all databases:
EXEC sp_helpdb
Hope this helps.
Dan Guzman
SQL Server MVP
"Mark Vergara" <markvergara007@.hotmail.com> wrote in message
news:OQ55Oi%23DEHA.548@.TK2MSFTNGP10.phx.gbl...
> Hi!! please kindly help me on this
> How can set to my query that the particular is db_owner of that database ?
> aside from using the command sp_helplogins.. thanks
>
No comments:
Post a Comment