显示标签为“real”的博文。显示所有博文
显示标签为“real”的博文。显示所有博文

2012年3月8日星期四

Any SELECT Statement Gurus Out There?

Hi all,

I'm having real trouble wrapping my newbie brain around this problem. Can
someone please tell me the most efficient (or any!) way to write a SELECT
statement to return a set of rows from 5 tables:

These tables are part of our medical database. For example, a person seeking
healthcare may want to know the names and contact information for all
doctors in Reno, NV, who do cardiology. Sounds simple, but it isn't.

A medical group can have many doctors.
A doctor may be a member of more than one medical group.
A doctor or group can have multiple specialties.
A group can have multiple facilities (physical locations).

So the tables look like this...

Table: Doctors
-----
DoctorName
DoctorID

Table: Groups
-----
GroupName
GroupID

Table: Docs2Groups (provides many-to-many relationship between Doctors and
Groups)
-------
DoctorID
GroupID

Table: Specialties (provides many-to-many relationshop between Doctors,
Groups, and Specialties)
------
SpecialtyID
SpecialtyDesc
DoctorID
GroupID

Facilities
---
FacilityName (provides one-to-many relationship between Groups and
Facilities)
FacilityID
GroupID
Address
City
State
Zip
Phone
E-mail

Any help would be GREATLY appreciated.

--Eric Robinsonthis table confuses me:

Table: Specialties (provides many-to-many relationshop between Doctors,
Groups, and Specialties)
------
SpecialtyID
SpecialtyDesc
DoctorID
GroupID

Are you saying that a doctor can only specialize in something within
the context of a certain group? In other words Dr.Smith is a pediatric
oncologist, but can only work in pediatrics for Group A and oncology
for group B? Does that happen?

It would be easier if a Group was a collection of doctors who all had
specialties.

SELECT d.DoctorName
FROM Doctors d JOIN Docs2Groups d2g on d.DoctorID = d2g.DoctorID
JOIN Specialties s ON d.DoctorID = s.DoctorID
JOIN Facilities f ON f.GroupID = d2g.GroupID
WHERE s.SpecialityDesc = 'cardiology'
AND f.City = 'Reno' AND f.State = 'NV'

But, if a Doctor can only specialize in something in the context of a
group, then you could do this:

SELECT d.DoctorName
FROM Doctors d JOIN Docs2Groups d2g on d.DoctorID = d2g.DoctorID
JOIN Specialties s ON d2g.DoctorID = s.DoctorID
AND d2g.GroupID = s.GroupID
JOIN Facilities f ON f.GroupID = d2g.GroupID
WHERE s.SpecialityDesc = 'cardiology'
AND f.City = 'Reno' AND f.State = 'NV'

Untested.

HTH,
Stu|||Stu,

Each doctor has his or her own primary specialty and 0 or more additional
specialties. These specialties are asociated with the doctor, not the group.
A group's specialty is a function of its participating doctors. If all the
docs for Group A are cardiologists, then Group A is considered a cardiology
group. If the docs are of different specialties, then the group is
considered "multispecialty." In that sense, a group is, as you say, a
collection of doctors.

HOWEVER, there are unusual cases where the group consists of docs with
different specialties, but it still wants to to be known (for the purposes
of our directory) as one certain kind of group. In these cases, the group
itself gets an "overriding" specialty associated with it to keep from being
listed as "multispecialty."

Therefore the Specialties table does double-duty, but there are only a few
records with GroupID <> 0.

Does that clear things up?

--Eric

"Stu" <stuart.ainsworth@.gmail.com> wrote in message
news:1126550993.851782.190410@.g43g2000cwa.googlegr oups.com...
> this table confuses me:
> Table: Specialties (provides many-to-many relationshop between Doctors,
> Groups, and Specialties)
> ------
> SpecialtyID
> SpecialtyDesc
> DoctorID
> GroupID
> Are you saying that a doctor can only specialize in something within
> the context of a certain group? In other words Dr.Smith is a pediatric
> oncologist, but can only work in pediatrics for Group A and oncology
> for group B? Does that happen?
> It would be easier if a Group was a collection of doctors who all had
> specialties.
> SELECT d.DoctorName
> FROM Doctors d JOIN Docs2Groups d2g on d.DoctorID = d2g.DoctorID
> JOIN Specialties s ON d.DoctorID = s.DoctorID
> JOIN Facilities f ON f.GroupID = d2g.GroupID
> WHERE s.SpecialityDesc = 'cardiology'
> AND f.City = 'Reno' AND f.State = 'NV'
> But, if a Doctor can only specialize in something in the context of a
> group, then you could do this:
> SELECT d.DoctorName
> FROM Doctors d JOIN Docs2Groups d2g on d.DoctorID = d2g.DoctorID
> JOIN Specialties s ON d2g.DoctorID = s.DoctorID
> AND d2g.GroupID = s.GroupID
> JOIN Facilities f ON f.GroupID = d2g.GroupID
> WHERE s.SpecialityDesc = 'cardiology'
> AND f.City = 'Reno' AND f.State = 'NV'
> Untested.
> HTH,
> Stu|||Oops, I mistated the Specialties table. It is actually three tables:

Specialty
---
SpecialtyID
SpecialtyDesc

Doc2Specialty
------
SpecialtyID
DoctorID

Group2Specialty
------
SpecialtyID
GroupID

"Stu" <stuart.ainsworth@.gmail.com> wrote in message
news:1126550993.851782.190410@.g43g2000cwa.googlegr oups.com...
> this table confuses me:
> Table: Specialties (provides many-to-many relationshop between Doctors,
> Groups, and Specialties)
> ------
> SpecialtyID
> SpecialtyDesc
> DoctorID
> GroupID
> Are you saying that a doctor can only specialize in something within
> the context of a certain group? In other words Dr.Smith is a pediatric
> oncologist, but can only work in pediatrics for Group A and oncology
> for group B? Does that happen?
> It would be easier if a Group was a collection of doctors who all had
> specialties.
> SELECT d.DoctorName
> FROM Doctors d JOIN Docs2Groups d2g on d.DoctorID = d2g.DoctorID
> JOIN Specialties s ON d.DoctorID = s.DoctorID
> JOIN Facilities f ON f.GroupID = d2g.GroupID
> WHERE s.SpecialityDesc = 'cardiology'
> AND f.City = 'Reno' AND f.State = 'NV'
> But, if a Doctor can only specialize in something in the context of a
> group, then you could do this:
> SELECT d.DoctorName
> FROM Doctors d JOIN Docs2Groups d2g on d.DoctorID = d2g.DoctorID
> JOIN Specialties s ON d2g.DoctorID = s.DoctorID
> AND d2g.GroupID = s.GroupID
> JOIN Facilities f ON f.GroupID = d2g.GroupID
> WHERE s.SpecialityDesc = 'cardiology'
> AND f.City = 'Reno' AND f.State = 'NV'
> Untested.
> HTH,
> Stu|||Eric Robinson (eric @. pmcipa..{com}) writes:
> These tables are part of our medical database. For example, a person
> seeking healthcare may want to know the names and contact information
> for all doctors in Reno, NV, who do cardiology. Sounds simple, but it
> isn't.
> A medical group can have many doctors.
> A doctor may be a member of more than one medical group.
> A doctor or group can have multiple specialties.
> A group can have multiple facilities (physical locations).
> So the tables look like this...

It is always preferable to post CREATE TABLE scripts for the table.
That and test data in INSERT statemants, and the desired result of
the test data. That will give you a tested solution.

So this is an untested solution:

SELECT D.DoctorName
FROM Doctors D
WHERE EXISTS (SELECT *
FROM Doc2Groups DG
JOIN Facility F ON F.GroupID = DG.GroupID
WHERE DG.DoctorID = D.DoctorID
AND F.State = 'NV'
AND F.City = 'Reno')
AND EXISTS (SELECT *
FROM Doc2Specialiity DS
JOIN Specialtities S ON DS.SpecialityID = S.SpecialityID
WHERE DS.DoctorID = S.DoctorID
AND S.SpecialityDesc = 'Cardiology')
UNION
SELECT D.DoctorName
FROM Doctors D
WHERE EXISTS (SELECT *
FROM Doc2Groups DG
JOIN Facility F ON F.GroupID = DG.GroupID
JOIN Group2Specialiity GS ON GS.GroupID = DS.GroupID
JOIN Specialtities S ON GS.SpecialityID = S.SpecialityID
WHERE DG.DoctorID = D.DoctorID
AND F.State = 'NV'
AND F.City = 'Reno'
AND S.SpecialityDesc = 'Cardiology')

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||On Mon, 12 Sep 2005 12:36:02 -0700, Eric Robinson wrote:

>Oops, I mistated the Specialties table. It is actually three tables:
(snip)

Hi Eric,

I'm glad you posted that, since I was just preparing to telll you how
you should change your design and all <grin>.

Anyway, since we now have doctors who do cardiology, groups that
specialize in cardiology and doctors that belong to groups that do
cardiology, it's not exactly clear what you want your query to return.
I'll assume you want to know what I would be interested in if my heart
starts acting funny while I'm in Reno - I'd like to know where to go
(and quick!).

The query below will return the name of the group and the details of the
location for each group with a location in Reno, NV that either has
cardiology as group specialization, or hosts at least one doctor who
specializes in cardiology.

SELECT g.GroupName, f.FacilityName, f.Address, f.Phone
FROM Groups AS g
INNER JOIN Facilities AS f
ON f.GroupID = g.GroupID
LEFT JOIN Group2Specialties AS g2s
ON g2s.GroupID = g.GroupID
CROSS JOIN (SELECT SpecialtyID
FROM Specialties
WHERE SpecialtyDesc = 'Cardiology') AS s(SpecialtyID)
WHERE f.City = 'Reno'
AND f.State = 'NV'
AND
( g2s.SpecialtyID = s.SpecialtyID
OR EXISTS
(SELECT *
FROM Docs2Groups AS d2g
INNER JOIN Doc2Specialties AS d2s
ON d2s.DoctorID = d2g.DoctorID
WHERE d2g.GroupID = g.GroupID
AND d2s.SpecialtyID = s.SpecialtyID))

(untested - see www.aspfaq.com/5006 if you prefer tested suggestions).

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)|||I was offline for a few hours and I see that I have some very throughtful
replies. I will take a closer look at them. In the meantime, based on Stu's
initial suggestion, I came up with the following, which SEEMS to work:

For simplicity's sake, I lied in my original message about the true names of
the tables, so the following query looks slightly different because it
contains real table names. (In the future I'll take Erland's suggestion and
post CREATE TABLE scripts instead.)

SELECT s.Specialty, p.LastName, p.FirstName, p.Degree, g.GroupName,
f.PhysAddr1, f.PhysCity, f.PhysAddr2, f.PhysState, f.Phone1
FROM tblProviders p JOIN tblBindProviderGroup p2g on p.ProviderID =
p2g.ProviderID
JOIN tblGroups g on g.GroupID=p2g.GroupID
JOIN tblFacilities f on f.GroupID=p2g.GroupID
JOIN tblBindProviderSpecialty p2s on p2s.ProviderID=p.ProviderID
JOIN tblSpecialties s on s.SpecialtyID=p2s.SpecialtyID
WHERE f.PhysCity='Reno'
ORDER BY p.LastName

I've run this against the actual data and it SEEMS to return correct
results.

I'm guessing that some of the other approaches people have posted are better
in ways I have not yet thought of.

--Eric

"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns96CFEF79E2BE1Yazorman@.127.0.0.1...
> Eric Robinson (eric @. pmcipa..{com}) writes:
>> These tables are part of our medical database. For example, a person
>> seeking healthcare may want to know the names and contact information
>> for all doctors in Reno, NV, who do cardiology. Sounds simple, but it
>> isn't.
>>
>> A medical group can have many doctors.
>> A doctor may be a member of more than one medical group.
>> A doctor or group can have multiple specialties.
>> A group can have multiple facilities (physical locations).
>>
>> So the tables look like this...
> It is always preferable to post CREATE TABLE scripts for the table.
> That and test data in INSERT statemants, and the desired result of
> the test data. That will give you a tested solution.
> So this is an untested solution:
> SELECT D.DoctorName
> FROM Doctors D
> WHERE EXISTS (SELECT *
> FROM Doc2Groups DG
> JOIN Facility F ON F.GroupID = DG.GroupID
> WHERE DG.DoctorID = D.DoctorID
> AND F.State = 'NV'
> AND F.City = 'Reno')
> AND EXISTS (SELECT *
> FROM Doc2Specialiity DS
> JOIN Specialtities S ON DS.SpecialityID = S.SpecialityID
> WHERE DS.DoctorID = S.DoctorID
> AND S.SpecialityDesc = 'Cardiology')
> UNION
> SELECT D.DoctorName
> FROM Doctors D
> WHERE EXISTS (SELECT *
> FROM Doc2Groups DG
> JOIN Facility F ON F.GroupID = DG.GroupID
> JOIN Group2Specialiity GS ON GS.GroupID = DS.GroupID
> JOIN Specialtities S ON GS.SpecialityID =
> S.SpecialityID
> WHERE DG.DoctorID = D.DoctorID
> AND F.State = 'NV'
> AND F.City = 'Reno'
> AND S.SpecialityDesc = 'Cardiology')
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp

Any recommendation for a good DBA tool.

Hi All
I looking for a good DBA tool to view the REAL TIME performance of my
databases especially the stored procedures. Anyone with recommendations
please help? Thank you in advance.Hi, Maybe Spotlight from Quest Software
"MittyKom" wrote:

> Hi All
> I looking for a good DBA tool to view the REAL TIME performance of my
> databases especially the stored procedures. Anyone with recommendations
> please help? Thank you in advance.
>|||I'm currently evaluating Quest Spotlight for SQL Server. I've evaluated a
few different offerings and I like this one the best. Additional
performance tools can be purchased as a suite (Quest Central) or as
indiviual components.
HTH
Jerry
"MittyKom" <MittyKom@.discussions.microsoft.com> wrote in message
news:302F5C4A-ED69-4175-A26C-C4E84BDF64A4@.microsoft.com...
> Hi All
> I looking for a good DBA tool to view the REAL TIME performance of my
> databases especially the stored procedures. Anyone with recommendations
> please help? Thank you in advance.
>|||What you want to get from the performance. I use Profiler to mornitor any
SP or ad hoc query that run more than 1 minues. If I found one, then I will
try to optimize the SQL statement. Why am I doing this? because I am a new
DBA, and most of our database design were done by a consultant firm. And I
found that a lot of SP were done terriblely.
Perayu
"MittyKom" <MittyKom@.discussions.microsoft.com> wrote in message
news:302F5C4A-ED69-4175-A26C-C4E84BDF64A4@.microsoft.com...
> Hi All
> I looking for a good DBA tool to view the REAL TIME performance of my
> databases especially the stored procedures. Anyone with recommendations
> please help? Thank you in advance.
>

Any recommendation for a good DBA tool.

Hi All
I looking for a good DBA tool to view the REAL TIME performance of my
databases especially the stored procedures. Anyone with recommendations
please help? Thank you in advance.
Hi, Maybe Spotlight from Quest Software
"MittyKom" wrote:

> Hi All
> I looking for a good DBA tool to view the REAL TIME performance of my
> databases especially the stored procedures. Anyone with recommendations
> please help? Thank you in advance.
>
|||I'm currently evaluating Quest Spotlight for SQL Server. I've evaluated a
few different offerings and I like this one the best. Additional
performance tools can be purchased as a suite (Quest Central) or as
indiviual components.
HTH
Jerry
"MittyKom" <MittyKom@.discussions.microsoft.com> wrote in message
news:302F5C4A-ED69-4175-A26C-C4E84BDF64A4@.microsoft.com...
> Hi All
> I looking for a good DBA tool to view the REAL TIME performance of my
> databases especially the stored procedures. Anyone with recommendations
> please help? Thank you in advance.
>
|||What you want to get from the performance. I use Profiler to mornitor any
SP or ad hoc query that run more than 1 minues. If I found one, then I will
try to optimize the SQL statement. Why am I doing this? because I am a new
DBA, and most of our database design were done by a consultant firm. And I
found that a lot of SP were done terriblely.
Perayu
"MittyKom" <MittyKom@.discussions.microsoft.com> wrote in message
news:302F5C4A-ED69-4175-A26C-C4E84BDF64A4@.microsoft.com...
> Hi All
> I looking for a good DBA tool to view the REAL TIME performance of my
> databases especially the stored procedures. Anyone with recommendations
> please help? Thank you in advance.
>

Any recommendation for a good DBA tool.

Hi All
I looking for a good DBA tool to view the REAL TIME performance of my
databases especially the stored procedures. Anyone with recommendations
please help? Thank you in advance.Hi, Maybe Spotlight from Quest Software
"MittyKom" wrote:
> Hi All
> I looking for a good DBA tool to view the REAL TIME performance of my
> databases especially the stored procedures. Anyone with recommendations
> please help? Thank you in advance.
>|||I'm currently evaluating Quest Spotlight for SQL Server. I've evaluated a
few different offerings and I like this one the best. Additional
performance tools can be purchased as a suite (Quest Central) or as
indiviual components.
HTH
Jerry
"MittyKom" <MittyKom@.discussions.microsoft.com> wrote in message
news:302F5C4A-ED69-4175-A26C-C4E84BDF64A4@.microsoft.com...
> Hi All
> I looking for a good DBA tool to view the REAL TIME performance of my
> databases especially the stored procedures. Anyone with recommendations
> please help? Thank you in advance.
>|||What you want to get from the performance. I use Profiler to mornitor any
SP or ad hoc query that run more than 1 minues. If I found one, then I will
try to optimize the SQL statement. Why am I doing this? because I am a new
DBA, and most of our database design were done by a consultant firm. And I
found that a lot of SP were done terriblely.
Perayu
"MittyKom" <MittyKom@.discussions.microsoft.com> wrote in message
news:302F5C4A-ED69-4175-A26C-C4E84BDF64A4@.microsoft.com...
> Hi All
> I looking for a good DBA tool to view the REAL TIME performance of my
> databases especially the stored procedures. Anyone with recommendations
> please help? Thank you in advance.
>

2012年2月13日星期一

antivirus software question

I currently exclude the directories that contain the sql database files
(mdf, ldf) from my antivirus 'real time protection' and scheduled sweep
scans. Actually I do this for any database files (act, quickbooks, ms
access) but I was recently thinking about this and I realized that I'm not
really sure if its necessary?
sticking with SQL server 2000/2005 since that is what this forum is for, is
it true that I should be excluding these directories (the ones with the
database and log files) from my antivirus software's protection?
and just in case someone is also familiar with the needs of any of the other
databases I mentioned, please feel free to comment on them as well. All
those other systems are flat file based database systems. I don't know if
that makes a difference with respect to antivirus software.
Each AntiVirus software scans computers differently. To generally say that
one wont affect your SQL server when anther might would be misleading.
You should test scanning folders with your particular software to see it
affects your SQL server. A decision should be made by the business owner as
to whether scanning that directory is mandated or not.
There are tons of known issues using Antivirus in a clutered envirnoment so
special attention should be givin in this situation.
here are two great articles...
"Guidelines for choosing antivirus software to run on the computers that are
running SQL Server"
http://support.microsoft.com/?kbid=309422
"Antivirus Software May Cause Problems with Cluster Services"
http://support.microsoft.com/kb/250355/
thanks,
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/
"djc" <noone@.nowhere.com> wrote in message
news:ezYIrdB3GHA.4228@.TK2MSFTNGP06.phx.gbl...
>I currently exclude the directories that contain the sql database files
>(mdf, ldf) from my antivirus 'real time protection' and scheduled sweep
>scans. Actually I do this for any database files (act, quickbooks, ms
>access) but I was recently thinking about this and I realized that I'm not
>really sure if its necessary?
> sticking with SQL server 2000/2005 since that is what this forum is for,
> is it true that I should be excluding these directories (the ones with the
> database and log files) from my antivirus software's protection?
> and just in case someone is also familiar with the needs of any of the
> other databases I mentioned, please feel free to comment on them as well.
> All those other systems are flat file based database systems. I don't know
> if that makes a difference with respect to antivirus software.
>
|||thanks for the reply Warren. Are you refering to stability/corruption
effects or only performance effects? My main concern is if there may be
stability/corruption issues due to the antivirus, not performance. I could
gage the performance easily enough after making a change but its the
possible corruption and/or stability issues that my not be immediately
apparrent (and possibly realized to late!) that worry me. Does this change
anything? or is this still a per product issue that requires individual
testing? ...I'm always looking for that nice, simple, yet broad, rule thats
easy to remember : )
"Warren Brunk" <wbrunk@.techintsolutions.com> wrote in message
news:%23EaUchB3GHA.4312@.TK2MSFTNGP02.phx.gbl...
> Each AntiVirus software scans computers differently. To generally say
> that one wont affect your SQL server when anther might would be
> misleading.
> You should test scanning folders with your particular software to see it
> affects your SQL server. A decision should be made by the business owner
> as to whether scanning that directory is mandated or not.
> There are tons of known issues using Antivirus in a clutered envirnoment
> so special attention should be givin in this situation.
> here are two great articles...
> "Guidelines for choosing antivirus software to run on the computers that
> are running SQL Server"
> http://support.microsoft.com/?kbid=309422
> "Antivirus Software May Cause Problems with Cluster Services"
> http://support.microsoft.com/kb/250355/
> thanks,
> --
> /*
> Warren Brunk - MCITP - SQL 2005, MCDBA
> www.techintsolutions.com
> */
>
> "djc" <noone@.nowhere.com> wrote in message
> news:ezYIrdB3GHA.4228@.TK2MSFTNGP06.phx.gbl...
>
|||I am referring to both stability, performance and security. Installing
AntiVirus on a SQL server increases surface area which has security risks.
But what I am really trying to say is you need to test it with your
particular anti virus software. For me, I dont want anything actively
scanning my SQL server files for a thousand reasons. Antivirus software can
certainly create a bottleneck due to the program requiring too much CPU
time -- especially if the server is also running an e-mail server or program
that requires a lot of antivirus resources (not necessarily a best
practice). It can also create file I/O problems if real-time scanning is
enabled for all files that are opened. I definitely recommend running
malware protection on a SQL Server (or any database server for that matter),
but be sure to exclude your database directories (or specific database
files) from the real-time protection if you can. Also, keep an eye out on
processor utilization to make sure the malware protection is not eating up
all the resources.
I have seen countless forums on how AV software locks up your DB files and
put the database in Suspect Mode or causing SQL server to fail.
thanks,
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/
"djc" <noone@.nowhere.com> wrote in message
news:%23QtRDrB3GHA.4484@.TK2MSFTNGP02.phx.gbl...
> thanks for the reply Warren. Are you refering to stability/corruption
> effects or only performance effects? My main concern is if there may be
> stability/corruption issues due to the antivirus, not performance. I could
> gage the performance easily enough after making a change but its the
> possible corruption and/or stability issues that my not be immediately
> apparrent (and possibly realized to late!) that worry me. Does this change
> anything? or is this still a per product issue that requires individual
> testing? ...I'm always looking for that nice, simple, yet broad, rule
> thats easy to remember : )
> "Warren Brunk" <wbrunk@.techintsolutions.com> wrote in message
> news:%23EaUchB3GHA.4312@.TK2MSFTNGP02.phx.gbl...
>

antivirus software question

I currently exclude the directories that contain the sql database files
(mdf, ldf) from my antivirus 'real time protection' and scheduled sweep
scans. Actually I do this for any database files (act, quickbooks, ms
access) but I was recently thinking about this and I realized that I'm not
really sure if its necessary?
sticking with SQL server 2000/2005 since that is what this forum is for, is
it true that I should be excluding these directories (the ones with the
database and log files) from my antivirus software's protection?
and just in case someone is also familiar with the needs of any of the other
databases I mentioned, please feel free to comment on them as well. All
those other systems are flat file based database systems. I don't know if
that makes a difference with respect to antivirus software.Each AntiVirus software scans computers differently. To generally say that
one wont affect your SQL server when anther might would be misleading.
You should test scanning folders with your particular software to see it
affects your SQL server. A decision should be made by the business owner as
to whether scanning that directory is mandated or not.
There are tons of known issues using Antivirus in a clutered envirnoment so
special attention should be givin in this situation.
here are two great articles...
"Guidelines for choosing antivirus software to run on the computers that are
running SQL Server"
http://support.microsoft.com/?kbid=309422
"Antivirus Software May Cause Problems with Cluster Services"
http://support.microsoft.com/kb/250355/
thanks,
--
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/
"djc" <noone@.nowhere.com> wrote in message
news:ezYIrdB3GHA.4228@.TK2MSFTNGP06.phx.gbl...
>I currently exclude the directories that contain the sql database files
>(mdf, ldf) from my antivirus 'real time protection' and scheduled sweep
>scans. Actually I do this for any database files (act, quickbooks, ms
>access) but I was recently thinking about this and I realized that I'm not
>really sure if its necessary?
> sticking with SQL server 2000/2005 since that is what this forum is for,
> is it true that I should be excluding these directories (the ones with the
> database and log files) from my antivirus software's protection?
> and just in case someone is also familiar with the needs of any of the
> other databases I mentioned, please feel free to comment on them as well.
> All those other systems are flat file based database systems. I don't know
> if that makes a difference with respect to antivirus software.
>|||thanks for the reply Warren. Are you refering to stability/corruption
effects or only performance effects? My main concern is if there may be
stability/corruption issues due to the antivirus, not performance. I could
gage the performance easily enough after making a change but its the
possible corruption and/or stability issues that my not be immediately
apparrent (and possibly realized to late!) that worry me. Does this change
anything? or is this still a per product issue that requires individual
testing? ...I'm always looking for that nice, simple, yet broad, rule thats
easy to remember : )
"Warren Brunk" <wbrunk@.techintsolutions.com> wrote in message
news:%23EaUchB3GHA.4312@.TK2MSFTNGP02.phx.gbl...
> Each AntiVirus software scans computers differently. To generally say
> that one wont affect your SQL server when anther might would be
> misleading.
> You should test scanning folders with your particular software to see it
> affects your SQL server. A decision should be made by the business owner
> as to whether scanning that directory is mandated or not.
> There are tons of known issues using Antivirus in a clutered envirnoment
> so special attention should be givin in this situation.
> here are two great articles...
> "Guidelines for choosing antivirus software to run on the computers that
> are running SQL Server"
> http://support.microsoft.com/?kbid=309422
> "Antivirus Software May Cause Problems with Cluster Services"
> http://support.microsoft.com/kb/250355/
> thanks,
> --
> /*
> Warren Brunk - MCITP - SQL 2005, MCDBA
> www.techintsolutions.com
> */
>
> "djc" <noone@.nowhere.com> wrote in message
> news:ezYIrdB3GHA.4228@.TK2MSFTNGP06.phx.gbl...
>>I currently exclude the directories that contain the sql database files
>>(mdf, ldf) from my antivirus 'real time protection' and scheduled sweep
>>scans. Actually I do this for any database files (act, quickbooks, ms
>>access) but I was recently thinking about this and I realized that I'm not
>>really sure if its necessary?
>> sticking with SQL server 2000/2005 since that is what this forum is for,
>> is it true that I should be excluding these directories (the ones with
>> the database and log files) from my antivirus software's protection?
>> and just in case someone is also familiar with the needs of any of the
>> other databases I mentioned, please feel free to comment on them as well.
>> All those other systems are flat file based database systems. I don't
>> know if that makes a difference with respect to antivirus software.
>|||I am referring to both stability, performance and security. Installing
AntiVirus on a SQL server increases surface area which has security risks.
But what I am really trying to say is you need to test it with your
particular anti virus software. For me, I dont want anything actively
scanning my SQL server files for a thousand reasons. Antivirus software can
certainly create a bottleneck due to the program requiring too much CPU
time -- especially if the server is also running an e-mail server or program
that requires a lot of antivirus resources (not necessarily a best
practice). It can also create file I/O problems if real-time scanning is
enabled for all files that are opened. I definitely recommend running
malware protection on a SQL Server (or any database server for that matter),
but be sure to exclude your database directories (or specific database
files) from the real-time protection if you can. Also, keep an eye out on
processor utilization to make sure the malware protection is not eating up
all the resources.
I have seen countless forums on how AV software locks up your DB files and
put the database in Suspect Mode or causing SQL server to fail.
thanks,
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/
"djc" <noone@.nowhere.com> wrote in message
news:%23QtRDrB3GHA.4484@.TK2MSFTNGP02.phx.gbl...
> thanks for the reply Warren. Are you refering to stability/corruption
> effects or only performance effects? My main concern is if there may be
> stability/corruption issues due to the antivirus, not performance. I could
> gage the performance easily enough after making a change but its the
> possible corruption and/or stability issues that my not be immediately
> apparrent (and possibly realized to late!) that worry me. Does this change
> anything? or is this still a per product issue that requires individual
> testing? ...I'm always looking for that nice, simple, yet broad, rule
> thats easy to remember : )
> "Warren Brunk" <wbrunk@.techintsolutions.com> wrote in message
> news:%23EaUchB3GHA.4312@.TK2MSFTNGP02.phx.gbl...
>> Each AntiVirus software scans computers differently. To generally say
>> that one wont affect your SQL server when anther might would be
>> misleading.
>> You should test scanning folders with your particular software to see it
>> affects your SQL server. A decision should be made by the business owner
>> as to whether scanning that directory is mandated or not.
>> There are tons of known issues using Antivirus in a clutered envirnoment
>> so special attention should be givin in this situation.
>> here are two great articles...
>> "Guidelines for choosing antivirus software to run on the computers that
>> are running SQL Server"
>> http://support.microsoft.com/?kbid=309422
>> "Antivirus Software May Cause Problems with Cluster Services"
>> http://support.microsoft.com/kb/250355/
>> thanks,
>> --
>> /*
>> Warren Brunk - MCITP - SQL 2005, MCDBA
>> www.techintsolutions.com
>> */
>>
>> "djc" <noone@.nowhere.com> wrote in message
>> news:ezYIrdB3GHA.4228@.TK2MSFTNGP06.phx.gbl...
>>I currently exclude the directories that contain the sql database files
>>(mdf, ldf) from my antivirus 'real time protection' and scheduled sweep
>>scans. Actually I do this for any database files (act, quickbooks, ms
>>access) but I was recently thinking about this and I realized that I'm
>>not really sure if its necessary?
>> sticking with SQL server 2000/2005 since that is what this forum is for,
>> is it true that I should be excluding these directories (the ones with
>> the database and log files) from my antivirus software's protection?
>> and just in case someone is also familiar with the needs of any of the
>> other databases I mentioned, please feel free to comment on them as
>> well. All those other systems are flat file based database systems. I
>> don't know if that makes a difference with respect to antivirus
>> software.
>>
>

antivirus software question

I currently exclude the directories that contain the sql database files
(mdf, ldf) from my antivirus 'real time protection' and scheduled sweep
scans. Actually I do this for any database files (act, quickbooks, ms
access) but I was recently thinking about this and I realized that I'm not
really sure if its necessary?
sticking with SQL server 2000/2005 since that is what this forum is for, is
it true that I should be excluding these directories (the ones with the
database and log files) from my antivirus software's protection?
and just in case someone is also familiar with the needs of any of the other
databases I mentioned, please feel free to comment on them as well. All
those other systems are flat file based database systems. I don't know if
that makes a difference with respect to antivirus software.Each AntiVirus software scans computers differently. To generally say that
one wont affect your SQL server when anther might would be misleading.
You should test scanning folders with your particular software to see it
affects your SQL server. A decision should be made by the business owner as
to whether scanning that directory is mandated or not.
There are tons of known issues using Antivirus in a clutered envirnoment so
special attention should be givin in this situation.
here are two great articles...
"Guidelines for choosing antivirus software to run on the computers that are
running SQL Server"
http://support.microsoft.com/?kbid=309422
"Antivirus Software May Cause Problems with Cluster Services"
http://support.microsoft.com/kb/250355/
thanks,
--
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/
"djc" <noone@.nowhere.com> wrote in message
news:ezYIrdB3GHA.4228@.TK2MSFTNGP06.phx.gbl...
>I currently exclude the directories that contain the sql database files
>(mdf, ldf) from my antivirus 'real time protection' and scheduled sweep
>scans. Actually I do this for any database files (act, quickbooks, ms
>access) but I was recently thinking about this and I realized that I'm not
>really sure if its necessary?
> sticking with SQL server 2000/2005 since that is what this forum is for,
> is it true that I should be excluding these directories (the ones with the
> database and log files) from my antivirus software's protection?
> and just in case someone is also familiar with the needs of any of the
> other databases I mentioned, please feel free to comment on them as well.
> All those other systems are flat file based database systems. I don't know
> if that makes a difference with respect to antivirus software.
>|||thanks for the reply Warren. Are you refering to stability/corruption
effects or only performance effects? My main concern is if there may be
stability/corruption issues due to the antivirus, not performance. I could
gage the performance easily enough after making a change but its the
possible corruption and/or stability issues that my not be immediately
apparrent (and possibly realized to late!) that worry me. Does this change
anything? or is this still a per product issue that requires individual
testing? ...I'm always looking for that nice, simple, yet broad, rule thats
easy to remember : )
"Warren Brunk" <wbrunk@.techintsolutions.com> wrote in message
news:%23EaUchB3GHA.4312@.TK2MSFTNGP02.phx.gbl...
> Each AntiVirus software scans computers differently. To generally say
> that one wont affect your SQL server when anther might would be
> misleading.
> You should test scanning folders with your particular software to see it
> affects your SQL server. A decision should be made by the business owner
> as to whether scanning that directory is mandated or not.
> There are tons of known issues using Antivirus in a clutered envirnoment
> so special attention should be givin in this situation.
> here are two great articles...
> "Guidelines for choosing antivirus software to run on the computers that
> are running SQL Server"
> http://support.microsoft.com/?kbid=309422
> "Antivirus Software May Cause Problems with Cluster Services"
> http://support.microsoft.com/kb/250355/
> thanks,
> --
> /*
> Warren Brunk - MCITP - SQL 2005, MCDBA
> www.techintsolutions.com
> */
>
> "djc" <noone@.nowhere.com> wrote in message
> news:ezYIrdB3GHA.4228@.TK2MSFTNGP06.phx.gbl...
>|||I am referring to both stability, performance and security. Installing
AntiVirus on a SQL server increases surface area which has security risks.
But what I am really trying to say is you need to test it with your
particular anti virus software. For me, I dont want anything actively
scanning my SQL server files for a thousand reasons. Antivirus software can
certainly create a bottleneck due to the program requiring too much CPU
time -- especially if the server is also running an e-mail server or program
that requires a lot of antivirus resources (not necessarily a best
practice). It can also create file I/O problems if real-time scanning is
enabled for all files that are opened. I definitely recommend running
malware protection on a SQL Server (or any database server for that matter),
but be sure to exclude your database directories (or specific database
files) from the real-time protection if you can. Also, keep an eye out on
processor utilization to make sure the malware protection is not eating up
all the resources.
I have seen countless forums on how AV software locks up your DB files and
put the database in Suspect Mode or causing SQL server to fail.
thanks,
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/
"djc" <noone@.nowhere.com> wrote in message
news:%23QtRDrB3GHA.4484@.TK2MSFTNGP02.phx.gbl...
> thanks for the reply Warren. Are you refering to stability/corruption
> effects or only performance effects? My main concern is if there may be
> stability/corruption issues due to the antivirus, not performance. I could
> gage the performance easily enough after making a change but its the
> possible corruption and/or stability issues that my not be immediately
> apparrent (and possibly realized to late!) that worry me. Does this change
> anything? or is this still a per product issue that requires individual
> testing? ...I'm always looking for that nice, simple, yet broad, rule
> thats easy to remember : )
> "Warren Brunk" <wbrunk@.techintsolutions.com> wrote in message
> news:%23EaUchB3GHA.4312@.TK2MSFTNGP02.phx.gbl...
>