Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sp_helptext and definition of view being NULL

When I try to EXEC sp_helptext 'dbo.VW_myname' I get the following:

There is no text for object 'dbo.VW_myname'.

And I get a NULL when i look at the definition of the view:

select definition
from sys.objects     o
join sys.sql_modules m on m.object_id = o.object_id
where o.object_id = object_id( 'dbo.VW_myname')
  and o.type      = 'V'

My question is two-fold: How come, I can't see the text behind the creation of that view and how can I find out how it is executed?

like image 278
Roger Steinberg Avatar asked Oct 19 '25 00:10

Roger Steinberg


1 Answers

This happens when you don't have the VIEW DEFINITION permission.

Ask your DBA to grant you this permission.

like image 145
Nickolay Avatar answered Oct 20 '25 14:10

Nickolay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!