I have installed MSDE 2000A using the ini file method of supplying
settings. I supplied values for the following settings:
[Options]
ALLOWXDBCHAINING=3D0
BLANKSAPWD=3D1
COLLATION=3DLatin1_General_CI_AS
DATADIR=3DC:\Program Files\Microsoft SQL Server\MSSQL$HipMSDE\Data\
DISABLENETWORKPROTOCOLS=3D1
INSTANCENAME=3D"HipMSDE" SAPWD=3D"XXXX" SECURITYMODE=3DSQL
TARGETDIR=3DC:\Program Files\Microsoft SQL Server\MSSQL$HipMSDE\Binn\
Since I was unable to perform this install using the command line:
"Setup.exe /settings Setup.ini"
because it kept telling me the path was not valid, I double clicked on
Setup.exe and it took all the settings in Setup.ini anyway.
In attempting to upgrade to SP3a I attempted to supply the following
settings in an ini file.
[Options]
ALLOWXDBCHAINING=3D0
BLANKSAPWD=3D1
COLLATION=3DLatin1_General_CI_AS
DATADIR=3DC:\Program Files\Microsoft SQL Server\MSSQL$HipMSDE\Data\
DISABLENETWORKPROTOCOLS=3D1
INSTANCENAME=3D"HipMSDE" SAPWD=3D"XXXX" SECURITYMODE=3DSQL
TARGETDIR=3DC:\Program Files\Microsoft SQL Server\MSSQL$HipMSDE\Binn\
UPGRADE=3D1 UPGRADEUSER=3D"XXXXUpgr" UPGRADEPWD=3D"XXXXUpgr"
Using the same command line but this time for the SP3a setup file, an
installation does not occur. Trying the same double click too does not
work. Instead I get is the following instructions:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D
Windows =AE Installer. V 3.00.3790.2180
msiexec /Option <Required Parameter> [Optional Parameter]
Install Options
</package | /i> <Product.msi>
Installs or configures a product
/a <Product.msi>
Administrative install - Installs a product on the network
/j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]
Advertises a product - m to all users, u to current user
</uninstall | /x> <Product.msi | ProductCode>
Uninstalls the product
Display Options
/quiet
Quiet mode, no user interaction
/passive
Unattended mode - progress bar only
/q[n|b|r|f]
Sets user interface level
n - No UI
b - Basic UI
r - Reduced UI
f - Full UI (default)
/help
Help information
Restart Options
/norestart
Do not restart after the installation is complete
/promptrestart
Prompts the user for restart if necessary
/forcerestart
Always restart the computer after installation
Logging Options
/l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>
i - Status messages
w - Nonfatal warnings
e - All error messages
a - Start up of actions
r - Action-specific records
u - User requests
c - Initial UI parameters
m - Out-of-memory or fatal exit information
o - Out-of-disk-space messages
p - Terminal properties
v - Verbose output
x - Extra debugging information
+ - Append to existing log file
! - Flush each line to the log
* - Log all information, except for v and x options
/log <LogFile>
Equivalent of /l* <LogFile>
Update Options
/update <Update1.msp>[;Update2.msp]
Applies update(s)
/uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi |
ProductCode>
Remove update(s) for a product
Repair Options
/f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>
Repairs a product
p - only if file is missing
o - if file is missing or an older version is installed (default)
e - if file is missing or an equal or older version is installed
d - if file is missing or a different version is installed
c - if file is missing or checksum does not match the calculated
value
a - forces all files to be reinstalled
u - all required user-specific registry entries (default)
m - all required computer-specific registry entries (default)
s - all existing shortcuts (default)
v - runs from source and recaches local package
Setting Public Properties
[PROPERTY=3DPropertyValue]
Consult the Windows =AE Installer SDK for additional documentation on
the
command line syntax.
Copyright =A9 Microsoft Corporation. All rights reserved.
Portions of this software are based in part on the work of the
Independent JPEG Group.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D
These windows installer instructions and the wealth of SP3a
documentation only leads me to more confusion. I've spent two days
trying to meticulously decypher and make sense of it. I'm lost! Can
someone please help sort this out for me?
BTW I have successfully updated to SP3a for both of my SQL Server 2000
database installations. It's this MSDE that I am having difficulty
undersatnding
hi,
dbuchanan wrote:
> I have installed MSDE 2000A using the ini file method of supplying
> settings. I supplied values for the following settings:
> [Options]
> ALLOWXDBCHAINING=0
> BLANKSAPWD=1
> COLLATION=Latin1_General_CI_AS
> DATADIR=C:\Program Files\Microsoft SQL Server\MSSQL$HipMSDE\Data\
> DISABLENETWORKPROTOCOLS=1
> INSTANCENAME="HipMSDE" SAPWD="XXXX" SECURITYMODE=SQL
> TARGETDIR=C:\Program Files\Microsoft SQL Server\MSSQL$HipMSDE\Binn\
> Since I was unable to perform this install using the command line:
> "Setup.exe /settings Setup.ini"
> because it kept telling me the path was not valid, I double clicked on
> Setup.exe and it took all the settings in Setup.ini anyway.
> In attempting to upgrade to SP3a I attempted to supply the following
> settings in an ini file.
> [Options]
> ALLOWXDBCHAINING=0
> BLANKSAPWD=1
> COLLATION=Latin1_General_CI_AS
> DATADIR=C:\Program Files\Microsoft SQL Server\MSSQL$HipMSDE\Data\
> DISABLENETWORKPROTOCOLS=1
> INSTANCENAME="HipMSDE" SAPWD="XXXX" SECURITYMODE=SQL
> TARGETDIR=C:\Program Files\Microsoft SQL Server\MSSQL$HipMSDE\Binn\
> UPGRADE=1 UPGRADEUSER="XXXXUpgr" UPGRADEPWD="XXXXUpgr"
> Using the same command line but this time for the SP3a setup file, an
> installation does not occur. Trying the same double click too does not
> work. Instead I get is the following instructions:
>...
MSDE 2000A is already updated at sp3a level and you do not need to upgrade
it..
if you are experimenting troubles with the ini file, you can directly
provide those parameters to the setup.exe bootstrap installer in the form
c:\..\>setup.exe ALLOWXDBCHAINING=0 COLLATION="Latin1_General_CI_AS"
DATADIR="C:\Program Files\Microsoft SQL Server\MSSQL$HipMSDE\Data\"
DISABLENETWORKPROTOCOLS=1 INSTANCENAME="HipMSDE" SAPWD="XXXX"
SECURITYMODE=SQL TARGETDIR="C:\Program Files\Microsoft SQL
Server\MSSQL$HipMSDE\Binn\"
all on the same line
you provide BLANKSAPWD=1 and SAPWD="XXXX" parameters, and those should be
mutual exclusive, so please try removing BLANKSAPWD=1
> UPGRADE=1 UPGRADEUSER="XXXXUpgr" UPGRADEPWD="XXXXUpgr"
are not required as you do not have to upgrade...
please always add the
/L*v "c:\MsdeLog.txt"
parameter too in order to verbose log all the installation process, that
will result in an about 2mb txt log file you can inspect, in case of
problems, for
RETURN VALUE 3
entries, that indicate problems and, about 10/20 lines before or after each
entry a more descriptive (often cryptic) explanation of the problem is
reported
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
Showing posts with label sp3a. Show all posts
Showing posts with label sp3a. Show all posts
Thursday, March 22, 2012
Friday, March 9, 2012
Differente SPs versions
Hi people.
I would like to know if anybody knows if there's any
problem use SQL Server 2000 with SP2 and SQL 2000 Client
with SP3a.
Tks in advance.It seems to work OK without any issues. Do you find any problems?
--
- Anith
( Please reply to newsgroups only )|||Tks for your help.
>--Original Message--
>I have installations with Server on SP2 & client machines
with SP3a and I
>haven't found any issues either with setup or
connectivity. Before
>installing it, make sure you read through the readme.htm
that comes with
>SP3a for any additional information.
>--
>- Anith
>( Please reply to newsgroups only )
>
>.
>|||No... I didn't install it yet. But is it recommended?
>--Original Message--
>It seems to work OK without any issues. Do you find any
problems?
>--
>- Anith
>( Please reply to newsgroups only )
>
>.
>|||The only problem you may have would be related to DTS packages. If a client
machine (with SP3) creates or modifies a DTS package and saves it back to
the server with SP2 on it, it is conceivable that the package will no
longer run or may not be able to be modified by a users using the SP2
version of the SQL Server clients.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||I have installations with Server on SP2 & client machines with SP3a and I
haven't found any issues either with setup or connectivity. Before
installing it, make sure you read through the readme.htm that comes with
SP3a for any additional information.
--
- Anith
( Please reply to newsgroups only )|||Tks Rand!!!
>--Original Message--
>The only problem you may have would be related to DTS
packages. If a client
>machine (with SP3) creates or modifies a DTS package and
saves it back to
>the server with SP2 on it, it is conceivable that the
package will no
>longer run or may not be able to be modified by a users
using the SP2
>version of the SQL Server clients.
>Rand
>This posting is provided "as is" with no warranties and
confers no rights.
>.
>
I would like to know if anybody knows if there's any
problem use SQL Server 2000 with SP2 and SQL 2000 Client
with SP3a.
Tks in advance.It seems to work OK without any issues. Do you find any problems?
--
- Anith
( Please reply to newsgroups only )|||Tks for your help.
>--Original Message--
>I have installations with Server on SP2 & client machines
with SP3a and I
>haven't found any issues either with setup or
connectivity. Before
>installing it, make sure you read through the readme.htm
that comes with
>SP3a for any additional information.
>--
>- Anith
>( Please reply to newsgroups only )
>
>.
>|||No... I didn't install it yet. But is it recommended?
>--Original Message--
>It seems to work OK without any issues. Do you find any
problems?
>--
>- Anith
>( Please reply to newsgroups only )
>
>.
>|||The only problem you may have would be related to DTS packages. If a client
machine (with SP3) creates or modifies a DTS package and saves it back to
the server with SP2 on it, it is conceivable that the package will no
longer run or may not be able to be modified by a users using the SP2
version of the SQL Server clients.
Rand
This posting is provided "as is" with no warranties and confers no rights.|||I have installations with Server on SP2 & client machines with SP3a and I
haven't found any issues either with setup or connectivity. Before
installing it, make sure you read through the readme.htm that comes with
SP3a for any additional information.
--
- Anith
( Please reply to newsgroups only )|||Tks Rand!!!
>--Original Message--
>The only problem you may have would be related to DTS
packages. If a client
>machine (with SP3) creates or modifies a DTS package and
saves it back to
>the server with SP2 on it, it is conceivable that the
package will no
>longer run or may not be able to be modified by a users
using the SP2
>version of the SQL Server clients.
>Rand
>This posting is provided "as is" with no warranties and
confers no rights.
>.
>
Wednesday, March 7, 2012
different results with select count(*)
Hi,
Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
quad processor...
Table with (4) indexes: fields a,b,c,d
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
generates different results (!)
We have dropped and rebuilt the indexes.
The table in question has approx. 2 million rows. The
count(id) query is treturning 11 million rows.
Thoughts?
Thanks in advance,
DanHi,
The count will change based on the number of null values inside the table.
Select count(colmn) will count only the not null values inside the table.
To have the full record count use
select count(*) from table_name
Thanks
Hari
MCDBA
"dan" <djlucarelli@.pa1call.org> wrote in message
news:43e001c4732c$1a133c40$a301280a@.phx.gbl...
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan|||> Thoughts?
Yes, don't allow NULLs, or use SELECT COUNT(*)
http://www.aspfaq.com/
(Reverse address to reply.)|||In addition to the other responses, you may have misconceptions about
how SQL-Server processes a query.
If NULLs are disallowed in the columns id, a, b, c and d, then the
queries
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
will probably all be satisfied with the same query plan. The smallest
index will be used to count the total number of rows. It is highly
unlikely that the query "select count(a) from table" will use the index
on a, and the query "select count(b) from table" the index on b...
If the columns allow and contain NULLs: see the other responses.
Gert-Jan
dan wrote:
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan
(Please reply only to the newsgroup)
Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
quad processor...
Table with (4) indexes: fields a,b,c,d
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
generates different results (!)
We have dropped and rebuilt the indexes.
The table in question has approx. 2 million rows. The
count(id) query is treturning 11 million rows.
Thoughts?
Thanks in advance,
DanHi,
The count will change based on the number of null values inside the table.
Select count(colmn) will count only the not null values inside the table.
To have the full record count use
select count(*) from table_name
Thanks
Hari
MCDBA
"dan" <djlucarelli@.pa1call.org> wrote in message
news:43e001c4732c$1a133c40$a301280a@.phx.gbl...
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan|||> Thoughts?
Yes, don't allow NULLs, or use SELECT COUNT(*)
http://www.aspfaq.com/
(Reverse address to reply.)|||In addition to the other responses, you may have misconceptions about
how SQL-Server processes a query.
If NULLs are disallowed in the columns id, a, b, c and d, then the
queries
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
will probably all be satisfied with the same query plan. The smallest
index will be used to count the total number of rows. It is highly
unlikely that the query "select count(a) from table" will use the index
on a, and the query "select count(b) from table" the index on b...
If the columns allow and contain NULLs: see the other responses.
Gert-Jan
dan wrote:
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan
(Please reply only to the newsgroup)
different results with select count(*)
Hi,
Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
quad processor...
Table with (4) indexes: fields a,b,c,d
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
generates different results (!)
We have dropped and rebuilt the indexes.
The table in question has approx. 2 million rows. The
count(id) query is treturning 11 million rows.
Thoughts?
Thanks in advance,
DanHi,
The count will change based on the number of null values inside the table.
Select count(colmn) will count only the not null values inside the table.
To have the full record count use
select count(*) from table_name
Thanks
Hari
MCDBA
"dan" <djlucarelli@.pa1call.org> wrote in message
news:43e001c4732c$1a133c40$a301280a@.phx.gbl...
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan|||> Thoughts?
Yes, don't allow NULLs, or use SELECT COUNT(*)
--
http://www.aspfaq.com/
(Reverse address to reply.)|||In addition to the other responses, you may have misconceptions about
how SQL-Server processes a query.
If NULLs are disallowed in the columns id, a, b, c and d, then the
queries
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
will probably all be satisfied with the same query plan. The smallest
index will be used to count the total number of rows. It is highly
unlikely that the query "select count(a) from table" will use the index
on a, and the query "select count(b) from table" the index on b...
If the columns allow and contain NULLs: see the other responses.
Gert-Jan
dan wrote:
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan
--
(Please reply only to the newsgroup)
Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
quad processor...
Table with (4) indexes: fields a,b,c,d
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
generates different results (!)
We have dropped and rebuilt the indexes.
The table in question has approx. 2 million rows. The
count(id) query is treturning 11 million rows.
Thoughts?
Thanks in advance,
DanHi,
The count will change based on the number of null values inside the table.
Select count(colmn) will count only the not null values inside the table.
To have the full record count use
select count(*) from table_name
Thanks
Hari
MCDBA
"dan" <djlucarelli@.pa1call.org> wrote in message
news:43e001c4732c$1a133c40$a301280a@.phx.gbl...
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan|||> Thoughts?
Yes, don't allow NULLs, or use SELECT COUNT(*)
--
http://www.aspfaq.com/
(Reverse address to reply.)|||In addition to the other responses, you may have misconceptions about
how SQL-Server processes a query.
If NULLs are disallowed in the columns id, a, b, c and d, then the
queries
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
will probably all be satisfied with the same query plan. The smallest
index will be used to count the total number of rows. It is highly
unlikely that the query "select count(a) from table" will use the index
on a, and the query "select count(b) from table" the index on b...
If the columns allow and contain NULLs: see the other responses.
Gert-Jan
dan wrote:
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan
--
(Please reply only to the newsgroup)
different results with select count(*)
Hi,
Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
quad processor...
Table with (4) indexes: fields a,b,c,d
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
generates different results (!)
We have dropped and rebuilt the indexes.
The table in question has approx. 2 million rows. The
count(id) query is treturning 11 million rows.
Thoughts?
Thanks in advance,
Dan
Hi,
The count will change based on the number of null values inside the table.
Select count(colmn) will count only the not null values inside the table.
To have the full record count use
select count(*) from table_name
Thanks
Hari
MCDBA
"dan" <djlucarelli@.pa1call.org> wrote in message
news:43e001c4732c$1a133c40$a301280a@.phx.gbl...
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan
|||> Thoughts?
Yes, don't allow NULLs, or use SELECT COUNT(*)
http://www.aspfaq.com/
(Reverse address to reply.)
|||In addition to the other responses, you may have misconceptions about
how SQL-Server processes a query.
If NULLs are disallowed in the columns id, a, b, c and d, then the
queries
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
will probably all be satisfied with the same query plan. The smallest
index will be used to count the total number of rows. It is highly
unlikely that the query "select count(a) from table" will use the index
on a, and the query "select count(b) from table" the index on b...
If the columns allow and contain NULLs: see the other responses.
Gert-Jan
dan wrote:
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan
(Please reply only to the newsgroup)
Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
quad processor...
Table with (4) indexes: fields a,b,c,d
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
generates different results (!)
We have dropped and rebuilt the indexes.
The table in question has approx. 2 million rows. The
count(id) query is treturning 11 million rows.
Thoughts?
Thanks in advance,
Dan
Hi,
The count will change based on the number of null values inside the table.
Select count(colmn) will count only the not null values inside the table.
To have the full record count use
select count(*) from table_name
Thanks
Hari
MCDBA
"dan" <djlucarelli@.pa1call.org> wrote in message
news:43e001c4732c$1a133c40$a301280a@.phx.gbl...
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan
|||> Thoughts?
Yes, don't allow NULLs, or use SELECT COUNT(*)
http://www.aspfaq.com/
(Reverse address to reply.)
|||In addition to the other responses, you may have misconceptions about
how SQL-Server processes a query.
If NULLs are disallowed in the columns id, a, b, c and d, then the
queries
Select count(a) from table
Select count(b) from table
Select count(c) from table
Select count(d) from table
Select count(id) from table
will probably all be satisfied with the same query plan. The smallest
index will be used to count the total number of rows. It is highly
unlikely that the query "select count(a) from table" will use the index
on a, and the query "select count(b) from table" the index on b...
If the columns allow and contain NULLs: see the other responses.
Gert-Jan
dan wrote:
> Hi,
> Strange behavior on SQL Server 2000 SP3a /Win2K Adv server
> quad processor...
> Table with (4) indexes: fields a,b,c,d
> Select count(a) from table
> Select count(b) from table
> Select count(c) from table
> Select count(d) from table
> Select count(id) from table
> generates different results (!)
> We have dropped and rebuilt the indexes.
> The table in question has approx. 2 million rows. The
> count(id) query is treturning 11 million rows.
> Thoughts?
> Thanks in advance,
> Dan
(Please reply only to the newsgroup)
Subscribe to:
Posts (Atom)