Showing posts with label dbo. Show all posts
Showing posts with label dbo. Show all posts

Tuesday, March 20, 2012

Rebuild all indexes in SQL 2008...

Friends, we use a command like:
EXECUTE master.dbo.xp_sqlmaint '-D THEDB -WriteHistory -RebldIdx 100'
or the command-lie equivalent to rebuild all indexes, and recommend this
technique to our clients. Apparently, .xp_sqlmaint and sqlmaint.exe will be
gone for SQL 2008.
For SQL 2008, what technique do you prefer/recommend for rebuilding all
indexes in all tables?
We add new tables to our product regularly as we add features, so we'd
prefer a solution that does not required specifying commands on a per-table
basis. Thanks in advance for your words!
Very sincerely,
James Hunter Ross
Have a look at the help in BOL under sys.dm_db_index_physical_stats. There
is an example (all the way near the bottom) on how to reindex each index
based on the fragmentation level. If you really wish to rebuild them all
(which I don't recommend) you can cut out the checks for the frag levels.
Oh and welcome back. Haven't seen you here for a while.
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
news:uJVUiUjTIHA.5360@.TK2MSFTNGP03.phx.gbl...
> Friends, we use a command like:
> EXECUTE master.dbo.xp_sqlmaint '-D THEDB -WriteHistory -RebldIdx 100'
> or the command-lie equivalent to rebuild all indexes, and recommend this
> technique to our clients. Apparently, .xp_sqlmaint and sqlmaint.exe will
> be gone for SQL 2008.
> For SQL 2008, what technique do you prefer/recommend for rebuilding all
> indexes in all tables?
> We add new tables to our product regularly as we add features, so we'd
> prefer a solution that does not required specifying commands on a
> per-table basis. Thanks in advance for your words!
> Very sincerely,
> James Hunter Ross
>
|||Thank you Andrew, that's what I need!
Yeah, I've been hiding away with SQL Server Compact Edition 3.1/3.5 and lots
of Windows Mobile barcode scanning devices for the last year or more. The
CE newsgroups are not nearly as active! Our server-side stuff is being
redied for SQL Server 2008 so I've come up for air recently.
James
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OqwxMCkTIHA.4280@.TK2MSFTNGP06.phx.gbl...
> Have a look at the help in BOL under sys.dm_db_index_physical_stats. There
> is an example (all the way near the bottom) on how to reindex each index
> based on the fragmentation level. If you really wish to rebuild them all
> (which I don't recommend) you can cut out the checks for the frag levels.
> Oh and welcome back. Haven't seen you here for a while.
> --
> Andrew J. Kelly SQL MVP
> Solid Quality Mentors
>
> "James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
> news:uJVUiUjTIHA.5360@.TK2MSFTNGP03.phx.gbl...
>
|||Enjoy the sunshine while you can!! :-)
You may wish to limit the items you rebuild to those > 1000 pages (a number
I think Microsoft recommends IIRC). I would definitely not bother with
items < 100 pages.
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
news:uAvvw$kTIHA.4104@.TK2MSFTNGP05.phx.gbl...
> Thank you Andrew, that's what I need!
> Yeah, I've been hiding away with SQL Server Compact Edition 3.1/3.5 and
> lots of Windows Mobile barcode scanning devices for the last year or more.
> The CE newsgroups are not nearly as active! Our server-side stuff is
> being redied for SQL Server 2008 so I've come up for air recently.
> James
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:OqwxMCkTIHA.4280@.TK2MSFTNGP06.phx.gbl...
>
|||Good point Kevin, thanks. (I sure enjoyed just letting SQLMaint.exe figure
everything out, even it it did adopt a brutish approach.)
James
"TheSQLGuru" <kgboles@.earthlink.net> wrote in message
news:13nqoerop5shq62@.corp.supernews.com...
> Enjoy the sunshine while you can!! :-)
> You may wish to limit the items you rebuild to those > 1000 pages (a
> number I think Microsoft recommends IIRC). I would definitely not bother
> with items < 100 pages.
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
>
> "James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
> news:uAvvw$kTIHA.4104@.TK2MSFTNGP05.phx.gbl...
>

Rebuild all indexes in SQL 2008...

Friends, we use a command like:
EXECUTE master.dbo.xp_sqlmaint '-D THEDB -WriteHistory -RebldIdx 100'
or the command-lie equivalent to rebuild all indexes, and recommend this
technique to our clients. Apparently, .xp_sqlmaint and sqlmaint.exe will be
gone for SQL 2008.
For SQL 2008, what technique do you prefer/recommend for rebuilding all
indexes in all tables?
We add new tables to our product regularly as we add features, so we'd
prefer a solution that does not required specifying commands on a per-table
basis. Thanks in advance for your words!
Very sincerely,
James Hunter RossHave a look at the help in BOL under sys.dm_db_index_physical_stats. There
is an example (all the way near the bottom) on how to reindex each index
based on the fragmentation level. If you really wish to rebuild them all
(which I don't recommend) you can cut out the checks for the frag levels.
Oh and welcome back. Haven't seen you here for a while:).
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
news:uJVUiUjTIHA.5360@.TK2MSFTNGP03.phx.gbl...
> Friends, we use a command like:
> EXECUTE master.dbo.xp_sqlmaint '-D THEDB -WriteHistory -RebldIdx 100'
> or the command-lie equivalent to rebuild all indexes, and recommend this
> technique to our clients. Apparently, .xp_sqlmaint and sqlmaint.exe will
> be gone for SQL 2008.
> For SQL 2008, what technique do you prefer/recommend for rebuilding all
> indexes in all tables?
> We add new tables to our product regularly as we add features, so we'd
> prefer a solution that does not required specifying commands on a
> per-table basis. Thanks in advance for your words!
> Very sincerely,
> James Hunter Ross
>|||Thank you Andrew, that's what I need!
Yeah, I've been hiding away with SQL Server Compact Edition 3.1/3.5 and lots
of Windows Mobile barcode scanning devices for the last year or more. The
CE newsgroups are not nearly as active! Our server-side stuff is being
redied for SQL Server 2008 so I've come up for air recently.
James
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OqwxMCkTIHA.4280@.TK2MSFTNGP06.phx.gbl...
> Have a look at the help in BOL under sys.dm_db_index_physical_stats. There
> is an example (all the way near the bottom) on how to reindex each index
> based on the fragmentation level. If you really wish to rebuild them all
> (which I don't recommend) you can cut out the checks for the frag levels.
> Oh and welcome back. Haven't seen you here for a while:).
> --
> Andrew J. Kelly SQL MVP
> Solid Quality Mentors
>
> "James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
> news:uJVUiUjTIHA.5360@.TK2MSFTNGP03.phx.gbl...
>> Friends, we use a command like:
>> EXECUTE master.dbo.xp_sqlmaint '-D THEDB -WriteHistory -RebldIdx 100'
>> or the command-lie equivalent to rebuild all indexes, and recommend this
>> technique to our clients. Apparently, .xp_sqlmaint and sqlmaint.exe will
>> be gone for SQL 2008.
>> For SQL 2008, what technique do you prefer/recommend for rebuilding all
>> indexes in all tables?
>> We add new tables to our product regularly as we add features, so we'd
>> prefer a solution that does not required specifying commands on a
>> per-table basis. Thanks in advance for your words!
>> Very sincerely,
>> James Hunter Ross
>>
>|||Enjoy the sunshine while you can!! :-)
You may wish to limit the items you rebuild to those > 1000 pages (a number
I think Microsoft recommends IIRC). I would definitely not bother with
items < 100 pages.
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
news:uAvvw$kTIHA.4104@.TK2MSFTNGP05.phx.gbl...
> Thank you Andrew, that's what I need!
> Yeah, I've been hiding away with SQL Server Compact Edition 3.1/3.5 and
> lots of Windows Mobile barcode scanning devices for the last year or more.
> The CE newsgroups are not nearly as active! Our server-side stuff is
> being redied for SQL Server 2008 so I've come up for air recently.
> James
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:OqwxMCkTIHA.4280@.TK2MSFTNGP06.phx.gbl...
>> Have a look at the help in BOL under sys.dm_db_index_physical_stats.
>> There is an example (all the way near the bottom) on how to reindex each
>> index based on the fragmentation level. If you really wish to rebuild
>> them all (which I don't recommend) you can cut out the checks for the
>> frag levels.
>> Oh and welcome back. Haven't seen you here for a while:).
>> --
>> Andrew J. Kelly SQL MVP
>> Solid Quality Mentors
>>
>> "James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
>> news:uJVUiUjTIHA.5360@.TK2MSFTNGP03.phx.gbl...
>> Friends, we use a command like:
>> EXECUTE master.dbo.xp_sqlmaint '-D THEDB -WriteHistory -RebldIdx 100'
>> or the command-lie equivalent to rebuild all indexes, and recommend this
>> technique to our clients. Apparently, .xp_sqlmaint and sqlmaint.exe
>> will be gone for SQL 2008.
>> For SQL 2008, what technique do you prefer/recommend for rebuilding all
>> indexes in all tables?
>> We add new tables to our product regularly as we add features, so we'd
>> prefer a solution that does not required specifying commands on a
>> per-table basis. Thanks in advance for your words!
>> Very sincerely,
>> James Hunter Ross
>>
>|||Good point Kevin, thanks. (I sure enjoyed just letting SQLMaint.exe figure
everything out, even it it did adopt a brutish approach.)
James
"TheSQLGuru" <kgboles@.earthlink.net> wrote in message
news:13nqoerop5shq62@.corp.supernews.com...
> Enjoy the sunshine while you can!! :-)
> You may wish to limit the items you rebuild to those > 1000 pages (a
> number I think Microsoft recommends IIRC). I would definitely not bother
> with items < 100 pages.
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
>
> "James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
> news:uAvvw$kTIHA.4104@.TK2MSFTNGP05.phx.gbl...
>> Thank you Andrew, that's what I need!
>> Yeah, I've been hiding away with SQL Server Compact Edition 3.1/3.5 and
>> lots of Windows Mobile barcode scanning devices for the last year or
>> more. The CE newsgroups are not nearly as active! Our server-side stuff
>> is being redied for SQL Server 2008 so I've come up for air recently.
>> James
>>
>> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
>> news:OqwxMCkTIHA.4280@.TK2MSFTNGP06.phx.gbl...
>> Have a look at the help in BOL under sys.dm_db_index_physical_stats.
>> There is an example (all the way near the bottom) on how to reindex each
>> index based on the fragmentation level. If you really wish to rebuild
>> them all (which I don't recommend) you can cut out the checks for the
>> frag levels.
>> Oh and welcome back. Haven't seen you here for a while:).
>> --
>> Andrew J. Kelly SQL MVP
>> Solid Quality Mentors
>>
>> "James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
>> news:uJVUiUjTIHA.5360@.TK2MSFTNGP03.phx.gbl...
>> Friends, we use a command like:
>> EXECUTE master.dbo.xp_sqlmaint '-D THEDB -WriteHistory -RebldIdx 100'
>> or the command-lie equivalent to rebuild all indexes, and recommend
>> this technique to our clients. Apparently, .xp_sqlmaint and
>> sqlmaint.exe will be gone for SQL 2008.
>> For SQL 2008, what technique do you prefer/recommend for rebuilding all
>> indexes in all tables?
>> We add new tables to our product regularly as we add features, so we'd
>> prefer a solution that does not required specifying commands on a
>> per-table basis. Thanks in advance for your words!
>> Very sincerely,
>> James Hunter Ross
>>
>>
>

Rebuild all indexes in SQL 2008...

Friends, we use a command like:
EXECUTE master.dbo.xp_sqlmaint '-D THEDB -WriteHistory -RebldIdx 100'
or the command-lie equivalent to rebuild all indexes, and recommend this
technique to our clients. Apparently, .xp_sqlmaint and sqlmaint.exe will be
gone for SQL 2008.
For SQL 2008, what technique do you prefer/recommend for rebuilding all
indexes in all tables?
We add new tables to our product regularly as we add features, so we'd
prefer a solution that does not required specifying commands on a per-table
basis. Thanks in advance for your words!
Very sincerely,
James Hunter RossHave a look at the help in BOL under sys.dm_db_index_physical_stats. There
is an example (all the way near the bottom) on how to reindex each index
based on the fragmentation level. If you really wish to rebuild them all
(which I don't recommend) you can cut out the checks for the frag levels.
Oh and welcome back. Haven't seen you here for a while.
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
news:uJVUiUjTIHA.5360@.TK2MSFTNGP03.phx.gbl...
> Friends, we use a command like:
> EXECUTE master.dbo.xp_sqlmaint '-D THEDB -WriteHistory -RebldIdx 100'
> or the command-lie equivalent to rebuild all indexes, and recommend this
> technique to our clients. Apparently, .xp_sqlmaint and sqlmaint.exe will
> be gone for SQL 2008.
> For SQL 2008, what technique do you prefer/recommend for rebuilding all
> indexes in all tables?
> We add new tables to our product regularly as we add features, so we'd
> prefer a solution that does not required specifying commands on a
> per-table basis. Thanks in advance for your words!
> Very sincerely,
> James Hunter Ross
>|||Thank you Andrew, that's what I need!
Yeah, I've been hiding away with SQL Server Compact Edition 3.1/3.5 and lots
of Windows Mobile barcode scanning devices for the last year or more. The
CE newsgroups are not nearly as active! Our server-side stuff is being
redied for SQL Server 2008 so I've come up for air recently.
James
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:OqwxMCkTIHA.4280@.TK2MSFTNGP06.phx.gbl...
> Have a look at the help in BOL under sys.dm_db_index_physical_stats. There
> is an example (all the way near the bottom) on how to reindex each index
> based on the fragmentation level. If you really wish to rebuild them all
> (which I don't recommend) you can cut out the checks for the frag levels.
> Oh and welcome back. Haven't seen you here for a while.
> --
> Andrew J. Kelly SQL MVP
> Solid Quality Mentors
>
> "James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
> news:uJVUiUjTIHA.5360@.TK2MSFTNGP03.phx.gbl...
>|||Enjoy the sunshine while you can!! :-)
You may wish to limit the items you rebuild to those > 1000 pages (a number
I think Microsoft recommends IIRC). I would definitely not bother with
items < 100 pages.
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
news:uAvvw$kTIHA.4104@.TK2MSFTNGP05.phx.gbl...
> Thank you Andrew, that's what I need!
> Yeah, I've been hiding away with SQL Server Compact Edition 3.1/3.5 and
> lots of Windows Mobile barcode scanning devices for the last year or more.
> The CE newsgroups are not nearly as active! Our server-side stuff is
> being redied for SQL Server 2008 so I've come up for air recently.
> James
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:OqwxMCkTIHA.4280@.TK2MSFTNGP06.phx.gbl...
>|||Good point Kevin, thanks. (I sure enjoyed just letting SQLMaint.exe figure
everything out, even it it did adopt a brutish approach.)
James
"TheSQLGuru" <kgboles@.earthlink.net> wrote in message
news:13nqoerop5shq62@.corp.supernews.com...
> Enjoy the sunshine while you can!! :-)
> You may wish to limit the items you rebuild to those > 1000 pages (a
> number I think Microsoft recommends IIRC). I would definitely not bother
> with items < 100 pages.
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
>
> "James Hunter Ross" <james.ross@.oneilsoft.com> wrote in message
> news:uAvvw$kTIHA.4104@.TK2MSFTNGP05.phx.gbl...
>

Friday, March 9, 2012

re-associate "dbo" user with "sa" login

Once "dbo" user on a particular db has been associated with a specific login
( "Login1") , how to re-associate it with its default login ( "sa" ) ?
My ultimate goal is to add user "User1" to this db and associate it with
login "Login1" . but to do that apparently I need to de-associate "Login1"
login from "dbo" user.It sounds like the user is the database owner. You can
change the owner to sa by executing the following in the
database:
exec sp_changedbowner 'sa'
-Sue
On Thu, 27 Jul 2006 11:15:59 -0700, "John A Grandy"
<johnagrandy-at-yahoo-dot-com> wrote:

>Once "dbo" user on a particular db has been associated with a specific logi
n
>( "Login1") , how to re-associate it with its default login ( "sa" ) ?
>My ultimate goal is to add user "User1" to this db and associate it with
>login "Login1" . but to do that apparently I need to de-associate "Login1"
>login from "dbo" user.
>

Saturday, February 25, 2012

Reality check...

Why the "top 100 percent"? Or am I just retarded?
CREATE VIEW dbo.SmdsProductList
AS
SELECT TOP 100 PERCENT
{whole bunch of columns and expressions}
FROM
{whole bunch of joins}
WHERE ThisColumn = 1 AND ThatColumn IS NOT NULL
ORDER BY SomeOtherThing
Peace & happy computing,
Mike Labosh, MCSD
"When you kill a man, you're a murderer.
Kill many, and you're a conqueror.
Kill them all and you're a god." -- Dave MustaneIt's the only way to put an order by on a view.
"Mike Labosh" wrote:

> Why the "top 100 percent"? Or am I just retarded?
> CREATE VIEW dbo.SmdsProductList
> AS
> SELECT TOP 100 PERCENT
> {whole bunch of columns and expressions}
> FROM
> {whole bunch of joins}
> WHERE ThisColumn = 1 AND ThatColumn IS NOT NULL
> ORDER BY SomeOtherThing
>
>
> --
> Peace & happy computing,
> Mike Labosh, MCSD
> "When you kill a man, you're a murderer.
> Kill many, and you're a conqueror.
> Kill them all and you're a god." -- Dave Mustane
>
>|||'Top' is required because 'ORDER BY SomeOtherThing' has been used in the
Select Statement of the view. Here is related information from BOL (ORDER BY
clause, sorting rows):
'The ORDER BY clause is invalid in views, inline functions, derived tables,
and subqueries, unless TOP is also specified.'
Cheers and Feel happy :)
"Mike Labosh" wrote:

> Why the "top 100 percent"? Or am I just retarded?
> CREATE VIEW dbo.SmdsProductList
> AS
> SELECT TOP 100 PERCENT
> {whole bunch of columns and expressions}
> FROM
> {whole bunch of joins}
> WHERE ThisColumn = 1 AND ThatColumn IS NOT NULL
> ORDER BY SomeOtherThing
>
>
> --
> Peace & happy computing,
> Mike Labosh, MCSD
> "When you kill a man, you're a murderer.
> Kill many, and you're a conqueror.
> Kill them all and you're a god." -- Dave Mustane
>
>|||So they can put ORDER BY in the view (SQL Server won't allow you to put
ORDER BY in the VIEW unless you also specify a TOP clause).
Now why the person would need to have ORDER BY in the view, your guess is as
good as mine. Probably because they expect SELECT * FROM View to return
rows in the order they specified in the view's ORDER BY clause. But IIRC
that is not guaranteed, the optimizer is still free to return the rows in
any order it sees fit, since the actual query does not enforce any
constraint on the order (and will be more likely to in parallel operations,
which is why this behavior is seldom, if ever, planned for, when developing
on a 1-cpu box).
"Mike Labosh" <mlabosh@.hotmail.com> wrote in message
news:ew5LQmQ9FHA.3908@.TK2MSFTNGP10.phx.gbl...
> Why the "top 100 percent"? Or am I just retarded?
> CREATE VIEW dbo.SmdsProductList
> AS
> SELECT TOP 100 PERCENT
> {whole bunch of columns and expressions}
> FROM
> {whole bunch of joins}
> WHERE ThisColumn = 1 AND ThatColumn IS NOT NULL
> ORDER BY SomeOtherThing
>
>
> --
> Peace & happy computing,
> Mike Labosh, MCSD
> "When you kill a man, you're a murderer.
> Kill many, and you're a conqueror.
> Kill them all and you're a god." -- Dave Mustane
>|||In addition to what the others have answered... don't order views.
When you select from a view, then add the Order By clause.
One reason is that this is an SQL addition to the standards.
Why? because Acces allows it.
I know how much you love Acces developpers so this should be a good reason
for you not to use it.
The other is that you may want to select from the view with a different
Order By clause.
In this case, you just ordered in the View for nothing.
"Mike Labosh" <mlabosh@.hotmail.com> wrote in message
news:ew5LQmQ9FHA.3908@.TK2MSFTNGP10.phx.gbl...
> Why the "top 100 percent"? Or am I just retarded?
> CREATE VIEW dbo.SmdsProductList
> AS
> SELECT TOP 100 PERCENT
> {whole bunch of columns and expressions}
> FROM
> {whole bunch of joins}
> WHERE ThisColumn = 1 AND ThatColumn IS NOT NULL
> ORDER BY SomeOtherThing
>
>
> --
> Peace & happy computing,
> Mike Labosh, MCSD
> "When you kill a man, you're a murderer.
> Kill many, and you're a conqueror.
> Kill them all and you're a god." -- Dave Mustane
>|||> It's the only way to put an order by on a view.
DOH! Wow, and I've known that for years, too. Now I feel like an end-user.
--
Peace & happy computing,
Mike Labosh, MCSD
"When you kill a man, you're a murderer.
Kill many, and you're a conqueror.
Kill them all and you're a god." -- Dave Mustane|||> Why? because Acces allows it.
> I know how much you love Acces developpers so this should be a good reason
> for you not to use it.
> The other is that you may want to select from the view with a different
> Order By clause.
> In this case, you just ordered in the View for nothing.
heh. That's ok, I don't use this view anyway, I'm just trying to figure it
out. It's obviously something that somebody dragged-n-dropped together with
EM's designer. Looks like a window full of spaghetti.
--
Peace & happy computing,
Mike Labosh, MCSD
"When you kill a man, you're a murderer.
Kill many, and you're a conqueror.
Kill them all and you're a god." -- Dave Mustane|||And a nice way of inviting tempdb to the Query party.
ML|||On Tue, 29 Nov 2005 12:23:04 -0500, Mike Labosh wrote:

>Why the "top 100 percent"? Or am I just retarded?
>CREATE VIEW dbo.SmdsProductList
>AS
>SELECT TOP 100 PERCENT
> {whole bunch of columns and expressions}
>FROM
> {whole bunch of joins}
>WHERE ThisColumn = 1 AND ThatColumn IS NOT NULL
>ORDER BY SomeOtherThing
Hi Mike,
You're not retarded. This view is. Views, like tables, are by definition
NOT ordered.
ORDER BY in a VIEW is not permitted.
TOP ... ORDER BY is permitted in a view - has to be, to make sure that
the results of the TOP is predictable.
As a coincidal side-effect, SQL Server 2000 usually returns the rows in
the same order when selecting without ORDER BY from the view. Bad DBAs
and developers have abused this by using TOP 100 PERCENT ... ORDER BY in
a view.
I've already read at least one report of a view "losing it's ordering"
in SQL Server 2005. Who knows - the same might happen when the next SP
for 2000 appears.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)