Re: 21776 Error by EM when a view column name is changed.

From: Andrew J. Kelly (sqlmvpnooospam_at_shadhawk.com)
Date: 09/01/05


Date: Wed, 31 Aug 2005 22:52:50 -0400

All you should have needed to do after issuing sp_refreshview was to refresh
that node in EM. But restarting works too<g>.

-- 
Andrew J. Kelly  SQL MVP
"BlairH" <BlairH@discussions.microsoft.com> wrote in message 
news:5EF6E77B-79A3-46AB-8070-3842A950407F@microsoft.com...
> Thanks very much Andrew.  That's exactly what I was looking for.  In
> addition, it apears that you have to restart EM in order for the fix to 
> take
> effect. (but it does)
>
> Thanks again.
> -- 
> Best regards,
> Blair
>
>
> "Andrew J. Kelly" wrote:
>
>> Check out sp_refreshview in BooksOnLine.
>>
>>
>> -- 
>> Andrew J. Kelly  SQL MVP
>>
>>
>> "BlairH" <BlairH@discussions.microsoft.com> wrote in message
>> news:8AB571A3-779F-497A-A707-703B66FEF13E@microsoft.com...
>> >I am wondering if there is a sp or some other method to fix an issue 
>> >that
>> > arises when you change the name of a column in a view.
>> >
>> > The scenario is:
>> > 1. Create the view
>> > 2. Alter the view, changing the name of one of the fields
>> > 3. Within EM, select the view | Properties | permissions, and then 
>> > check
>> > the
>> > column permissions - you get an error "21776 [SQL-DMO] The name
>> > '<newcolumnname>' was not found in the columns collection..."
>> >
>> > The BOL item on ALTER VIEW warns that if you have permissions defined 
>> > on a
>> > view column, and then change the name of the column, the permissions do
>> > not
>> > follow, BUT, in addition to this, you cannot even see the NEW column to
>> > assign the permissions again in the above scenario.
>> >
>> > Has anyone run into this?
>> >
>> > Thanks
>> >
>> > -- 
>> > Best regards,
>> > Blair
>>
>>
>> 


Relevant Pages

  • Re: SQL 2005 user limit
    ... Well those are pretty open permissions. ... Andrew J. Kelly SQL MVP ... "Marcin S." ... >> Andrew J. Kelly SQL MVP ...
    (microsoft.public.sqlserver.security)
  • Re: Extremely high % Disk Time .. How is this possible??
    ... Andrew J. Kelly SQL MVP ... > Slicing them into logical drives may look better but it does not increase ... I prefer to look at disk queue ... >>> Andrew J. Kelly SQL MVP ...
    (microsoft.public.sqlserver.clustering)
  • Re: SQL 2005 user limit
    ... Marcin S. "Andrew J. Kelly" wrote:> What permissions do these users have? ... > Andrew J. Kelly SQL MVP ... >>> Andrew J. Kelly SQL MVP ...
    (microsoft.public.sqlserver.security)
  • Re: Performance really poor if calling data from sql clients
    ... Andrew J. Kelly SQL MVP ... The TCP connection is running from the client ... On a computer running the test which is not the database hosting ...
    (microsoft.public.sqlserver.clients)
  • Re: Procedure execution problem - Clients performances
    ... Again check the parameters and plan with a trace. ... Andrew J. Kelly SQL MVP ... Dim conn As New SqlConnection ...
    (microsoft.public.sqlserver.clients)