Showing posts with label phone. Show all posts
Showing posts with label phone. Show all posts

Friday, February 24, 2012

BSOD with hyper threading and SQL

Dell Power Edge 6650 duel 1.5 Xeon SQL 2000
I have been on the phone with dell trying to resolve an
issue with the server stated above. I kept getting bsod's
and they finally told me to dissable the HTT in the bios
and everything worked fine so far. They say that SQL see's
four processors and we are only lc. for two proc therefor
creating the bsod. This is wrong... SP2 and SP3 inable
htt and utilize it. right? Please help I cant except the
resolve they gave me.SQL Server is only user mode code, so it doesn't BSOD, so DELL are obviously
feeding you some crap. And SQL Server will definitely not BSOD deliberately
for licensing reasons!
What happens sometimes is that SQL Server pushes the HW enough so that you
see HW or driver problems which you won't see under normal load. You need to
find the offending driver or HW.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Eddie" <anonymous@.discussions.microsoft.com> wrote in message
news:c2b701c40c54$157ce7b0$a601280a@.phx.gbl...
> Dell Power Edge 6650 duel 1.5 Xeon SQL 2000
> I have been on the phone with dell trying to resolve an
> issue with the server stated above. I kept getting bsod's
> and they finally told me to dissable the HTT in the bios
> and everything worked fine so far. They say that SQL see's
> four processors and we are only lc. for two proc therefor
> creating the bsod. This is wrong... SP2 and SP3 inable
> htt and utilize it. right? Please help I cant except the
> resolve they gave me.|||I'm on the phone with them now. Ill post with the reply
they give me. Thanks
>--Original Message--
>SQL Server is only user mode code, so it doesn't BSOD, so
DELL are obviously
>feeding you some crap. And SQL Server will definitely not
BSOD deliberately
>for licensing reasons!
>What happens sometimes is that SQL Server pushes the HW
enough so that you
>see HW or driver problems which you won't see under
normal load. You need to
>find the offending driver or HW.
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>
>"Eddie" <anonymous@.discussions.microsoft.com> wrote in
message
>news:c2b701c40c54$157ce7b0$a601280a@.phx.gbl...
bsod's
see's
therefor
>
>.
>|||I agree with Tibor. I currently have some Dell 6650 units in service and
they are pretty stable when they are on current firmware. The HT issue is
not a valid cause for a BSOD, but I would put SQL build 818 on just in case.
It is the post-SP3 hotfix specifically for HyperThreaded systems.
You can download and apply firmware patches and driver updates yourself with
the OpenManage software included with your Dell system or you can get a tech
out to do a complete system-wide firmware upgrade. That option may cost
money, depending on what level of support you have for your server. Since
it is crashing, you may be able to get it serviced under warranty.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23eeFDUFDEHA.2052@.TK2MSFTNGP11.phx.gbl...
> SQL Server is only user mode code, so it doesn't BSOD, so DELL are
obviously
> feeding you some crap. And SQL Server will definitely not BSOD
deliberately
> for licensing reasons!
> What happens sometimes is that SQL Server pushes the HW enough so that you
> see HW or driver problems which you won't see under normal load. You need
to
> find the offending driver or HW.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Eddie" <anonymous@.discussions.microsoft.com> wrote in message
> news:c2b701c40c54$157ce7b0$a601280a@.phx.gbl...
>

Tuesday, February 14, 2012

Breaking down Total Hours worked into Day and Evening hours

I have data coming from a telephony system that keeps track of when an
employee makes a phone call to conduct a survey and which project number
is being billed for the time the employee spends on that phone call in a
MS SQL Server 2000 database (which I don't own).

The data is being returned to me in a view (see DDL for w_HR_Call_Log
below). I link to this view in MS access through ODBC to create a
linked table. I have my own view in Access that converts the integer
numbers for start and end date to Date/Time and inserts some other
information i need.

This data is eventually going to be compared with data from some
electronic timesheets for purposes of comparing entered hours vs hours
actually spent on the telephone, and the people that will be viewing the
data need the total time on the telephone as wall as that total broken
down by day/evening and weekend. Getting weekend durations is easy
enough (see SQL for qryTelephonyData below), but I was wondering if
anyone knew of efficient set-based methods for doing a day/evening
breakdown of some duration given a start date and end date (with the
day/evening boundary being 17:59:59)? My impression is that to do this
correctly (i.e., handle employees working in different time zones,
adjusting for DST, and figuring out what the boundary is for switching
from evening back to day) will require procedural code (probably in
Visual Basic or VBA).

However, if there are set-based algorithms that can accomplish it in
SQL, I'd like to explore those, as well. Can anyone give any pointers?
Thanks.

--
DDL for view in MS SQL 2000 database:

CREATE VIEW dbo.w_HR_Call_Log
AS
SELECT TOP 100 PERCENT dbo.TRCUsers.WinsID, dbo.users.username AS
Initials, dbo.billing.startdate, dbo.billing.startdate +
dbo.billing.duration AS EndDate,
dbo.billing.duration, dbo.projects.name AS
PrjName, dbo.w_GetCallTrackProject6ID(dbo.projects.descript ion) AS ProjID6,

dbo.w_GetCallTrackProject10ID(dbo.projects.descrip tion) AS ProjID10,
dbo.billing.interactionid
FROM dbo.projects INNER JOIN
dbo.projectsphone INNER JOIN
dbo.users INNER JOIN
dbo.TRCUsers ON dbo.users.userid =
dbo.TRCUsers.UserID INNER JOIN
dbo.billing ON dbo.users.userid =
dbo.billing.userid ON dbo.projectsphone.projectid =
dbo.billing.projectid ON
dbo.projects.projectid = dbo.projectsphone.projectid
WHERE (dbo.billing.userid 0)
ORDER BY dbo.billing.startdate

I don't have acess to the tables, but the fields in the view come
through as the following data types:
WinsID - varchar(10)
Initials - varchar(30)
startdate - long integer (seconds since 1970-01-01 00:00:00)
enddate - long integer (seconds since 1970-01-01 00:00:00)
duration - long integer (enddate - startdate)
ProjID10 - varchar(15)
interactionid - varchar(255) (the identifier for this phone call)

MS Access SQL statement for qryTelephonyData (based on the view,
w_HR_Call_Log):
SELECT dbo_w_HR_Call_Log.WinsID, dbo_w_HR_Call_Log.ProjID10,
FORMAT(CDATE(DATEADD('s',startdate-(5*60*60),'01-01-1970
00:00:00')),"yyyy-mm-dd") AS HoursDate,
CDATE(DATEADD('s',startdate-(5*60*60),'01-01-1970 00:00:00')) AS
StartDT,
CDATE(DATEADD('s',enddate-(5*60*60),'01-01-1970 00:00:00')) AS EndDT,
DatePart('w',[StartDT]) AS StartDTDayOfWeek, Duration,
IIf(StartDTDayOfWeek=1 Or StartDTDayOfWeek=7,Duration,0) AS
WeekendSeconds,
FROM dbo_w_HR_Call_Log
WHERE WinsID<>'0'Beowulf (beowulf_is_not_here@.hotmail.com) writes:

Quote:

Originally Posted by

This data is eventually going to be compared with data from some
electronic timesheets for purposes of comparing entered hours vs hours
actually spent on the telephone, and the people that will be viewing the
data need the total time on the telephone as wall as that total broken
down by day/evening and weekend. Getting weekend durations is easy
enough (see SQL for qryTelephonyData below), but I was wondering if
anyone knew of efficient set-based methods for doing a day/evening
breakdown of some duration given a start date and end date (with the
day/evening boundary being 17:59:59)? My impression is that to do this
correctly (i.e., handle employees working in different time zones,
adjusting for DST, and figuring out what the boundary is for switching
from evening back to day) will require procedural code (probably in
Visual Basic or VBA).
>
However, if there are set-based algorithms that can accomplish it in
SQL, I'd like to explore those, as well. Can anyone give any pointers?


It sounds perfectly possible to do that set-based, provided there is
enough data. Mapping the hour to day/night may be best be done
through a table, so you can enter the table with the hour and get
back what part of the day it is. With a calendar table, you can also
use this for days, so that you can catch non-working days in the middle
of the week.

The time zone is a little more complicated, but provided that there is
a time zone available somewhere this should not be any problem. Assuming
that all times are stored in UTC (or some other time zone), just add the
time-zone offset to get the local time.

Quote:

Originally Posted by

CREATE VIEW dbo.w_HR_Call_Log
AS
SELECT TOP 100 PERCENT dbo.TRCUsers.WinsID, dbo.users.username AS
>...
ORDER BY dbo.billing.startdate


I would recommend that you take out that TOP 100 PERCENT and ORDER BY,
as it fills no purpose, but just results in extra query overhead.

If you want the data to be sorted that way, you need to apply an
ORDER BY clause when you retrieve it. In SQL 2000 it may seen that
when you say "SELECT ... FROM view" that you get the order anyway,
but that is mere chance, and on SQL 2005 that does typically not happen.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Erland Sommarskog wrote:

Quote:

Originally Posted by

Beowulf (beowulf_is_not_here@.hotmail.com) writes:

Quote:

Originally Posted by

>This data is eventually going to be compared with data from some
>electronic timesheets for purposes of comparing entered hours vs hours
>actually spent on the telephone, and the people that will be viewing the
>data need the total time on the telephone as wall as that total broken
>down by day/evening and weekend. Getting weekend durations is easy
>enough (see SQL for qryTelephonyData below), but I was wondering if
>anyone knew of efficient set-based methods for doing a day/evening
>breakdown of some duration given a start date and end date (with the
>day/evening boundary being 17:59:59)? My impression is that to do this
>correctly (i.e., handle employees working in different time zones,
>adjusting for DST, and figuring out what the boundary is for switching
>from evening back to day) will require procedural code (probably in
>Visual Basic or VBA).
>>
>However, if there are set-based algorithms that can accomplish it in
>SQL, I'd like to explore those, as well. Can anyone give any pointers?


>
It sounds perfectly possible to do that set-based, provided there is
enough data. Mapping the hour to day/night may be best be done
through a table, so you can enter the table with the hour and get
back what part of the day it is. With a calendar table, you can also
use this for days, so that you can catch non-working days in the middle
of the week.


Thanks for taking the time to reply. I always appreciate your advice
here. I'm a little confused by your suggestion. What I have is a
duration (start datetime and end datetime). Would an "hour" to "part of
day" table still work with this data or would I have to convert the
start and end date into something else first? Do you have any pointers
to good tutorials on calendar tables (or is google my friend)? It's a
concept I haven't heard of before.

Quote:

Originally Posted by

The time zone is a little more complicated, but provided that there is
a time zone available somewhere this should not be any problem. Assuming
that all times are stored in UTC (or some other time zone), just add the
time-zone offset to get the local time.


As returned by the view, the startdate and enddate are integers (number
of seconds since 1970-01-01 00:00:00) so it's fairly simple to convert
to UTC.

Quote:

Originally Posted by

Quote:

Originally Posted by

>CREATE VIEW dbo.w_HR_Call_Log
>AS
>SELECT TOP 100 PERCENT dbo.TRCUsers.WinsID, dbo.users.username AS
>...
>ORDER BY dbo.billing.startdate


>
I would recommend that you take out that TOP 100 PERCENT and ORDER BY,
as it fills no purpose, but just results in extra query overhead.
>
If you want the data to be sorted that way, you need to apply an
ORDER BY clause when you retrieve it. In SQL 2000 it may seen that
when you say "SELECT ... FROM view" that you get the order anyway,
but that is mere chance, and on SQL 2005 that does typically not happen.


Thank you for the advice. I learned that fact a little while ago in
this very newsgroup. I don't own that particular view, though.|||Beowulf (beowulf_is_not_here@.hotmail.com) writes:

Quote:

Originally Posted by

Thanks for taking the time to reply. I always appreciate your advice
here. I'm a little confused by your suggestion. What I have is a
duration (start datetime and end datetime). Would an "hour" to "part of
day" table still work with this data or would I have to convert the
start and end date into something else first?


I don't know. That is, I don't know what your business requirements are,
so I cannot answer. I made the simple assumption that only the start time
applied. If you want to split a call that started at 17:23 and ended at
18:14 into day and evening, I don't know in which way you want to split it.

<Standard rant>

Please post:

o CREATE TABLE(s) statements for your tables.
o INSERT statements with sample data.
o The desired result given the sample.

That makes it possible to easily copy and paste to develop a tested
solution.

</Standard rant>

(It's not likely that it will be me this time though, as I'm
off for vacation tomorrow.)

Quote:

Originally Posted by

Do you have any pointers to good tutorials on calendar tables (or is
google my friend)? It's a concept I haven't heard of before.


http://www.aspfaq.com, search for calendar. Aaron has several entries
on them.

Essentially a calendar is a table with one row for each day, and then
you associate attributes to the days that are appropriate for your
business like IsWorkingDay.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

break table across pages but keep the control under it on first page

I am trying to create appointment reminder letters, and at the bottom
of the first page of each letter I need the clinic contact information
(phone number and name). Immediately prior to this I must list various
instructions regarding what to bring, what to eat/not eat beforehand,
etc.
Regardless of the length of the list of instructions I still need the
clinic contact information to render at the bottom of the 1st page of
every letter, even if the list of instructions has to continue on to
page 2.
When I create a table footer it only appears on the 1st page of the 1st
child's letter, while the other several hundred letters get no footer.
(surely this can be done in one .PDF instead of a subscription to
create several hundred separate .PDFs?)
Here's what I need for each child:
|Page 1|
<Patient address, etc.>
<Schedule of appointments for the day>
<List of instructions>
<Clinic CONTACT INFO> <--bottom of 1st page of EVERY letter
|Page 1|
|Page 2|
<any remaining items from the list of instructions above>
<rest of my report requirements here...>
Any suggestions on how to do this are greatly appreciated.
Thanks,
Stewart Whaley
Arkansas Children's HospitalPut the information in the Page footer and set the page footer properties to
only print on the first page.
If you have multiple items in the footer--some for page 1 and some for page
2, you will have to set the visibility in a formula.
"Stewart" <whaleysa@.archildrens.org> wrote in message
news:1121353944.165681.77900@.o13g2000cwo.googlegroups.com...
>I am trying to create appointment reminder letters, and at the bottom
> of the first page of each letter I need the clinic contact information
> (phone number and name). Immediately prior to this I must list various
> instructions regarding what to bring, what to eat/not eat beforehand,
> etc.
> Regardless of the length of the list of instructions I still need the
> clinic contact information to render at the bottom of the 1st page of
> every letter, even if the list of instructions has to continue on to
> page 2.
> When I create a table footer it only appears on the 1st page of the 1st
> child's letter, while the other several hundred letters get no footer.
> (surely this can be done in one .PDF instead of a subscription to
> create several hundred separate .PDFs?)
> Here's what I need for each child:
> |Page 1|
> <Patient address, etc.>
> <Schedule of appointments for the day>
> <List of instructions>
> <Clinic CONTACT INFO> <--bottom of 1st page of EVERY letter
> |Page 1|
> |Page 2|
> <any remaining items from the list of instructions above>
> <rest of my report requirements here...>
> Any suggestions on how to do this are greatly appreciated.
> Thanks,
> Stewart Whaley
> Arkansas Children's Hospital
>|||My problem now is that I have the footer on every page but the last of
every letter except for the very last page of the last kid's letter.
For example, I have:
<PAGE 1>
Bob Jones
1233 Jones Street
Allergy Clinic 9:00
Dental Clinic 10:30
Don't forget:
* Please don't eat Oreos before you dental appointment
* Don't pet tigers
Clinic contact info (this is in a the footer because it MUST be at the
bottom of the 1st page and only the 1st page of each kid's letter).
<PAGE 2>
Continuation of the "Don't Forget" list from page 2
Image of map for the particular clinic(s)
Clinic contact info footer is repeating here and I DON'T want this
repeated within the SAME letter.
PAGE 3 (Start of the next letter)
Jon Smith
111 1st Street
Allergy Clinic 9:30
Orthopedic Clinic 11:00
Don't forget:
* Please don't jump off of buildings
* Still don't pet tigers
Clinic contact information (as expected)
<PAGE 2>
Continuation of "Don't Forget" stuff here if it is long enough to
stretch to page 2
Clinic contact information footer repeated again but I don't want it
repeated.
..........
I don't know what to do but I just want the clinic contact info at the
bottom of only the 1st page of each letter.
Unfortunately, a single letter's isn't guaranteed to be 2 pages,
either, so I'm not sure I can come up with a formula for hiding the
footer on every page but the 1st for each kid...
Thanks,
Stewart