Re: order of columns
From: Bonj (Bonj_at_discussions.microsoft.com)
Date: 10/05/04
- Next message: steve: "Obtaining Current Execution Status in T-SQL"
- Previous message: M K: "RE: Want to Order By a field not group by"
- In reply to: Patrick Akerblom: "Re: order of columns"
- Messages sorted by: [ date ] [ thread ]
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.
> >> >> >
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>
- Next message: steve: "Obtaining Current Execution Status in T-SQL"
- Previous message: M K: "RE: Want to Order By a field not group by"
- In reply to: Patrick Akerblom: "Re: order of columns"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|