Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How to change the ownership of the object.

9 posts in General Discussion Last posting was on 2011-08-08 21:12:16.0Z
Sridhar Posted on 2011-08-05 05:22:13.0Z
Sender: 48a8.4e3b7c0d.1804289383@sybase.com
From: Sridhar
Newsgroups: sybase.public.ase.general
Subject: How to change the ownership of the object.
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4e3b7e05.499d.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 4 Aug 2011 22:22:13 -0700
X-Trace: forums-1-dub 1312521733 10.22.241.41 (4 Aug 2011 22:22:13 -0700)
X-Original-Trace: 4 Aug 2011 22:22:13 -0700, 10.22.241.41
Lines: 21
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30445
Article PK: 72623

Hi All,

how can change the ownership of the object with out drop and
recreting the same.
I tried below steps.

I have created 2 logins and added then to db(one as a user
in db and other as dbo alias).

logged in 2 sessions and in regular user session I i
verified sysobjects .. we hace login name column.. I have
update the same to NULL..

IN second session(dbo alias) when i try to run select * from
table name.

I was not able...


can some one suggest me.can we able to change the onwership
of the table.


Rob V [ Sybase ] Posted on 2011-08-05 07:08:38.0Z
From: "Rob V [ Sybase ]" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
Reply-To: rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
Organization: Sypron BV / TeamSybase / Sybase
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: How to change the ownership of the object.
References: <4e3b7e05.499d.1681692777@sybase.com>
In-Reply-To: <4e3b7e05.499d.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e3b96f6$1@forums-1-dub>
Date: 5 Aug 2011 00:08:38 -0700
X-Trace: forums-1-dub 1312528118 10.22.241.152 (5 Aug 2011 00:08:38 -0700)
X-Original-Trace: 5 Aug 2011 00:08:38 -0700, vip152.sybase.com
Lines: 51
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30447
Article PK: 72626


On 05-Aug-2011 07:22, Sridhar wrote:
> Hi All,
>
> how can change the ownership of the object with out drop and
> recreting the same.
> I tried below steps.
>
> I have created 2 logins and added then to db(one as a user
> in db and other as dbo alias).
>
> logged in 2 sessions and in regular user session I i
> verified sysobjects .. we hace login name column.. I have
> update the same to NULL..
>
> IN second session(dbo alias) when i try to run select * from
> table name.
>
> I was not able...
>
>
> can some one suggest me.can we able to change the onwership
> of the table.

Right now, there is no supported method to change the ownership of an
object.
The only option is to manually update sysobjects.uid, then reboot ASE,
and then sort out the permissions for that object which may be messed up.

In ASE 15.7 (release expected in September 2011) this will be supported
and you can run 'alter table...modify owner'.

--

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 15.0/12.5/12.0/11.5/11.0
and Replication Server 15.0.1/12.5 // TeamSybase

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks& Recipes for Sybase ASE" (ASE 15 edition)
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------


Sridhar Posted on 2011-08-05 07:12:58.0Z
Sender: 48a8.4e3b7c0d.1804289383@sybase.com
From: Sridhar
Newsgroups: sybase.public.ase.general
Subject: Re: How to change the ownership of the object.
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4e3b97fa.55d9.1681692777@sybase.com>
References: <4e3b96f6$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 5 Aug 2011 00:12:58 -0700
X-Trace: forums-1-dub 1312528378 10.22.241.41 (5 Aug 2011 00:12:58 -0700)
X-Original-Trace: 5 Aug 2011 00:12:58 -0700, 10.22.241.41
Lines: 60
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30448
Article PK: 72627


> On 05-Aug-2011 07:22, Sridhar wrote:
> > Hi All,
> >
> > how can change the ownership of the object with out drop
> > and recreting the same.
> > I tried below steps.
> >
> > I have created 2 logins and added then to db(one as a
> > user in db and other as dbo alias).
> >
> > logged in 2 sessions and in regular user session I i
> > verified sysobjects .. we hace login name column.. I
> > have update the same to NULL..
> >
> > IN second session(dbo alias) when i try to run select *
> > from table name.
> >
> > I was not able...
> >
> >
> > can some one suggest me.can we able to change the
> > onwership of the table.
>
> Right now, there is no supported method to change the
> ownership of an object.
> The only option is to manually update sysobjects.uid, then
> reboot ASE, and then sort out the permissions for that
> object which may be messed up.
>
> In ASE 15.7 (release expected in September 2011) this will
> be supported and you can run 'alter table...modify
> owner'.
>
> --
>
> HTH,
>
> Rob V.
> ----------------------------------------------------------
> ------- Rob Verschoor
>
> Certified Sybase Professional DBA for ASE
> 15.0/12.5/12.0/11.5/11.0 and Replication Server
> 15.0.1/12.5 // TeamSybase
>
> Author of Sybase books (order online at
> www.sypron.nl/shop): "Tips, Tricks& Recipes for Sybase
> ASE" (ASE 15 edition) "The Complete Sybase ASE Quick
> Reference Guide" "The Complete Sybase Replication Server
> Quick Reference Guide"
>
> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> @rob_verschoor Sypron B.V., The Netherlands | Chamber of
> Commerce 27138666
> ----------------------------------------------------------
> -------
>

Thanks Rob..I will try the way you suggested in any of my
DEV enev...


sybanva Posted on 2011-08-07 05:29:59.0Z
From: sybanva <sybanva@gmail.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: How to change the ownership of the object.
References: <4e3b7e05.499d.1681692777@sybase.com> <4e3b96f6$1@forums-1-dub>
In-Reply-To: <4e3b96f6$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e3e22d7$1@forums-1-dub>
Date: 6 Aug 2011 22:29:59 -0700
X-Trace: forums-1-dub 1312694999 10.22.241.152 (6 Aug 2011 22:29:59 -0700)
X-Original-Trace: 6 Aug 2011 22:29:59 -0700, vip152.sybase.com
Lines: 40
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30451
Article PK: 72629

Thank Rob for sharing the new feature of ASE 15.7.

It was great advantage for every one to avoid manual update of system
table.

w8ing for ASE 15.7 new release !!

On 05-08-2011 12:38, Rob V [ Sybase ] wrote:
> On 05-Aug-2011 07:22, Sridhar wrote:
>> Hi All,
>>
>> how can change the ownership of the object with out drop and
>> recreting the same.
>> I tried below steps.
>>
>> I have created 2 logins and added then to db(one as a user
>> in db and other as dbo alias).
>>
>> logged in 2 sessions and in regular user session I i
>> verified sysobjects .. we hace login name column.. I have
>> update the same to NULL..
>>
>> IN second session(dbo alias) when i try to run select * from
>> table name.
>>
>> I was not able...
>>
>>
>> can some one suggest me.can we able to change the onwership
>> of the table.
>
> Right now, there is no supported method to change the ownership of an
> object.
> The only option is to manually update sysobjects.uid, then reboot ASE,
> and then sort out the permissions for that object which may be messed up.
>
> In ASE 15.7 (release expected in September 2011) this will be supported
> and you can run 'alter table...modify owner'.
>


George Brink Posted on 2011-08-08 14:59:41.0Z
From: George Brink <siberianowl@yahoo.com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: How to change the ownership of the object.
References: <4e3b7e05.499d.1681692777@sybase.com> <4e3b96f6$1@forums-1-dub>
In-Reply-To: <4e3b96f6$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e3ff9dd$1@forums-1-dub>
Date: 8 Aug 2011 07:59:41 -0700
X-Trace: forums-1-dub 1312815581 10.22.241.152 (8 Aug 2011 07:59:41 -0700)
X-Original-Trace: 8 Aug 2011 07:59:41 -0700, vip152.sybase.com
Lines: 10
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30452
Article PK: 72632


On 8/5/2011 3:08 AM, Rob V [ Sybase ] wrote:
>
> In ASE 15.7 (release expected in September 2011) this will be supported
> and you can run 'alter table...modify owner'.
>

Rob,
Will it change just the owner of the object or will it change object's
creator as well?


Rob V [ Sybase ] Posted on 2011-08-08 17:18:51.0Z
From: "Rob V [ Sybase ]" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
Reply-To: rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
Organization: Sypron BV / TeamSybase / Sybase
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: How to change the ownership of the object.
References: <4e3b7e05.499d.1681692777@sybase.com> <4e3b96f6$1@forums-1-dub> <4e3ff9dd$1@forums-1-dub>
In-Reply-To: <4e3ff9dd$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e401a7b$1@forums-1-dub>
Date: 8 Aug 2011 10:18:51 -0700
X-Trace: forums-1-dub 1312823931 10.22.241.152 (8 Aug 2011 10:18:51 -0700)
X-Original-Trace: 8 Aug 2011 10:18:51 -0700, vip152.sybase.com
Lines: 36
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30455
Article PK: 72634


On 08-Aug-2011 16:59, George Brink wrote:
> On 8/5/2011 3:08 AM, Rob V [ Sybase ] wrote:
>>
>> In ASE 15.7 (release expected in September 2011) this will be supported
>> and you can run 'alter table...modify owner'.
>>
>
> Rob,
> Will it change just the owner of the object or will it change object's
> creator as well?
>

Not sure I understand the question? The sysobjects.uid column represents
both.

--

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor


Certified Sybase Professional DBA for ASE 15.0/12.5/12.0/11.5/11.0
and Replication Server 15.0.1/12.5 // TeamSybase

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks& Recipes for Sybase ASE" (ASE 15 edition)
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------


"Mark A. Parsons" <iron_horse Posted on 2011-08-08 19:25:53.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: How to change the ownership of the object.
References: <4e3b7e05.499d.1681692777@sybase.com> <4e3b96f6$1@forums-1-dub> <4e3ff9dd$1@forums-1-dub> <4e401a7b$1@forums-1-dub>
In-Reply-To: <4e401a7b$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e403841$1@forums-1-dub>
Date: 8 Aug 2011 12:25:53 -0700
X-Trace: forums-1-dub 1312831553 10.22.241.152 (8 Aug 2011 12:25:53 -0700)
X-Original-Trace: 8 Aug 2011 12:25:53 -0700, vip152.sybase.com
Lines: 19
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30456
Article PK: 72635

I'm guessing he's referring to the sysobjects.loginame column ... which is sometimes [not] set ... and which, when set
'incorrectly', can lead to cross-database permission validation issues (hence one scenario where an 'easy' way to change
the loginame column would be handy).

On 08/08/2011 13:18, Rob V [ Sybase ] wrote:
> On 08-Aug-2011 16:59, George Brink wrote:
>> On 8/5/2011 3:08 AM, Rob V [ Sybase ] wrote:
>>>
>>> In ASE 15.7 (release expected in September 2011) this will be supported
>>> and you can run 'alter table...modify owner'.
>>>
>>
>> Rob,
>> Will it change just the owner of the object or will it change object's creator as well?
>>
>
> Not sure I understand the question? The sysobjects.uid column represents both.
>


George Brink Posted on 2011-08-08 19:39:13.0Z
From: George Brink <siberianowl@yahoo.com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: How to change the ownership of the object.
References: <4e3b7e05.499d.1681692777@sybase.com> <4e3b96f6$1@forums-1-dub> <4e3ff9dd$1@forums-1-dub> <4e401a7b$1@forums-1-dub>
In-Reply-To: <4e401a7b$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e403b61$1@forums-1-dub>
Date: 8 Aug 2011 12:39:13 -0700
X-Trace: forums-1-dub 1312832353 10.22.241.152 (8 Aug 2011 12:39:13 -0700)
X-Original-Trace: 8 Aug 2011 12:39:13 -0700, vip152.sybase.com
Lines: 22
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30457
Article PK: 72636


On 8/8/2011 1:18 PM, Rob V [ Sybase ] wrote:
> On 08-Aug-2011 16:59, George Brink wrote:
>> On 8/5/2011 3:08 AM, Rob V [ Sybase ] wrote:
>>>
>>> In ASE 15.7 (release expected in September 2011) this will be supported
>>> and you can run 'alter table...modify owner'.
>>>
>>
>> Rob,
>> Will it change just the owner of the object or will it change object's
>> creator as well?
>>
>
> Not sure I understand the question? The sysobjects.uid column represents
> both.
>

No, object creator is stored in sysobjects.login field.
It is significant, because the sysobjects.login is used in permission
inheritance between databases.

Look for my topic "ASE15.0.3 permissions between databases" from April
2010, we discussed the problems with "sysobjects.uid vs sysobjects.login"


Rob V [ Sybase ] Posted on 2011-08-08 21:12:16.0Z
From: "Rob V [ Sybase ]" <rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY>
Reply-To: rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
Organization: Sypron BV / TeamSybase / Sybase
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: How to change the ownership of the object.
References: <4e3b7e05.499d.1681692777@sybase.com> <4e3b96f6$1@forums-1-dub> <4e3ff9dd$1@forums-1-dub> <4e401a7b$1@forums-1-dub> <4e403b61$1@forums-1-dub>
In-Reply-To: <4e403b61$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4e405130$1@forums-1-dub>
Date: 8 Aug 2011 14:12:16 -0700
X-Trace: forums-1-dub 1312837936 10.22.241.152 (8 Aug 2011 14:12:16 -0700)
X-Original-Trace: 8 Aug 2011 14:12:16 -0700, vip152.sybase.com
Lines: 48
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:30458
Article PK: 72638


On 08-Aug-2011 21:39, George Brink wrote:
> On 8/8/2011 1:18 PM, Rob V [ Sybase ] wrote:
>> On 08-Aug-2011 16:59, George Brink wrote:
>>> On 8/5/2011 3:08 AM, Rob V [ Sybase ] wrote:
>>>>
>>>> In ASE 15.7 (release expected in September 2011) this will be
>>>> supported
>>>> and you can run 'alter table...modify owner'.
>>>>
>>>
>>> Rob,
>>> Will it change just the owner of the object or will it change object's
>>> creator as well?
>>>
>>
>> Not sure I understand the question? The sysobjects.uid column represents
>> both.
>>
> No, object creator is stored in sysobjects.login field.
> It is significant, because the sysobjects.login is used in permission
> inheritance between databases.
>
> Look for my topic "ASE15.0.3 permissions between databases" from April
> 2010, we discussed the problems with "sysobjects.uid vs sysobjects.login"

I see what you mean. There is a syntax option to modify only the login
name (aka. the 'concrete owner').

--

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 15.0/12.5/12.0/11.5/11.0
and Replication Server 15.0.1/12.5 // TeamSybase

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks& Recipes for Sybase ASE" (ASE 15 edition)
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------