ADSM-L

Re: Strange query output, using ODBC interface with M$ Access ...

2003-07-22 10:46:31
Subject: Re: Strange query output, using ODBC interface with M$ Access ...
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 22 Jul 2003 08:45:32 -0600
ADSM-L reject my original response due to size, so I have removed the
attachments and sent them to Arnaud privately. But they aren't really
critical to my response.

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.ibm DOT com

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.
----- Forwarded by Andrew Raibeck/Tucson/IBM on 07/22/2003 07:43 -----




Andrew Raibeck
07/22/2003 07:39


        To:     "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
        cc:
        From:   Andrew Raibeck/Tucson/IBM@IBMUS
        Subject:        Re: Strange query output, using ODBC interface
with M$ Access ...


Hello Arnaud,

I am unable to reproduce your problem. Attached is a .jpg file
(tmodbc.jpg) showing my results. My TSM server is version 5.1.7.0, ODBC
driver is 5.1.6.0, Access is 2002 version 10.4302.4219 SP-2. I have also
tried this with the 5.2.0.0 ODBC driver and Access 2000 version 9.0.3821
SR-1, and it works for me.



Here are the messages that appear on my TSM console when I run the query:

============================================================
ANR0407I Session 47 started for administrator SHERIDAN (WinNT) (Tcp/Ip
9.11.153.65(1078)).
ANR2017I Administrator SHERIDAN issued command: DEFINE CURSOR C358701c
SQL="SELECT START_TIME ,END_TIME ,ACTIVITY ,ENTITY ,BYTES
FROM ADSM.SUMMARY WHERE (ACTIVITY = 'STGPOOL BACKUP' ) "
ANR2017I Administrator SHERIDAN issued command: DISPLAY CURSOR C358701c
ANR2017I Administrator SHERIDAN issued command: OPEN CURSOR C358701c
ANR2017I Administrator SHERIDAN issued command: FETCH NEXT 50
ANR2017I Administrator SHERIDAN issued command: CLOSE CURSOR
ANR2017I Administrator SHERIDAN issued command: DELETE CURSOR C358701c
ANR0405I Session 47 ended for administrator SHERIDAN (WinNT).
============================================================

Here are the steps I used to attempt to reproduce your scenario:

1) Start Microsoft Access.

2) Create a new blank database.

3) Link to SUMMARY table. When presented with list of columns to choose
for unique record identifier, I just clicked "OK".

4) Select "View/Database Objects/Queries" menu item.

5) Double-click "Create query in Design view". In the "Show Table" dialog,
I selected "SUMMARY" and clicked "Add", then "Close".

6) Select "View/SQL View" menu item.

7) Copy and paste your exact SQL (as shown in your original post) into the
"Select Query" window.

FYI, I have attached a .jpg file, design.jpg, that shows the resulting
"design view".



8) Select "View/Datasheet View" menu item. I get the results shown in the
attached .jpg file.

..................

Try this:

a) From the same machine you run Access on, start the Admin client in
console mode:

   dsmadmc -console

This will allow you to watch the commands sent to the TSM server as they
occur.

b) Try my steps above (create a new Access database, do not use an
existing database). Watch the Admin console when you perform step #8. What
do you get?

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.ibm DOT com

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.




PAC Brion Arnaud <Arnaud.Brion AT PANALPINA DOT COM>
Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
07/21/2003 08:33
Please respond to "ADSM: Dist Stor Manager"


        To:     ADSM-L AT VM.MARIST DOT EDU
        cc:
        Subject:        Strange query output, using ODBC interface with M$ 
Access ...



Hi list,

I'm currently using TSM ODBC (V 5.1.6.0)  interface with an Access 2002
database (V 10.4302.4219 sp-2), and built a  query looking like :
SELECT SUMMARY.START_TIME, SUMMARY.END_TIME, SUMMARY.ACTIVITY,
SUMMARY.ENTITY, SUMMARY.BYTES, DateDiff("w",[START_TIME],Now()) AS
timediff
FROM SUMMARY
WHERE (((SUMMARY.ACTIVITY)="STGPOOL BACKUP") AND
((DateDiff("w",[START_TIME],Now()))<1));

Basically, this should extract all "stgpool backup" jobs registered in
summary table, which have been started during the last day.
Now, this is what  that query returned (snippet of it, sorry for bad
formating) :

1/7/2003 11:04:11       1/7/2003 11:04:17       BACKUP          PACRS270
                          10260491        2
15/7/2003 5:00:14       15/7/2003 8:59:32       STGPOOL BACKUP
TAPELTO1_INF_DB -> COPYLTO1_INF_DB 202337119489    0
15/7/2003 8:59:32       15/7/2003 8:59:50       STGPOOL BACKUP
DISKPOOL_ARCH -> COPYLTO1_ARCH   0       0
15/7/2003 8:59:32       15/7/2003 9:00:46       STGPOOL BACKUP
DISKPOOL_SQL_LOGS -> COPYLTO1_SQL_LOGS       55377920        0
15/7/2003 8:59:32       15/7/2003 9:01:32       STGPOOL BACKUP
DISKPOOL_DB2_L0 -> COPYLTO1_DB2_L0 79876096        0
1/7/2003 11:04:57       1/7/2003 11:05:03       BACKUP          PACRS270
                                  10260491        2
15/7/2003 8:59:32       15/7/2003 9:03:58       STGPOOL BACKUP
DISKPOOL_SQL_META -> COPYLTO1_SQL_META       540672  0
1/7/2003 11:05:42       1/7/2003 11:05:49       BACKUP          PACRS170
                          10260491        2
15/7/2003 8:59:32       15/7/2003 9:07:49       STGPOOL BACKUP
DISKPOOL_DIR -> COPYLTO1_DIR    9502720 0
15/7/2003 8:59:32       15/7/2003 9:19:41       STGPOOL BACKUP
DISKPOOL_DBLOGS -> COPYLTO1_DBLOGS 10808274944     0
1/7/2003 11:05:13       1/7/2003 11:05:17       BACKUP          PACRS270
                                  817247  2

So, as one can see, it does neither respect the "ACTIVITY="STGPOOL
BACKUP"" statement nor the "((DateDiff("w",[START_TIME],Now()))<1))"
statement, and when looking into TSM activity log, it generates this entry
:
07/21/03 17:02:46 ANR2017I Administrator BAR021 issued command: DEFINE
CURSOR C9fd726c SQL="SELECT START_TIME,END_TIME,ACTIVITY-
,NUMBER,ENTITY,BYTES FROM ADSM.SUMMARY WHERE NUMBER = 1403 OR NUMBER =
1402 OR NUMBER = 1405 OR NUMBER = 1502 OR NUMBER = 1516 OR NUMBER = 1512
OR NUMBER = 1527 OR NUMBER = 1532 OR NUMBER = 1534 OR NUMBER = 1530"
As you can see, this absolutely doesn't match what I've asked for !
(And curiously, if I try to export data from the same query, using rich
text format, it generates another output,  still inacurate !)
Does anybody (Andy ?) have an explanation for such a strange behavior ?
Thanks in advance.
Cheers.
Arnaud

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| Arnaud Brion, Panalpina Management Ltd., IT Group     |
| Viaduktstrasse 42, P.O. Box, 4002 Basel - Switzerland |
| Phone: +41 61 226 19 78 / Fax: +41 61 226 17 01       |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



**** Attachment tsmodbc.jpg has been removed from this note on July 22,
2003 by Andrew Raibeck ****
**** Attachment design.jpg has been removed from this note on July 22,
2003 by Andrew Raibeck ****

<Prev in Thread] Current Thread [Next in Thread>