Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Performance Monitor / Database Storage using ODBC

13 views
Skip to first unread message

PetitGosaimass

unread,
Nov 28, 2007, 6:47:00 AM11/28/07
to
Hello,

i am trying to to store some performance monitor counters into a SQl Server
Database (SQL 2005 Std, on a W2K3 cluster environment).

It seems to be working, using an ODBC Datasource with the SQLServer driver
(th native client is not compatible with an odbc feature according to a
message in the event viewer).

But, it cannot return on Physical Disk Queue Length. And the reason seams
quite simple : my server is French...thus there is a quote in "Longueur de
file d'attente", which produces this error. Same problem with any other
counter that includes a quote ' in its name.

And it doesn't seem that the performznce monitor sends tsql batch using
quotes, which would have help with the quoted_identifiers ON.

Do you have any work around for this problem ?

Thank you very much

X.M.

Andrew J. Kelly

unread,
Nov 28, 2007, 11:01:15 AM11/28/07
to
Are you logging directly from Perfmon to SQL Server? If so try logging to a
file first and then using Relog to load to a table. I am not sure if this
will matter or not since they both use ODBC but there may be a slight
difference in the way Relog works over Perfmon when connecting.

relog C:\Perflogs\YourTraceLogFile.blg -f SQL -o SQL:YourDSN!YourDescriptor

Type relog.exe /? for details on the commands.


--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"PetitGosaimass" <PetitGo...@discussions.microsoft.com> wrote in message
news:A61547C7-2655-4B44...@microsoft.com...

PetitGosaimass

unread,
Nov 28, 2007, 12:08:03 PM11/28/07
to
Andrew,

thank you for this answer.
Yes, I log striaght into SQL Server from Perfmon.

Following your advice, I used relog, but unfortunately, the same problem
occurs when it tries to insert the CounterDetail line with the containing the
quote mark.
Same problem as with the Performance Monitor. Same ODBC Problem I guess
regarding quotation mark and quoted identifiers.

You will find below the SQL Batch and the error caught in the SQL Profiler

Any other workaround ?

Xavier


SQL Error
Exception : Error: 105, Severity: 15, State: 1
USer Error Message : Ouvrez les guillemets après la chaîne de caractères
',NULL,NULL,NULL,10000000,0) Select @@Identity commit transaction
AddCounterDetails'.
SQL Batch
begin transaction AddCounterDetails insert into CounterDetails values
('\\MyServer','Disque physique','Long. moy. de file d'attente du
disque',5571840,2,'1 M:',NULL,NULL,NULL,10000000,0) Select @@Identity commit
transaction AddCounterDetails

Andrew J. Kelly

unread,
Nov 28, 2007, 1:06:12 PM11/28/07
to
What type of file are you using to log to, Binary? All I can think of is to
try different file types to see if there is one that works better with ODBC.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"PetitGosaimass" <PetitGo...@discussions.microsoft.com> wrote in message

news:09E525D3-CE54-45EE...@microsoft.com...

PetitGosaimass

unread,
Nov 28, 2007, 2:32:01 PM11/28/07
to
Andrew,

I tried csv, tsv, blg and circular blg...it doesn't make any difference.
Still the ' error.

Any other possibilities ?

Xavier

Andrew J. Kelly

unread,
Nov 28, 2007, 2:55:43 PM11/28/07
to
Well the only other thing I can think of is to log to a character format
(CSV etc.) and edit the file by replacing those offending quotes with
something else before importing with Relog to the table.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"PetitGosaimass" <PetitGo...@discussions.microsoft.com> wrote in message

news:FFE6B1F0-33A8-4C3C...@microsoft.com...

PetitGosaimass

unread,
Nov 29, 2007, 4:08:00 AM11/29/07
to
Thanks for you reply

but this doesn't seems to me a good solution : there will be hundreds of
lines in the files, and a lot of servers to manage in a very near future.
This solution would be just working temporarily (a few servers), but not on
a larger scale.
Do you know if MOM would allow to get all these perfomance counters for a
hundred servers ?
What price would it be ?

Thanks for your help.

XM

Andrew J. Kelly

unread,
Nov 29, 2007, 9:40:55 AM11/29/07
to
Well I was talking about writing something that would programmatically do
the search and replace and the inserts not manually. But yes MOM can
collect Perfmon data and is designed to work across an enterprise so that
should not be a problem. I have no idea on the price though.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"PetitGosaimass" <PetitGo...@discussions.microsoft.com> wrote in message

news:6DF209C3-3BF1-408B...@microsoft.com...

PetitGosaimass

unread,
Nov 29, 2007, 11:30:01 AM11/29/07
to
I agree, i would not have changed the quotation mark manually. I am too lazy
for this. And there should be a hundrer servers in the same
case....definitely too much for me.
But i am not sure my company will buy MOM, so i will probably write this
quotation mark eraser (using dts i guess).

Could this problem be assisgned to a bug, or referenced in the knowledge
base, since all French dba will have the same problem) ? I spent a few a
hours on this...that could help other people to be aware faster than i have
been.

Thanks a lot

Xavier Marcatel

Andrew J. Kelly

unread,
Nov 29, 2007, 1:12:07 PM11/29/07
to
I took a quick look and did not see anything that seemed related to this but
you may have better luck with a French search engine. I don't know what else
to suggest so hopefully someone else will see this and suggest something.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"PetitGosaimass" <PetitGo...@discussions.microsoft.com> wrote in message

news:9A447D69-E621-4131...@microsoft.com...

0 new messages