I can list all views in SQL Server 2008 by using
SELECT * FROM sys.views
What I want to do is to list only the views that are schema bound. How can I do this?
We can check if an object is schema-bound using the system function OBJECTPROPERTY (object_id , 'is_schema_bound').
Schema binding refers to the process of associating a database view to underlying tables in order to put indexes directly on the view. This may lead to great performance benefits when using the view; however, this tighter coupling is not without drawbacks.
SELECT *
FROM sys.views
WHERE OBJECTPROPERTY(object_id, 'IsSchemaBound') = 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With