"bind to schema" on View, how to Search ?

  •  

    HI,

    I have a heap of views, I have turned "bind to schema" ON on some of them, is there a SELECT statement I can use on system table that will give me a list of views that I have "bind to schema" on cause I have forgotten which ones i did (ha) !

    Thanks

  • select * from INFORMATION_SCHEMA.TABLES where TABLE_TYPE='VIEW' and objectproperty(object_id('[' + TABLE_SCHEMA + '].[' + TABLE_NAME + ']'),'IsSchemaBound')=1

     

     

    regards,

    Mark Baekdal

    http://www.dbghost.com

    http://www.innovartis.co.uk

    +44 (0)208 241 1762

    Build, Comparison and Synchronization from Source Control = Database change management for SQL Server

     

     

  • Here's another one:

    select so.name, sc.text

    from sysobjects so

    inner join

    syscomments sc on

    so.id = sc.id where

    so.xtype = 'v' and

    sc.text like '%WITH SCHEMABINDING%'

    order by name







    **ASCII stupid question, get a stupid ANSI !!!**

  • Thanks heaps

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

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