Re: order of columns

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

From: Bonj (Bonj_at_discussions.microsoft.com)
Date: 10/05/04


Date: Tue, 5 Oct 2004 09:57:02 -0700

Ah right.... I'm not supposed to have sysadmin rights but I accidentally have
on one of the servers, so I did a trace and it confirmed that, yes, EM *does*
copy all the rows into another table, recreate the table, and then drop the
table again.
No wonder it's slow...

"Patrick Akerblom" wrote:

> SQL Server Profiler demands system admin rights. It's a great tool to trace
> what's happening inside SQL Server.
> You invoke Profiler using menu option SQL Server Profiler in Microsoft SQL
> Server menu group or from inside EM - meny item Tools.
>
> /Patrick
>
> "Bonj" <Bonj@discussions.microsoft.com> wrote in message
> news:5315E061-4E1D-4FF2-AB60-BDE0CA289DB4@microsoft.com...
> > Can you?
> > How do you invoke SQL Server Profiler, do you need admin rights to do
> > that?
> >
> >
> > "Patrick Akerblom" wrote:
> >
> >> You can use SQL Server Profiler to see how SQL Server do this. When I do
> >> it,
> >> I find DROP TABLE and CREATE table. To offload the data SQL Server uses a
> >> temporary table. Easy to confirm, try it yourself.
> >>
> >> /Patrick
> >>
> >> "Bonj" <Bonj@discussions.microsoft.com> wrote in message
> >> news:921F37D3-CA0C-4D64-85C8-DACF9F4B1E0C@microsoft.com...
> >> > I'm sure it's not you know, because the data still stays in the table,
> >> > which
> >> > is what I want!
> >> >
> >> >
> >> > "Patrick Akerblom" wrote:
> >> >
> >> >> The way enterprise manager is doing it is to recreate the table
> >> >> (drop/create
> >> >> table), putting the new column in the right place in DDL statment.
> >> >>
> >> >> /Patrick
> >> >> "Bonj" <Bonj@discussions.microsoft.com> wrote in message
> >> >> news:6CDE67DA-1AF1-444F-8633-E5280831C2AD@microsoft.com...
> >> >> > does anyone know, is it possible in T_SQL to do "alter table add
> >> >> > [newcolumn]"
> >> >> > but specify what order the column goes in, i.e. tell SQL server what
> >> >> > column I
> >> >> > want it to go before?
> >> >> > You can do it with enterprise manager so there must be a way of
> >> >> > doing
> >> >> > it
> >> >> > via
> >> >> > SQL.
> >> >> >
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>



Relevant Pages

  • RE: SBS 2003 Unable to connect to database STS_Config
    ... Uninstall the SQL server from the SBS 2k3 server from add/remove programs ... Uninstall Microsoft SQL Server Desktop Engine (SHAREPOINT) ... If AV software install any extra IIS virtual directory, ...
    (microsoft.public.windows.server.sbs)
  • Re: Memory issues with 64-bit SQL Server 2005 on 64-bit Win 2003 C
    ... I also checked the individual patch levels for the .NET drivers, SQL Server ... The SQL Server is fully patched, however Windows Update reported that the OS ... Lock pages in memory -- I guess you might have taken care of it as well. ...
    (microsoft.public.sqlserver.clustering)
  • RE: migrating from wmsde to sql server
    ... Click Start, point to All Programs\Microsoft SQL Server, and then click ... then click New SQL Server Registration. ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • RE: SBS 2003 Unable to connect to database STS_Config
    ... Uninstall the SQL server from the SBS 2k3 server from add/remove programs ... Uninstall Microsoft SQL Server Desktop Engine (SHAREPOINT) ... If AV software install any extra IIS virtual directory, ...
    (microsoft.public.windows.server.sbs)
  • Re: Best replication architecture?
    ... Looking for a SQL Server replication book? ... So if it is subscribing to Publisher 1, ...
    (microsoft.public.sqlserver.replication)