Question : Rename table with dependancies in SQL Server 2005

I have made primary key and indexing changes to a relatively large table in my database and now I need to rename the old table so I can rename the new table to replace it.

The problem comes in with the fact that the old table has about 20 stored procedures that reference the table. SQL Server is complaining about the dependancies when I try to rename it.

How do I get around this?

Answer : Rename table with dependancies in SQL Server 2005

Views?  I don't think so.

Try this:

select o.name as ObjName, r.name as ReferencedObj
from sys.sql_dependencies d
join sys.objects o on o.object_id=d.object_id
join sys.objects r on r.object_id=d.referenced_major_id
where d.class=1
AND r.name = 'TicketDetail'
Random Solutions  
 
programming4us programming4us