Re: view object

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Greg O (greg_at_No-SPAM*NO(SPAM@ag-software.com)
Date: 03/11/04


Date: Thu, 11 Mar 2004 22:49:56 +1100

Hi,
OK, your taking the wrong approach here. Under no circumstances should you
ever update system tables at all. It is dangerous and a sure fire way to
corrupt your database.

The correct way is to alway recompile your view and stored procedures(SP)
after you update the based tables. When a views and SP are created query
plans are developed for them. It is the query plans that make the view or
SP work so fast. By trying to circumvent this process you run the risk of
slowing if not stopping SQL. Even if you do set the system switch that
would allow you to update the system table I doubt the system you use the
text in sysobject as it would (I think) use the compiled version.

Oh let me repeat something. Under no circumstances should you ever update
system tables at all.

-- 
I hope this helped
Greg O
Save HOURS documenting your SQL Server! -- FREE Trial!
http://www.ag-software.com/ags_scribe_index.aspx
Crosstab Queries without OLAP -- 30 day free Trial!
http://www.ag-software.com/xp_ags_crosstab.aspx
"ip" <anonymous@discussions.microsoft.com> wrote in message
news:B88D1A08-0ADD-48F9-BE1A-E89FABAC2D4E@microsoft.com...
> sorry one thing i forgot to explain is ..
> the columns information of the view will be stored in syscolumns ..
>
> but i would like to know how to sync with the base table if the structure
of base table is altered, with out droping and re-creating the view.
>
> thanks..


Relevant Pages

  • Re: Writing updates from a wide DataTable
    ... SQL Server will also cache query plans for parameterized queries. ... too many i.e. not effectively caching very well. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: a question or two re fulltext queries
    ... Looking for a SQL Server replication book? ... one of which involves a fulltext index on a related table. ... i discovered today that a less selective CONTAINSclause: ... i examined the query plans and discovered that in the bad case the first ...
    (microsoft.public.sqlserver.fulltext)
  • a question or two re fulltext queries
    ... i'm using SQL Server 2000 ... i am looking at SQL for finding documents based on a couple of ... one of which involves a fulltext index on a related table. ... i examined the query plans and discovered that in the bad case the first ...
    (microsoft.public.sqlserver.fulltext)
  • Extended events: *_statement_completed dont fire for aborted statements
    ... The sp_statement_completed and sql_statement_completed extended events are supposed to occur for every completed statement and every completed stored procedure call, but they don't occur if the client aborts the batch (tested against SQL Server 2008 SP1). ... The SQL:StmtCompleted and SP:Completed events in SQL Profiler *do* fire for aborted statements. ... There is AFAICT no other event that fires in response to aborting a batch, so there is no way of distinguishing executions that haven't completed yet from executions that were aborted. ... Does anyone have suggestions for distinguishing aborted commands from still-executing ones? ...
    (microsoft.public.sqlserver.programming)
  • AppendChunk error 3265
    ... The erroneous call is trying to fire an update query on the SQL Server ... in the same VB application Only thing is here we insert an image record ...
    (microsoft.public.win32.programmer.ole)