Database with bad views and procedures

  • Hi

    I created a test version of a database (as usual) by backing it up then restoring it with a different name.

    In this case, when I edit a View that refers to table XXXX, the view actually shows the table as XXX_1 and the table shows only the All Columns line which is ticked. No other columns can be seen (this is with COlumn Names selected). If I create a new view, I can select any of the tables in the datbase, but again all I see if the All Columns line and I can't see any individual columns.

    If I look at the stored procedures in Query Analyzer, I can edit the procedures. But no parameters or dependencies are ever shown - so I can't debug them either. The stored procedures work fine when EXECuted in Query Analyzer.

    Where do I start to fix this one?

    Thanks

    David

  • Try a dbcc checkcatalog as well as forcing a recompile on every table, view and SP.

    Also take a peek at the data in syscomments.

    Good Luck

    Henry

  • Hi Henry

    dbcc checkcatalog returns with no errors.

    Can't see a way to force re-compile on everything and there are 200 SPs, 90 tables etc.

    I don't see anything in syscomments that appears to apply to this problem.

    I think I will try to re-create the whole thing!

    Thanks for responding

    David

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply