Showing posts with label alli. Show all posts
Showing posts with label alli. Show all posts

Tuesday, March 27, 2012

Do I use case or coalesce or something else?

Hi all!
I'm runnnig the following query:
declare @.Action int
set @.Action = 2
SELECT * FROM estates
WHERE
((@.Action!=1)OR(
est_ZipCode BETWEEN 12000 AND 12999 OR
est_ZipCode BETWEEN 14000 AND 14999
))AND
((@.Action!=2)OR(
est_ZipCode BETWEEN 16000 AND 16999
))AND
((@.Action!=3)OR(
est_ZipCode BETWEEN 11000 AND 11999 OR
est_ZipCode BETWEEN 13000 AND 13999 OR
est_ZipCode BETWEEN 15000 AND 15999
))AND
((@.Action!=4)OR(
est_ZipCode BETWEEN 17000 AND 19999
))
and it runs much, much slower then:
SELECT * FROM estates
WHERE est_ZipCode BETWEEN 16000 AND 16999
/*equivalent to action 2*/
Why is that? Is there a better way of solving this, perhaps with case
or coalesce?
Any help appreciated,
NiclasIn order to get the best plan you will either need to use dynamic sql or a
number of if else statements.
Your problem stems from the optimiser not knowing the value of @.Action so it
must optimiser the whole query.
Have you tried UNION ALL, not experimented with that; the dynamic sql would
be the neatest in my opinion but has some requirements for security on the
base tables rather than just exec permission on the stored proc.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"tonicvodka" <tonicvodka@.hotmail.com> wrote in message
news:1137422736.659781.271560@.o13g2000cwo.googlegroups.com...
> Hi all!
> I'm runnnig the following query:
> declare @.Action int
> set @.Action = 2
> SELECT * FROM estates
> WHERE
> ((@.Action!=1)OR(
> est_ZipCode BETWEEN 12000 AND 12999 OR
> est_ZipCode BETWEEN 14000 AND 14999
> ))AND
> ((@.Action!=2)OR(
> est_ZipCode BETWEEN 16000 AND 16999
> ))AND
> ((@.Action!=3)OR(
> est_ZipCode BETWEEN 11000 AND 11999 OR
> est_ZipCode BETWEEN 13000 AND 13999 OR
> est_ZipCode BETWEEN 15000 AND 15999
> ))AND
> ((@.Action!=4)OR(
> est_ZipCode BETWEEN 17000 AND 19999
> ))
> and it runs much, much slower then:
> SELECT * FROM estates
> WHERE est_ZipCode BETWEEN 16000 AND 16999
> /*equivalent to action 2*/
> Why is that? Is there a better way of solving this, perhaps with case
> or coalesce?
> Any help appreciated,
> Niclas
>|||"tonicvodka" <tonicvodka@.hotmail.com> wrote in message
news:1137422736.659781.271560@.o13g2000cwo.googlegroups.com...
> Hi all!
> I'm runnnig the following query:
> declare @.Action int
> set @.Action = 2
> SELECT * FROM estates
> WHERE
> ((@.Action!=1)OR(
> est_ZipCode BETWEEN 12000 AND 12999 OR
> est_ZipCode BETWEEN 14000 AND 14999
> ))AND
> ((@.Action!=2)OR(
> est_ZipCode BETWEEN 16000 AND 16999
> ))AND
> ((@.Action!=3)OR(
> est_ZipCode BETWEEN 11000 AND 11999 OR
> est_ZipCode BETWEEN 13000 AND 13999 OR
> est_ZipCode BETWEEN 15000 AND 15999
> ))AND
> ((@.Action!=4)OR(
> est_ZipCode BETWEEN 17000 AND 19999
> ))
> and it runs much, much slower then:
> SELECT * FROM estates
> WHERE est_ZipCode BETWEEN 16000 AND 16999
> /*equivalent to action 2*/
> Why is that? Is there a better way of solving this, perhaps with case
> or coalesce?
> Any help appreciated,
> Niclas
I agree with Tony in part.
I had problems with one query (that contained a few ANDs and ORs) that was
solved by spliting it in 2 (or more) and using Union (or Union All). Try
this first. If this doesn't work, try writing 4 separate queries handling
each value of @.Action and use a series of IFs.
I would not go the dynamic SQL way.|||Thanks for your responses,
since the query contains about 20 actions and some other conditions
also, I think dynamic SQL sounds like the best solution.
Thanks again,
Niclas
Is there no way to build a switch statement inside the where-clause?|||"tonicvodka" <tonicvodka@.hotmail.com> wrote in message
news:1137426449.243655.33600@.g49g2000cwa.googlegroups.com...
> Thanks for your responses,
> since the query contains about 20 actions and some other conditions
> also, I think dynamic SQL sounds like the best solution.
> Thanks again,
> Niclas
> Is there no way to build a switch statement inside the where-clause?
No control-of-flow inside a Select statement.
CASE is possible, of course.|||It's a common problem with UI that have a filter option, you need to change
your query according to the parameters the user has filtered on.
Doing it in one big SELECT with CASE or OR's won't give a very good query
plan, often very poor and general.
This is where we need to use either IF ELSE or dynamic SQL, the IF ELSE
route has the problem of duplicate code and if there are lots of filters
then you could end up with 20, 30 or more IF ELSE's which is a lot to
maintain.
There is help at hand with the old dynamic SQL security on base table
requirement in SQL Server 2005 now.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"Raymond D'Anjou" <rdanjou@.canatradeNOSPAM.com> wrote in message
news:eU7tHJsGGHA.1312@.TK2MSFTNGP09.phx.gbl...
> "tonicvodka" <tonicvodka@.hotmail.com> wrote in message
> news:1137426449.243655.33600@.g49g2000cwa.googlegroups.com...
> No control-of-flow inside a Select statement.
> CASE is possible, of course.
>|||The standard syntax is <> instead of the stolen C syntax != for
non-equal. Your code and the sample you gave do not quite match. I
think that you want somethign like this.
SELECT * -- production code should have column names
FROM Estates
WHERE CASE @.action
WHEN 1
THEN CASE WHEN est_zipcode BETWEEN 12000 AND 12999
THEN 'T'
WHEN est_zipcode BETWEEN 14000 AND 14999
THEN 'T' ELSE 'F' END
WHEN 2
THEN CASE WHEN est_zipcode BETWEEN 16000 AND 16999
THEN 'T' ELSE 'F' END
WHEN 3
THEN CASE WHEN est_zipcode BETWEEN 11000 AND 11999
THEN 'T'
WHEN est_zipcode BETWEEN 13000 AND 13999
THEN 'T'
WHEN est_zipcode BETWEEN 15000 AND 15999
THEN 'T' ELSE 'F' END
WHEN 4
THEN CASE WHEN est_zipcode BETWEEN 17000 AND 19999
THEN 'T' ELSE 'F' END
etc.
ELSE 'F' END = 'T';
The CASE expression checks the WHEN clauses in order, so put the most
likely case first. This applies to the intermost WHENs also. I have
used both forms of the CASE expression and nested them, but you might
want to look up the syntax so you feel comfortable with it. The 'T'
and 'F' stand for True and False. It is a common SQL porgramming trick
for complex logic. You might also want to look at Logic Gem or another
decision table tool that will help with this kind of problem.
This lets the optimizer do its job on a single query, without having to
kludge dynamic SQL, use UNIONs or resort to procedural code.|||>> In order to get the best plan you will either need to use dynamic SQL or
a number of if else statements. <<
You really are trapped in an OO and 3GL mindset and cannot think
declaratively!
I used to tell students that it takes a year of SQL programming to have
the"declarative revelation" so that you stop thinking in terms of
dynamic on-the-fly coding, IF-THEN_ELSE control flows, etc. and just
write a single query.
I am not sure how good SQL-2005 is with CASE expressions, but DB2 does
a fine job.|||> I am not sure how good SQL-2005 is with CASE expressions, but DB2 does
> a fine job.
No it does not, and you just don't get it. In the real world "one size
fits all" approach (just write a single query) may perform very poorly.
Just think: consider a simple query
select <some columns> from some_table where some_date between
@.date_from and @.date_to
If there is a ( non-clustered for SQL Server) index on some_date, which
plan should the optimizer choose? It could scan the table (tablespace
scan in DB2 parlance), or it could access the table through the index.
Neither plan is the best for all the cases. Recompiling the query makes
perfect sense if teh table is big.
just think: consider a search form with several search conditions for
the user to fill, like zip, last name, fisrt name, whatever. Dynamic
SQL is most likely to run much better that generic stufff like
where zip=@.zip or @.zip is null
and last_name=@.last_name or @.last_name is null
and the reason is simple: all real life major RDBMS are well capable of
choosing different plans for diffrent parameter values, DB2 included.
For big tables the performance price of choosing only one plan for all
the cases may be way too steep.
So yes, in simpler cases we have if statements, in more complex ones we
just go for dynamic SQL.|||On 16 Jan 2006 10:31:21 -0800, --CELKO-- wrote:

>The standard syntax is <> instead of the stolen C syntax != for
>non-equal. Your code and the sample you gave do not quite match. I
>think that you want somethign like this.
>SELECT * -- production code should have column names
> FROM Estates
> WHERE CASE @.action
> WHEN 1
> THEN CASE WHEN est_zipcode BETWEEN 12000 AND 12999
> THEN 'T'
> WHEN est_zipcode BETWEEN 14000 AND 14999
> THEN 'T' ELSE 'F' END
> WHEN 2
> THEN CASE WHEN est_zipcode BETWEEN 16000 AND 16999
> THEN 'T' ELSE 'F' END
> WHEN 3
> THEN CASE WHEN est_zipcode BETWEEN 11000 AND 11999
> THEN 'T'
> WHEN est_zipcode BETWEEN 13000 AND 13999
> THEN 'T'
> WHEN est_zipcode BETWEEN 15000 AND 15999
> THEN 'T' ELSE 'F' END
> WHEN 4
> THEN CASE WHEN est_zipcode BETWEEN 17000 AND 19999
> THEN 'T' ELSE 'F' END
> etc.
> ELSE 'F' END = 'T';
>The CASE expression checks the WHEN clauses in order, so put the most
>likely case first. This applies to the intermost WHENs also. I have
>used both forms of the CASE expression and nested them, but you might
>want to look up the syntax so you feel comfortable with it. The 'T'
>and 'F' stand for True and False. It is a common SQL porgramming trick
>for complex logic. You might also want to look at Logic Gem or another
>decision table tool that will help with this kind of problem.
>This lets the optimizer do its job on a single query, without having to
>kludge dynamic SQL, use UNIONs or resort to procedural code.
Hi Joe,
But the single query tha the optimizer gets to do its job on doesn't
have any comparison predicate of the form
"<column name> <comp op> <expression>"
or "<expression> <comp op> <column name>".
The only thing the optimizer can do is to sigh and settle for a complete
table scan.
Using 4 SELECT statements and an IF ELSE tree or (shudder) dynamic SQL
would enable the optimizer to check if an index on est_zipcode can be
sed. That would result in faster execution.
Hugo Kornelis, SQL Server MVPsql

Sunday, March 25, 2012

Do i need to activate some types in sys.fulltext_document_types

hi all;
I heard that I have to activate some supported types for full-text search;
like if I want to search in HTML document (.html) I have to activate the
search for HTML or PDF and so, and what is the types activated by default.
When I retrieve all the types by:
select * from sys.fulltext_document_types
Does this command include all the activated types or I have to activate some
of it.
Thank you
It includes all the signed ones. To "activate" the 3rd party iFilters, like
Adobe's PDF iFilter you need to download the iFilter, install it and then do
the following.
Exec Sp_fulltext_service 'load_os_resources', 1
Exec Sp_fulltext_service 'verify_signature', 0
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"yaser" <yaser.abu-khudier@.hotmail.com> wrote in message
news:%236shPnTGHHA.1232@.TK2MSFTNGP05.phx.gbl...
> hi all;
> I heard that I have to activate some supported types for full-text search;
> like if I want to search in HTML document (.html) I have to activate the
> search for HTML or PDF and so, and what is the types activated by default.
> When I retrieve all the types by:
> select * from sys.fulltext_document_types
> Does this command include all the activated types or I have to activate
> some of it.
> Thank you
>
>
|||Thank you Hilay for the reply ;
can i get info about the signed ones; and what do u mean by 3rd party
iFilters what is the second party; what is included by default and what is
not .
thank you
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:eQ$qidUGHHA.3304@.TK2MSFTNGP05.phx.gbl...
> It includes all the signed ones. To "activate" the 3rd party iFilters,
> like Adobe's PDF iFilter you need to download the iFilter, install it and
> then do the following.
> Exec Sp_fulltext_service 'load_os_resources', 1
> Exec Sp_fulltext_service 'verify_signature', 0
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "yaser" <yaser.abu-khudier@.hotmail.com> wrote in message
> news:%236shPnTGHHA.1232@.TK2MSFTNGP05.phx.gbl...
>
|||Thank you (Hilary) for the reply ;
can i get info about the signed ones; and what do u mean by 3rd party
iFilters what is the second party; what is included by default and what is
not .
thank you
"yaser" <yaser.abu-khudier@.hotmail.com> wrote in message
news:%2337nvxUGHHA.1280@.TK2MSFTNGP04.phx.gbl...
> Thank you Hilay for the reply ;
> can i get info about the signed ones; and what do u mean by 3rd party
> iFilters what is the second party; what is included by default and what is
> not .
> thank you
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:eQ$qidUGHHA.3304@.TK2MSFTNGP05.phx.gbl...
>
|||A Second party developer has an exclusive with a company and makes products
only for that one company. A third party developer is not tied to a company
and makes products for a varitey of companies.
Here are the list of iFilters installed by default
MSPFILT.DLL - ms paper ifilter - extracts text from tiffs - does ocr
VISFILT.DLL - visio ifilter
nlhtml.dll - html
offfilt.dll - office ifilter
msfte.dll - text ifilter
xmlfilt.dll - xml ifilter
mimefilt.dll - mime, email, and news ifilter
tquery.dll - this is the null iFilter, it extracts summary properties for
other search products like Indexing Services, I am unsure what its role is
here.
xmlfilter.dll - xml iFilter
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"yaser" <yaser.abu-khudier@.hotmail.com> wrote in message
news:O2GhFMdGHHA.4112@.TK2MSFTNGP04.phx.gbl...
> Thank you (Hilary) for the reply ;
> can i get info about the signed ones; and what do u mean by 3rd party
> iFilters what is the second party; what is included by default and what is
> not .
> thank you
> "yaser" <yaser.abu-khudier@.hotmail.com> wrote in message
> news:%2337nvxUGHHA.1280@.TK2MSFTNGP04.phx.gbl...
>

Thursday, March 22, 2012

Do I need /PAE to enable AWE memory?

Hi All
I am running Windows 2000 Advanced Server with SQL 2K
Enterprise. I now have 8 GB of RAM and am using the /3GB
switch in the BOOT.INI file. I want to enable AWE within
SQL but some documentation says that the /PAE switch is
also required within the BOOT.INI file. Is this correct?
I don't want to use the /PAE unless I have to.
Will the /3GB switch, together with enabling AWE in SQL
allow SQL to see all but 128MB of the 8GB of RAM (i.e.
no /PAE)?
Many thanks
H
Sample boot.ini for 8GB memory usage:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microso ft Windows 2000 Advanced Server" /fastdetect /PAE
multi(0)disk(0)rdisk(0)partition(2)\WINNT="Microso ft W2K 2000 Advanced Server" /fastdetect /PAE
JBandi
|||No. Without PAE the server only sees up to 4GB.
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...

Do I need /PAE to enable AWE memory?

Hi All
I am running Windows 2000 Advanced Server with SQL 2K
Enterprise. I now have 8 GB of RAM and am using the /3GB
switch in the BOOT.INI file. I want to enable AWE within
SQL but some documentation says that the /PAE switch is
also required within the BOOT.INI file. Is this correct?
I don't want to use the /PAE unless I have to.
Will the /3GB switch, together with enabling AWE in SQL
allow SQL to see all but 128MB of the 8GB of RAM (i.e.
no /PAE)?
Many thanks
HSample boot.ini for 8GB memory usage:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition
(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINN
T="Microsoft Windows 2000 Advanced S
erver" /fastdetect /PAE
multi(0)disk(0)rdisk(0)partition(2)\WINN
T="Microsoft W2K 2000 Advanced Serve
r" /fastdetect /PAE
JBandi|||No. Without PAE the server only sees up to 4GB.
****************************************
******************************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET
resources...

Do I have a disk performance problem?

Hi All:

I would like help identifying if I have a disk performance issue or not. First the background: we have a j2ee application using the MS SQL 2005 JDBC driver and Hibernate on 4 application servers, and an active-passive SQL Server 2005 cluster. All of the servers reside in the same physical rack and switch.

Our application is typically bounded by CPU on the app server, or throughput from the database. Several months ago we were using SQL 2000 and would often max out the CPU on the database server before anything else, but often the database could keep up. Now we have 2005 on a much more powerful machine and more app servers, but we seem to be running up against a problem with throughput from the database.

The issue is not CPU. The total cpu average, as monitored in perfmon on 30 second intervals, stays consistently below 40%. But what concerns me is the Average Disk Queue Read Length, particularly for our E: drive. On this machine, the transaction log, the system and temp dbs, and our application's database are all on separate EMC partitions, connected via fibre chanel. The E drive houses the app data and is a 15-way meta device (fifteen 10GB logical devices striped at 960k for a 150GB device) in a RAID-S configuration.

I have read various articles online describing how to interpet the Average Disk Queue Read Length performance counter with regards to SQL Server. Some have said this should not exceed the number of physical spindles * 2. We are seeing values of 32 consistently, averaging over 60 during peak processing hours, and spiking to well over 100 on a scale of 1.0. (3-second sample interval).

So since our application servers seem to be waiting on their database calls (a lot of inserts with frequent, but small-resultset selects) and do not show I/O issues either with their local storage, memory, or network interface. The database server again has no CPU, network, or memory issues. I should add the the Average Disk Queue Write Length counter does not have any issues; its always below 1 (on a 1.0 scale). The EMC Celerra array has both read and write caching. The indexes of the application database are rebuilt weekly and defragmented every day, with stats rebuilt after the defrag.

So how can I further determine where my performance problem lies? All thoughts appreciated! Thanks!

-tuj
First of all, you are always waiting on something. Either the CPU, memory, or hard drives. The question is, is the performance unacceptable and how much will it cost to fix?

Generally, faster the processors will help CPU. Memory will help both applications and disk cache to eliminate going to the hard drives, which are generally the slow dog in the race.

From what you describe, your bottleneck must be the disk access.

There are many schools on how to configure RAID properly. I am concerned by your comments: The E drive houses the app data and is a 15-way meta device (fifteen 10GB logical devices striped at 960k for a 150GB device) in a RAID-S configuration.

Are you saying you have split physical drives, into logical drives RAID arrays? You never, ever want to do that. Also, a stripe size of 960K is HUGE. That means every single read/write has to read/write in 960K.

Intel has some basic guidelines on configuring RAID here http://www.intel.com/support/motherboards/server/srcs16/sb/cs-020782.htm.

As a general rule: create a RAID-5 array using all the physical drives in a unit. If you have 15 drives in a unit, make a 15 drive RAID-5 array. THEN, you split that into logical drives using the OS. Otherwise, you are killing the performance of the RAID-5.

I am sure we will get confilicting information from other people.

|||Please understand, we are using EMC storage whcih uses its own proprietary version of RAID-5 called RAID-S. This is an enterprise-class Symmetrix system. The storage array is connected to the SQL Server via fibre-channel and lives in the same rack.

Back to my original question? How can I quantify that I have a disk performance issue. My storage folks tell me that the storage is performing fine, at least from their perspective. How can I tell if I am maxing out my I/O capabilities?


|||

Disk queue length is one indicator for disk IO issue.

For SQL server, you can use fn_virtualfilestats to sample the IO stalk periodically (say every 3 mins) on the database or file you concerned. Check the difference of the IoStallMS between two samples and calculate the IOStalls perminute (Ref. BOL for details).

If you have high IoStallMS/Min, your DB is suffering IO issue.

Once one of my client had 50sec/min IOStalls during some period of time. That convinced the San team to reconfigure the storage.

|||Ok, so I setup a process to use the fn_virfualfilestats function to sample by IoStallMS value every 1 second.

DECLARE @.myDBID int
SET @.myDBID = db_id()
SELECT * FROM ::fn_virtualfilestats (@.myDBID, -1)
go

On my data file, I see IoStallMS values like '1754339800'. I stored the values in a table, then I found the max IoStallMS value by minute.

select datepart(hh, ts) as hr, datepart(n, ts) as min,
min(ts) as ts, max(iostallms) as stalls, file_id
from io_stall i1
group by datepart(hh, ts), datepart(n, ts), file_id

I then joined the grouping to itself, shifting the join minute by 1. This allowed me to calculate the
IoStallMS per minute.

select a.hr, a.min, b.min, a.stalls, b.stalls, b.stalls - a.stalls as diff
from
(select datepart(hh, ts) as hr, datepart(n, ts) as min,
min(ts) as ts, max(iostallms) as stalls, file_id
from io_stall i1
group by datepart(hh, ts), datepart(n, ts), file_id) a
inner join
(select datepart(hh, ts) as hr, datepart(n, ts) as min,
min(ts) as ts, max(iostallms) as stalls, file_id
from io_stall i1
group by datepart(hh, ts), datepart(n, ts), file_id) b
on a.hr = b.hr and a.min + 1 = b.min
and a.file_id = b.file_id
where a.file_id = 1
order by a.hr, a.min

So... my results look like this for my data file:
hr min min2 avgiostall a avg io stall b b - a
14 20 21 1677684043 1679200642 1516599
14 21 22 1679200642 1679671839 471197
14 22 23 1679671839 1680146618 474779
14 23 24 1680146618 1681345822 1199204
14 24 25 1681345822 1681816656 470834
14 25 26 1681816656 1682260233 443577
14 26 27 1682260233 1682689827 429594
14 27 28 1682689827 1684180645 1490818

These seem to be exceptionally high, no?

On my log file for this database, I get these reults:
hr min min2 avgiostall a avg io stall b b - a
15 11 12 17382490 17473367 90877
15 12 13 17473367 17473370 3
15 13 14 17473370 17473372 2
15 14 15 17473372 17473374 2
15 15 16 17473374 17473375 1
15 16 17 17473375 17473377 2
15 17 18 17473377 17540468 67091
15 18 19 17540468 17543980 3512
15 19 20 17543980 17544013 33

Which in general seem much more reasonable, but it appears to still be spiking.

1. Have I calcuated the IoStalls / Minute correct?
2. If so, it looks like I clearly have an I/O problem to my SAN, right?
|||Run this command:

DECLARE @.myDBID int
SET @.myDBID = db_id()
SELECT ReadBytesPerMS = (BytesRead/IoStallReadMS),
WriteBytesPerMS = (BytesWritten/IoStallWriteMS),
DBFileName = physical_name
FROM ::fn_virtualfilestats (@.myDBID, null) vs
JOIN sys.database_files df ON vs.FileID = df.file_id

My results are all >9000, but my situation might be different than yours.
|||My results:

4169 2860 E:\MSSQL2K5\Data\TW.mdf
18802 5731 F:\MSSQL2K5\Data\TW_log.ldf
29696 7235 G:\MSSQL2K5\Data\TW_log2.ldf

So it looks like my reads and writes to E: are much slower?
|||Yes, it does look like your reads and writes are much slower on E. The writes in general are not real fast. Do you have write caching turned on? How much cache do you have on the array controller? Reads are generally twice as fast as writes. But in your case they are 3 times. That would indicate the controller is not performing well on writes.

It the E drive a logical partition on the same physical array? Can you move the log file to the local drive, or another drive, and see if performance increases?

|||Yes our EMC is configured to cache both reads and writes. Interestingly, the average disk queue WRITE length for the E drive is almost always < 1 while the average disk queue READ length is often over 100. That makes me think that the writes are being cached and written ok, although the numbers from SQL Server say different.

The F and G partitions are separate physical SAN shares from the E drive SAN share. So they should all be physically independent, although they do all live in the same array and utilize the same FC connection to the server. We moved the tempdb and transaction log to separate SAN shares a while back to try to reduce I/O against E.

We see no average disk queue length problems for read nor write on the other drives besides E. We cannot put the data or transaction log on a local drive because the system is a cluster.
|||

The iostall value is pretty high. While running the job, you can also trace the following under physical disk in performance monitor:

Avg Disk sec/Read, Avg Disk sec/Write , Disk Writes/sec, Disk Reads/sec

Based on the RAID configuration (RAID5, RAID10 etc) , and hard drive (spindle) specs, you can estimate how many spindles you need to eliminate the bottle neck.

Do I have a disk performance problem?

Hi All:

I would like help identifying if I have a disk performance issue or not. First the background: we have a j2ee application using the MS SQL 2005 JDBC driver and Hibernate on 4 application servers, and an active-passive SQL Server 2005 cluster. All of the servers reside in the same physical rack and switch.

Our application is typically bounded by CPU on the app server, or throughput from the database. Several months ago we were using SQL 2000 and would often max out the CPU on the database server before anything else, but often the database could keep up. Now we have 2005 on a much more powerful machine and more app servers, but we seem to be running up against a problem with throughput from the database.

The issue is not CPU. The total cpu average, as monitored in perfmon on 30 second intervals, stays consistently below 40%. But what concerns me is the Average Disk Queue Read Length, particularly for our E: drive. On this machine, the transaction log, the system and temp dbs, and our application's database are all on separate EMC partitions, connected via fibre chanel. The E drive houses the app data and is a 15-way meta device (fifteen 10GB logical devices striped at 960k for a 150GB device) in a RAID-S configuration.

I have read various articles online describing how to interpet the Average Disk Queue Read Length performance counter with regards to SQL Server. Some have said this should not exceed the number of physical spindles * 2. We are seeing values of 32 consistently, averaging over 60 during peak processing hours, and spiking to well over 100 on a scale of 1.0. (3-second sample interval).

So since our application servers seem to be waiting on their database calls (a lot of inserts with frequent, but small-resultset selects) and do not show I/O issues either with their local storage, memory, or network interface. The database server again has no CPU, network, or memory issues. I should add the the Average Disk Queue Write Length counter does not have any issues; its always below 1 (on a 1.0 scale). The EMC Celerra array has both read and write caching. The indexes of the application database are rebuilt weekly and defragmented every day, with stats rebuilt after the defrag.

So how can I further determine where my performance problem lies? All thoughts appreciated! Thanks!

-tuj
First of all, you are always waiting on something. Either the CPU, memory, or hard drives. The question is, is the performance unacceptable and how much will it cost to fix?

Generally, faster the processors will help CPU. Memory will help both applications and disk cache to eliminate going to the hard drives, which are generally the slow dog in the race.

From what you describe, your bottleneck must be the disk access.

There are many schools on how to configure RAID properly. I am concerned by your comments: The E drive houses the app data and is a 15-way meta device (fifteen 10GB logical devices striped at 960k for a 150GB device) in a RAID-S configuration.

Are you saying you have split physical drives, into logical drives RAID arrays? You never, ever want to do that. Also, a stripe size of 960K is HUGE. That means every single read/write has to read/write in 960K.

Intel has some basic guidelines on configuring RAID here http://www.intel.com/support/motherboards/server/srcs16/sb/cs-020782.htm.

As a general rule: create a RAID-5 array using all the physical drives in a unit. If you have 15 drives in a unit, make a 15 drive RAID-5 array. THEN, you split that into logical drives using the OS. Otherwise, you are killing the performance of the RAID-5.

I am sure we will get confilicting information from other people.

|||Please understand, we are using EMC storage whcih uses its own proprietary version of RAID-5 called RAID-S. This is an enterprise-class Symmetrix system. The storage array is connected to the SQL Server via fibre-channel and lives in the same rack.

Back to my original question? How can I quantify that I have a disk performance issue. My storage folks tell me that the storage is performing fine, at least from their perspective. How can I tell if I am maxing out my I/O capabilities?


|||

Disk queue length is one indicator for disk IO issue.

For SQL server, you can use fn_virtualfilestats to sample the IO stalk periodically (say every 3 mins) on the database or file you concerned. Check the difference of the IoStallMS between two samples and calculate the IOStalls perminute (Ref. BOL for details).

If you have high IoStallMS/Min, your DB is suffering IO issue.

Once one of my client had 50sec/min IOStalls during some period of time. That convinced the San team to reconfigure the storage.

|||Ok, so I setup a process to use the fn_virfualfilestats function to sample by IoStallMS value every 1 second.

DECLARE @.myDBID int
SET @.myDBID = db_id()
SELECT * FROM ::fn_virtualfilestats (@.myDBID, -1)
go

On my data file, I see IoStallMS values like '1754339800'. I stored the values in a table, then I found the max IoStallMS value by minute.

select datepart(hh, ts) as hr, datepart(n, ts) as min,
min(ts) as ts, max(iostallms) as stalls, file_id
from io_stall i1
group by datepart(hh, ts), datepart(n, ts), file_id

I then joined the grouping to itself, shifting the join minute by 1. This allowed me to calculate the
IoStallMS per minute.

select a.hr, a.min, b.min, a.stalls, b.stalls, b.stalls - a.stalls as diff
from
(select datepart(hh, ts) as hr, datepart(n, ts) as min,
min(ts) as ts, max(iostallms) as stalls, file_id
from io_stall i1
group by datepart(hh, ts), datepart(n, ts), file_id) a
inner join
(select datepart(hh, ts) as hr, datepart(n, ts) as min,
min(ts) as ts, max(iostallms) as stalls, file_id
from io_stall i1
group by datepart(hh, ts), datepart(n, ts), file_id) b
on a.hr = b.hr and a.min + 1 = b.min
and a.file_id = b.file_id
where a.file_id = 1
order by a.hr, a.min

So... my results look like this for my data file:
hr min min2 avgiostall a avg io stall b b - a
14 20 21 1677684043 1679200642 1516599
14 21 22 1679200642 1679671839 471197
14 22 23 1679671839 1680146618 474779
14 23 24 1680146618 1681345822 1199204
14 24 25 1681345822 1681816656 470834
14 25 26 1681816656 1682260233 443577
14 26 27 1682260233 1682689827 429594
14 27 28 1682689827 1684180645 1490818

These seem to be exceptionally high, no?

On my log file for this database, I get these reults:
hr min min2 avgiostall a avg io stall b b - a
15 11 12 17382490 17473367 90877
15 12 13 17473367 17473370 3
15 13 14 17473370 17473372 2
15 14 15 17473372 17473374 2
15 15 16 17473374 17473375 1
15 16 17 17473375 17473377 2
15 17 18 17473377 17540468 67091
15 18 19 17540468 17543980 3512
15 19 20 17543980 17544013 33

Which in general seem much more reasonable, but it appears to still be spiking.

1. Have I calcuated the IoStalls / Minute correct?
2. If so, it looks like I clearly have an I/O problem to my SAN, right?
|||Run this command:

DECLARE @.myDBID int
SET @.myDBID = db_id()
SELECT ReadBytesPerMS = (BytesRead/IoStallReadMS),
WriteBytesPerMS = (BytesWritten/IoStallWriteMS),
DBFileName = physical_name
FROM ::fn_virtualfilestats (@.myDBID, null) vs
JOIN sys.database_files df ON vs.FileID = df.file_id

My results are all >9000, but my situation might be different than yours.
|||My results:

4169 2860 E:\MSSQL2K5\Data\TW.mdf
18802 5731 F:\MSSQL2K5\Data\TW_log.ldf
29696 7235 G:\MSSQL2K5\Data\TW_log2.ldf

So it looks like my reads and writes to E: are much slower?
|||Yes, it does look like your reads and writes are much slower on E. The writes in general are not real fast. Do you have write caching turned on? How much cache do you have on the array controller? Reads are generally twice as fast as writes. But in your case they are 3 times. That would indicate the controller is not performing well on writes.

It the E drive a logical partition on the same physical array? Can you move the log file to the local drive, or another drive, and see if performance increases?

|||Yes our EMC is configured to cache both reads and writes. Interestingly, the average disk queue WRITE length for the E drive is almost always < 1 while the average disk queue READ length is often over 100. That makes me think that the writes are being cached and written ok, although the numbers from SQL Server say different.

The F and G partitions are separate physical SAN shares from the E drive SAN share. So they should all be physically independent, although they do all live in the same array and utilize the same FC connection to the server. We moved the tempdb and transaction log to separate SAN shares a while back to try to reduce I/O against E.

We see no average disk queue length problems for read nor write on the other drives besides E. We cannot put the data or transaction log on a local drive because the system is a cluster.
|||

The iostall value is pretty high. While running the job, you can also trace the following under physical disk in performance monitor:

Avg Disk sec/Read, Avg Disk sec/Write , Disk Writes/sec, Disk Reads/sec

Based on the RAID configuration (RAID5, RAID10 etc) , and hard drive (spindle) specs, you can estimate how many spindles you need to eliminate the bottle neck.

Do I have a disk performance problem?

Hi All:

I would like help identifying if I have a disk performance issue or not. First the background: we have a j2ee application using the MS SQL 2005 JDBC driver and Hibernate on 4 application servers, and an active-passive SQL Server 2005 cluster. All of the servers reside in the same physical rack and switch.

Our application is typically bounded by CPU on the app server, or throughput from the database. Several months ago we were using SQL 2000 and would often max out the CPU on the database server before anything else, but often the database could keep up. Now we have 2005 on a much more powerful machine and more app servers, but we seem to be running up against a problem with throughput from the database.

The issue is not CPU. The total cpu average, as monitored in perfmon on 30 second intervals, stays consistently below 40%. But what concerns me is the Average Disk Queue Read Length, particularly for our E: drive. On this machine, the transaction log, the system and temp dbs, and our application's database are all on separate EMC partitions, connected via fibre chanel. The E drive houses the app data and is a 15-way meta device (fifteen 10GB logical devices striped at 960k for a 150GB device) in a RAID-S configuration.

I have read various articles online describing how to interpet the Average Disk Queue Read Length performance counter with regards to SQL Server. Some have said this should not exceed the number of physical spindles * 2. We are seeing values of 32 consistently, averaging over 60 during peak processing hours, and spiking to well over 100 on a scale of 1.0. (3-second sample interval).

So since our application servers seem to be waiting on their database calls (a lot of inserts with frequent, but small-resultset selects) and do not show I/O issues either with their local storage, memory, or network interface. The database server again has no CPU, network, or memory issues. I should add the the Average Disk Queue Write Length counter does not have any issues; its always below 1 (on a 1.0 scale). The EMC Celerra array has both read and write caching. The indexes of the application database are rebuilt weekly and defragmented every day, with stats rebuilt after the defrag.

So how can I further determine where my performance problem lies? All thoughts appreciated! Thanks!

-tuj
First of all, you are always waiting on something. Either the CPU, memory, or hard drives. The question is, is the performance unacceptable and how much will it cost to fix?

Generally, faster the processors will help CPU. Memory will help both applications and disk cache to eliminate going to the hard drives, which are generally the slow dog in the race.

From what you describe, your bottleneck must be the disk access.

There are many schools on how to configure RAID properly. I am concerned by your comments: The E drive houses the app data and is a 15-way meta device (fifteen 10GB logical devices striped at 960k for a 150GB device) in a RAID-S configuration.

Are you saying you have split physical drives, into logical drives RAID arrays? You never, ever want to do that. Also, a stripe size of 960K is HUGE. That means every single read/write has to read/write in 960K.

Intel has some basic guidelines on configuring RAID here http://www.intel.com/support/motherboards/server/srcs16/sb/cs-020782.htm.

As a general rule: create a RAID-5 array using all the physical drives in a unit. If you have 15 drives in a unit, make a 15 drive RAID-5 array. THEN, you split that into logical drives using the OS. Otherwise, you are killing the performance of the RAID-5.

I am sure we will get confilicting information from other people.

|||Please understand, we are using EMC storage whcih uses its own proprietary version of RAID-5 called RAID-S. This is an enterprise-class Symmetrix system. The storage array is connected to the SQL Server via fibre-channel and lives in the same rack.

Back to my original question? How can I quantify that I have a disk performance issue. My storage folks tell me that the storage is performing fine, at least from their perspective. How can I tell if I am maxing out my I/O capabilities?


|||

Disk queue length is one indicator for disk IO issue.

For SQL server, you can use fn_virtualfilestats to sample the IO stalk periodically (say every 3 mins) on the database or file you concerned. Check the difference of the IoStallMS between two samples and calculate the IOStalls perminute (Ref. BOL for details).

If you have high IoStallMS/Min, your DB is suffering IO issue.

Once one of my client had 50sec/min IOStalls during some period of time. That convinced the San team to reconfigure the storage.

|||Ok, so I setup a process to use the fn_virfualfilestats function to sample by IoStallMS value every 1 second.

DECLARE @.myDBID int
SET @.myDBID = db_id()
SELECT * FROM ::fn_virtualfilestats (@.myDBID, -1)
go

On my data file, I see IoStallMS values like '1754339800'. I stored the values in a table, then I found the max IoStallMS value by minute.

select datepart(hh, ts) as hr, datepart(n, ts) as min,
min(ts) as ts, max(iostallms) as stalls, file_id
from io_stall i1
group by datepart(hh, ts), datepart(n, ts), file_id

I then joined the grouping to itself, shifting the join minute by 1. This allowed me to calculate the
IoStallMS per minute.

select a.hr, a.min, b.min, a.stalls, b.stalls, b.stalls - a.stalls as diff
from
(select datepart(hh, ts) as hr, datepart(n, ts) as min,
min(ts) as ts, max(iostallms) as stalls, file_id
from io_stall i1
group by datepart(hh, ts), datepart(n, ts), file_id) a
inner join
(select datepart(hh, ts) as hr, datepart(n, ts) as min,
min(ts) as ts, max(iostallms) as stalls, file_id
from io_stall i1
group by datepart(hh, ts), datepart(n, ts), file_id) b
on a.hr = b.hr and a.min + 1 = b.min
and a.file_id = b.file_id
where a.file_id = 1
order by a.hr, a.min

So... my results look like this for my data file:
hr min min2 avgiostall a avg io stall b b - a
14 20 21 1677684043 1679200642 1516599
14 21 22 1679200642 1679671839 471197
14 22 23 1679671839 1680146618 474779
14 23 24 1680146618 1681345822 1199204
14 24 25 1681345822 1681816656 470834
14 25 26 1681816656 1682260233 443577
14 26 27 1682260233 1682689827 429594
14 27 28 1682689827 1684180645 1490818

These seem to be exceptionally high, no?

On my log file for this database, I get these reults:
hr min min2 avgiostall a avg io stall b b - a
15 11 12 17382490 17473367 90877
15 12 13 17473367 17473370 3
15 13 14 17473370 17473372 2
15 14 15 17473372 17473374 2
15 15 16 17473374 17473375 1
15 16 17 17473375 17473377 2
15 17 18 17473377 17540468 67091
15 18 19 17540468 17543980 3512
15 19 20 17543980 17544013 33

Which in general seem much more reasonable, but it appears to still be spiking.

1. Have I calcuated the IoStalls / Minute correct?
2. If so, it looks like I clearly have an I/O problem to my SAN, right?
|||Run this command:

DECLARE @.myDBID int
SET @.myDBID = db_id()
SELECT ReadBytesPerMS = (BytesRead/IoStallReadMS),
WriteBytesPerMS = (BytesWritten/IoStallWriteMS),
DBFileName = physical_name
FROM ::fn_virtualfilestats (@.myDBID, null) vs
JOIN sys.database_files df ON vs.FileID = df.file_id

My results are all >9000, but my situation might be different than yours.
|||My results:

4169 2860 E:\MSSQL2K5\Data\TW.mdf
18802 5731 F:\MSSQL2K5\Data\TW_log.ldf
29696 7235 G:\MSSQL2K5\Data\TW_log2.ldf

So it looks like my reads and writes to E: are much slower?
|||Yes, it does look like your reads and writes are much slower on E. The writes in general are not real fast. Do you have write caching turned on? How much cache do you have on the array controller? Reads are generally twice as fast as writes. But in your case they are 3 times. That would indicate the controller is not performing well on writes.

It the E drive a logical partition on the same physical array? Can you move the log file to the local drive, or another drive, and see if performance increases?

|||Yes our EMC is configured to cache both reads and writes. Interestingly, the average disk queue WRITE length for the E drive is almost always < 1 while the average disk queue READ length is often over 100. That makes me think that the writes are being cached and written ok, although the numbers from SQL Server say different.

The F and G partitions are separate physical SAN shares from the E drive SAN share. So they should all be physically independent, although they do all live in the same array and utilize the same FC connection to the server. We moved the tempdb and transaction log to separate SAN shares a while back to try to reduce I/O against E.

We see no average disk queue length problems for read nor write on the other drives besides E. We cannot put the data or transaction log on a local drive because the system is a cluster.
|||

The iostall value is pretty high. While running the job, you can also trace the following under physical disk in performance monitor:

Avg Disk sec/Read, Avg Disk sec/Write , Disk Writes/sec, Disk Reads/sec

Based on the RAID configuration (RAID5, RAID10 etc) , and hard drive (spindle) specs, you can estimate how many spindles you need to eliminate the bottle neck.

Do i alsocopy sys dbs when i copy a db to a new disk with 'Att & D

Hi all
I need to copy a user database from disk E to disk G using the 'attach and
detach' and then take that disk to another server where i will attach the
database. Do i also have to copy the systems databases (Master, MSDB, Model)?
How do i also keep the logins and security features that were on the
databases previously? I cant use 'import and export data' as the other
machine is not on the domain/network.
Thank you in advance
You don't have to.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"MittyKom" <MittyKom@.discussions.microsoft.com> wrote in message
news:E7B05938-593E-4F3C-9124-EC9957207120@.microsoft.com...
> Hi all
> I need to copy a user database from disk E to disk G using the 'attach and
> detach' and then take that disk to another server where i will attach the
> database. Do i also have to copy the systems databases (Master, MSDB,
> Model)?
> How do i also keep the logins and security features that were on the
> databases previously? I cant use 'import and export data' as the other
> machine is not on the domain/network.
> Thank you in advance

Wednesday, March 21, 2012

DNS required ?

Hi All!
I facing the following problem:
Sometimes i get error while connecting to my SQLServer instance from client
machine "Timeout expired". I found it occurs when my DNS server is not reach
eable from client machine. But i connecting through alias, created by Client
network utility, where i s
pecify directly IP-address, NOT DNS-name ! I tried to connect through QA, os
ql - resuls the same.
Why it requires DNS ? What parameter i missing ?
Telnet on IP-address port works normally.
Server - NT 4.0 SP6 PDC, SQLServer 2000 Std Ed
Client - Windows 98 or NT 4.0IF you try to connect to a server named London, the name London needs to be
resolved to the IP address. This is the function that DNS provides...
However if you use theIP address yourself, DNS does not have to do anything.
Wayne Snyder MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
(Please respond only to the newsgroups.)
I support the Professional Association for SQL Server
(www.sqlpass.org)
"Slava Melnikov" <vasya000@.yandex.ru> wrote in message
news:F6CBFA12-2F13-452B-B848-5BA82228D0A1@.microsoft.com...
> Hi All!
> I facing the following problem:
> Sometimes i get error while connecting to my SQLServer instance from
client machine "Timeout expired". I found it occurs when my DNS server is
not reacheable from client machine. But i connecting through alias, created
by Client network utility, where i specify directly IP-address, NOT DNS-name
! I tried to connect through QA, osql - resuls the same.
> Why it requires DNS ? What parameter i missing ?
> Telnet on IP-address port works normally.
> Server - NT 4.0 SP6 PDC, SQLServer 2000 Std Ed
> Client - Windows 98 or NT 4.0|||What version of the SQL Server ODBC driver (sqlsrv32.dll) is installed on
the client. There is a issue with wsome of the earlier MDAC 2.6 SQL Server
ODBC drivers. If your driver version is 2000.8.0.194 you may be running
into this problem. It also occurs on some later versions as well. If you
install one of the more recent versions of MDAC, such as MDAC 2.7 then the
problem I am describing will not occur. Of course this assumes that you are
using the version of MDAC that has the problem.
When you ping the ip address does the response come back quickly or dies it
take some time?
Rand
This posting is provided "as is" with no warranties and confers no rights.|||O-oh!
sqlsrv32.dll version is really 2000.8.0.194.
Thanks for help, Rand !
I should install latest service pack or new MDAC it's
enough ?
ping works normally

>--Original Message--
>What version of the SQL Server ODBC driver
(sqlsrv32.dll) is installed on
>the client. There is a issue with wsome of the earlier
MDAC 2.6 SQL Server
>ODBC drivers. If your driver version is 2000.8.0.194 you
may be running
>into this problem. It also occurs on some later versions
as well. If you
>install one of the more recent versions of MDAC, such as
MDAC 2.7 then the
>problem I am describing will not occur. Of course this
assumes that you are
>using the version of MDAC that has the problem.
>When you ping the ip address does the response come back
quickly or dies it
>take some time?
>Rand
>This posting is provided "as is" with no warranties and
confers no rights.
>.
>

Friday, March 9, 2012

Divide table into two parts

Hi all!

I wanna divide a table into two parts by inserting a page break after a certain row (I need only one page break). How can I achieve this goal?

Thanks.

What do you mean by page break, do you mean that the first part stays in the table and the other part goes to another table ? Which is the ORDER criteria that you want these tables to order for ?

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de|||I've got several controls just after table and i need that controls are displaied at the same page as table (at least a row must be at the same page with controls). At the moment I can get a situation when table is displaied in one page and controls are dispaied on another page.

Wednesday, March 7, 2012

Distributor and publisher

Hi All:
i have two publications in my local computer, then i go to
distributor tab in publisher and distributor properties ,which shows two
distributor database there. that make sense coz i have two publication one
for each. is that right?
my question is why in the publisher tab of publisher and distributor
properties only has one distributorDB ?
Cheers
nick
I don't think so. Each publisher can use a single distribution database.
However you can have one or more distribution database per server.
So consider three publishers a, b, and c. Publisher a and publisher b use
the distribution database d1 on publisher c. Publisher c used a local
distribution database on publisher c called distribution. You could also
configure publisher a to use d2 (another distribution database) on publisher
c and publisher b could still use d1 on publisher c.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Now available on Amazon.com
http://www.amazon.com/gp/product/off...?condition=all
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Nick" <fsheng@.ebreathe.co.nz> wrote in message
news:O7ceZ4kCFHA.2568@.TK2MSFTNGP10.phx.gbl...
> Hi All:
> i have two publications in my local computer, then i go to
> distributor tab in publisher and distributor properties ,which shows two
> distributor database there. that make sense coz i have two publication one
> for each. is that right?
> my question is why in the publisher tab of publisher and
distributor
> properties only has one distributorDB ?
>
> Cheers
> nick
>
|||Nick,
Hilary is correct, but what you are thinking of is
something I also assumed existed when I first saw the
option of several distribution databases. I still think
this would be a good idea as disaster recovery is far
more versatile if the msrepl_commands table could be
specific to a publication rather than a publisher ie if
one publisher has 2 transactional publications, they'd go
into separate distribution databases. Unfortunately this
would require a huge amount of coding to amalgamate
different notification data so I guess it's not going to
happen soon.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

>--Original Message--
>I don't think so. Each publisher can use a single
distribution database.
>However you can have one or more distribution database
per server.
>So consider three publishers a, b, and c. Publisher a
and publisher b use
>the distribution database d1 on publisher c. Publisher c
used a local
>distribution database on publisher c called
distribution. You could also
>configure publisher a to use d2 (another distribution
database) on publisher
>c and publisher b could still use d1 on publisher c.
>--
>Hilary Cotter
>Looking for a SQL Server replication book?
>http://www.nwsu.com/0974973602.html
>Now available on Amazon.com
>http://www.amazon.com/gp/product/offer-
listing/0974973602/ref=dp_more-buying-choices_2//102-
1802128-2428137?condition=all[vbcol=seagreen]
>Looking for a FAQ on Indexing Services/SQL FTS
>http://www.indexserverfaq.com
>"Nick" <fsheng@.ebreathe.co.nz> wrote in message
>news:O7ceZ4kCFHA.2568@.TK2MSFTNGP10.phx.gbl...
computer, then i go to[vbcol=seagreen]
properties ,which shows two[vbcol=seagreen]
two publication one[vbcol=seagreen]
publisher and
>distributor
>
>.
>
|||Thanks Hilary and Paul
so in this case, two publication are sharing one distribution DB.
Cheers
nick
"Nick" <fsheng@.ebreathe.co.nz> wrote in message
news:O7ceZ4kCFHA.2568@.TK2MSFTNGP10.phx.gbl...
> Hi All:
> i have two publications in my local computer, then i go to
> distributor tab in publisher and distributor properties ,which shows two
> distributor database there. that make sense coz i have two publication one
> for each. is that right?
> my question is why in the publisher tab of publisher and
distributor
> properties only has one distributorDB ?
>
> Cheers
> nick
>