'Script View as' missing

  • Hi, I have encountered an unusual issue where the option to 'Script View as' is missing, however the option to script out other objects exists.

    I am aware of the work around (found here :-)) where I can right-click on the DB and select Tasks -> Generate Scripts, but I would like to know why the 'Script View as' option is missing.

    Thanks,

  • tom.moore.777 89426 (12/11/2012)


    Hi, I have encountered an unusual issue where the option to 'Script View as' is missing, however the option to script out other objects exists.

    I am aware of the work around (found here :-)) where I can right-click on the DB and select Tasks -> Generate Scripts, but I would like to know why the 'Script View as' option is missing.

    Thanks,

    Are you talking about when you right click on a view in Object Explorer in SSMS?

  • Yes that's correct Lynn, when I right click on a view in Object Explorer in SSMS?

  • If you trying script the system view, you cannot in SQL 2008R2 and if it is user view then you should be able to see the option for script to..

    [font="Tahoma"]
    --SQLFRNDZ[/url]
    [/font]

  • What permissions does the user of the database you are using have?

  • It's not a System View, and yes I agree you should be able to 'Script View as' on user defined views, but the option is missing.

  • The user has the same permissions as other users who are able to see 'Script View as'.

    They can even script out other objects (Tables, Functions, Stored Procs etc), however the option is missing for Views 🙁

  • tom.moore.777 89426 (12/11/2012)


    The user has the same permissions as other users who are able to see 'Script View as'.

    They can even script out other objects (Tables, Functions, Stored Procs etc), however the option is missing for Views 🙁

    Check the permissions. It really sounds like this user doesn't rights to VIEW DEFINITION.

  • Look into Tools>Options>SQL server Object explorer>scripting

    [font="Tahoma"]
    --SQLFRNDZ[/url]
    [/font]

  • @dba@SQLFRNDZ

    Any particular option in Tools -> Options -> Object Scripting Options ?

    I have had a look in here but there is nothing directly related to Views, except 'Script View Columns', which hasn't resolved the matter.

  • Lynn Pettis (12/11/2012)


    tom.moore.777 89426 (12/11/2012)


    The user has the same permissions as other users who are able to see 'Script View as'.

    They can even script out other objects (Tables, Functions, Stored Procs etc), however the option is missing for Views 🙁

    Check the permissions. It really sounds like this user doesn't rights to VIEW DEFINITION.

    I have granted VIEW ANY DEFINITION TO <User>, but no change....

    Thanks for trying though, I think I settle for the workaround, Right-Click DB -> tasks -> Generate Scripts

Viewing 11 posts - 1 through 10 (of 10 total)

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