I have a inherited a new database that uses a stored procedure to recompile all of the tables in the database and can find no documentation about recompiling tables only stored procedures. I do want this to mark procs for recompile and was told that when you mark a table for recompile that every dependent object is recompiled as well. Is this true and if so where are the docs that talk about this?
From Sybase docs:
An sp_recompile should be issued any time a new index is added or an update statistics. Dropping an index will cause an automatic recompile of all objects that are dependent on the table.
I'm not completely sure that the same goes for SQL server ( 6.5 - for sure), but probably there is something to look at.
Also sp_recompile looks for objname only in the current database and recompiles triggers and stored procedures only in the current database. sp_recompile does not affect objects in other databases that depend on the table.
You cannot use sp_recompile on system tables.
Edited by - EPol29 on 05/08/2002 11:39:39 AM