How do I determine the ownership of an object? (i.e. table)one way... to get the owner of the AUTHORS table...
Bruce
SELECT name from sysusers
where uid = OBJECTPROPERTY(OBJECT_ID
('authors'),'OwnerID')
>--Original Message--
>How do I determine the ownership of an object? (i.e.
table)
>.
>|||another way...
select TABLE_SCHEMA as 'owner'
from information_schema.tables
where TABLE_NAME = 'authors'
>--Original Message--
>one way... to get the owner of the AUTHORS table...
>Bruce
>SELECT name from sysusers
> where uid = OBJECTPROPERTY(OBJECT_ID
>('authors'),'OwnerID')
>
>>--Original Message--
>>How do I determine the ownership of an object? (i.e.
>table)
>>.
>.
>|||SELECT USER_NAME(OBJECTPROPERTY(OBJECT_ID('table_name'),'Ownerid'))
--
Thanks
Yogish|||Another way... Open up EM and look at the "owner" column...
Thanks,
Mike C
"Bruce de Freitas" <bruce@.defreitas.com> wrote in message
news:39e401c51f64$0ea67db0$a401280a@.phx.gbl...
> another way...
>
> select TABLE_SCHEMA as 'owner'
> from information_schema.tables
> where TABLE_NAME = 'authors'
>
>
>>--Original Message--
>>one way... to get the owner of the AUTHORS table...
>>Bruce
>>SELECT name from sysusers
>> where uid = OBJECTPROPERTY(OBJECT_ID
>>('authors'),'OwnerID')
>>
>>--Original Message--
>>How do I determine the ownership of an object? (i.e.
>>table)
>>.
>>.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment