For some reason I thought that SQL7 allowed this (SQL2k definitely does). But I guess with SQL7 you are gonna have to go directly against system tables. WARNING:Although this appears to work (I tried it on a SQL7 box), I can not guarantee this is a safe thing to do. Having said that, here's the code: USE mydbGOexec sp_configure 'allow updates', 1GO RECONFIGURE WITH OVERRIDEGO DECLARE @new_name varchar (100)DECLARE @old_name varchar (100)SELECT @old_name = 'old_name' , @new_name = 'new_name'UPDATE sysfiles1 set name = @new_name where name = @old_nameGOexec sp_configure 'allow updates', 0GO RECONFIGURE WITH OVERRIDEGO
Edited by - izaltsman on 01/07/2002 19:26:34