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.

sp_rename

2 posts in General Discussion Last posting was on 2009-09-15 16:59:38.0Z
Yog Posted on 2009-09-15 14:36:45.0Z
Sender: 5f15.4aafa36e.1804289383@sybase.com
From: Yog
Newsgroups: sybase.public.ase.general
Subject: sp_rename
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4aafa67c.5f92.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 15 Sep 2009 07:36:45 -0700
X-Trace: forums-1-dub 1253025405 10.22.241.41 (15 Sep 2009 07:36:45 -0700)
X-Original-Trace: 15 Sep 2009 07:36:45 -0700, 10.22.241.41
Lines: 17
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28307
Article PK: 77550

I used sp_rename to change table names

Example :
exec dbname..sp_rename TABLEA, TABLEA_backup
exec dbname..sp_rename TABLEA_ORIG, TABLEA

I dropped the indexes and triggers from TableA_backup and
recreated it in TABLEA.

Question is do I have to recomplie the procedures and views
as well ? The table names doesn't look like changed in the
stored procedures and views?

The tables when opened using the front end app hangs over
(probably it couldn't find the sp and views ?

Thank you


J Posted on 2009-09-15 16:59:38.0Z
From: jtotally_bogus@sbcglobal.net (J)
Newsgroups: sybase.public.ase.general
Subject: Re: sp_rename
Reply-To: J@bogusemailAddress.com
Message-ID: <4aafc7ae.11657793@forums.sybase.com>
References: <4aafa67c.5f92.1681692777@sybase.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 15 Sep 2009 09:59:38 -0700
X-Trace: forums-1-dub 1253033978 10.22.241.152 (15 Sep 2009 09:59:38 -0700)
X-Original-Trace: 15 Sep 2009 09:59:38 -0700, vip152.sybase.com
Lines: 34
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28308
Article PK: 77552

On 15 Sep 2009 07:36:45 -0700, Yog wrote:

This is highlighted in yellow ! in the sp_rename docs the Sybase
manual:

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.sprocs/html/sprocs/sprocs185.htm

WARNING! Procedures, triggers, and views that depend on an object
whose name has been changed work until they are dropped and
re-created. Also, the old object name appears in query results until
the user changes and re-creates the procedure, trigger, or view.
Change the definitions of any dependent objects when you execute
sp_rename. Find dependent objects with sp_depends.

Jay

>I used sp_rename to change table names
>
>Example :
>exec dbname..sp_rename TABLEA, TABLEA_backup
>exec dbname..sp_rename TABLEA_ORIG, TABLEA
>
>I dropped the indexes and triggers from TableA_backup and
>recreated it in TABLEA.
>
>Question is do I have to recomplie the procedures and views
>as well ? The table names doesn't look like changed in the
>stored procedures and views?
>
>The tables when opened using the front end app hangs over
>(probably it couldn't find the sp and views ?
>
>Thank you