Sql problem tsm v6.22

2012-02-16 Thread Lee, Gary
I've been trying to update an old expiration performance reporting script to 
run on tsm v6.2.2.

I figured out that at the end of each expire run, a summary line is given with 
an entity of ''

However I still get the error below.

Anyone out there with any ideas?

My db2 admin here is stumped.

tsm: TSM01run expexp
ANR0162W Supplemental database diagnostic information:  -1:42911:-419
([IBM][CLI Driver][DB2/LINUXX8664] SQL0419N  A decimal divide operation is not
valid because the result would have a negative scale.  SQLSTATE=42911
).
ANR0516E SQL processing for statement select activity , cast ( ( end_time ) as
date ) as Date , ( examined/cast ( SECOND  ( end_time - start_time) as
decimal ( 18 , 13 ) ) *3600 ) Objects Examined/Hr from summary where activity
= 'EXPIRATION' and entity = '' and days ( end_time ) -days ( start_time ) = 0
failed.
ANR1463E RUN: Command script EXPEXP completed in error.
ANS8001I Return code 4.


Gary Lee
Senior System Programmer
Ball State University
phone: 765-285-1310

 

Re: Sql problem tsm v6.22

2012-02-16 Thread Prather, Wanda
In V6, SECOND is always going to return a value between 0 and 60; I don't' 
think that's what you are after.
To get time differences in V6, you need to use the DB2 TIMESTAMPDIFF function.
Example:  

select timestampdiff(8,cast( (current_timestamp-last_backup_date) as char(22))) 
as DBHRS from db

/* Always cast as char(22); just change the constant 8 to:  
/* 2  seconds
/* 4  minutes
/* 8  hours
/* 16 days
/* 32 weeks
/* 64 months
/*128 quarters
/*256 years

-Original Message-
From: ADSM: Dist Stor Manager [mailto:ADSM-L@VM.MARIST.EDU] On Behalf Of Lee, 
Gary
Sent: Thursday, February 16, 2012 10:00 AM
To: ADSM-L@VM.MARIST.EDU
Subject: [ADSM-L] Sql problem tsm v6.22

I've been trying to update an old expiration performance reporting script to 
run on tsm v6.2.2.

I figured out that at the end of each expire run, a summary line is given with 
an entity of ''

However I still get the error below.

Anyone out there with any ideas?

My db2 admin here is stumped.

tsm: TSM01run expexp
ANR0162W Supplemental database diagnostic information:  -1:42911:-419 
([IBM][CLI Driver][DB2/LINUXX8664] SQL0419N  A decimal divide operation is not 
valid because the result would have a negative scale.  SQLSTATE=42911 ).
ANR0516E SQL processing for statement select activity , cast ( ( end_time ) as 
date ) as Date , ( examined/cast ( SECOND  ( end_time - start_time) as 
decimal ( 18 , 13 ) ) *3600 ) Objects Examined/Hr from summary where activity 
= 'EXPIRATION' and entity = '' and days ( end_time ) -days ( start_time ) = 0 
failed.
ANR1463E RUN: Command script EXPEXP completed in error.
ANS8001I Return code 4.


Gary Lee
Senior System Programmer
Ball State University
phone: 765-285-1310

 


TDP for SQL problem.

2004-08-27 Thread George Wash
Hi, folks.

I'm writing this message because I'm having a trouble with:
TDP for SQL - version 2.2.1
Operating System - Windows NT 4 - SP6

I want to use sql authentication. I put a new User ID and password, and change the 
service TDP for SQL at startup (log on as this account  and password).

I stopped and restarted the service after this modifications, and when I run a backup 
test I received the following error code into TDP:
Backup failed. ACO5422E received the following from the MS SQL Server 
[Microsoft][ODBC SQL Server Driver][SQL Server]Backup or restore operation terminating 
abnormally. Microsoft SQL-DMO (ODBC SQLState: 42000) (HRESULT:0x80040bc5).

I have another machine with the same configuration, although it runs this backup 
without errors...and I looked and compared its configurationsand I saw a unique 
difference in API's: the machine that runs ok shows in TSM server information: TSM API 
Version: Version 4, Release 2, Level 2...and in the server with problems shows: TSM 
API Version: Version 4, Release 2, Level 3...

It looks to me as if can be a API problem, so I would install another patch to correct 
this question.

Am I right ??? or can be a ODBC problem ??

I searched in Windows Technet to see if could be relationship between this error code 
and MS SQL Server / ODBCand I didn't find any answers to that.


hugs for everybodyand thanks.

George.










-
Yahoo! Acesso Gratis - navegue de graga com conexco de qualidade!


Re: TDP for SQL problem ACO5091E or ACO5422E

2004-01-06 Thread Richard van Denzel
Del,

I've tried all that, but it doesn't work.

Met vriendelijke groet, with kind regards,

Richard van Denzel
Consultant
IBM CATE, TSM Certified Consultant

Solution Professional Services B.V.

Transistorstraat 167, 1322 CN Almere
Postbus 50044, 1305 AA Almere.

T:   +31 (0)36 880 02 22
F:   +31 (0)36 880 02 44
M:  +31 (0)652 663 978
W:  www.sltngroup.com
E:   [EMAIL PROTECTED]

Solution Professional Services B.V. is onderdeel van SLTN GROUP
IBM Premier Business Partner





Del Hoobler [EMAIL PROTECTED]
Sent by: ADSM: Dist Stor Manager [EMAIL PROTECTED]
05-01-2004 16:18
Please respond to ADSM: Dist Stor Manager


To: [EMAIL PROTECTED]
cc:
Subject:Re: TDP for SQL problem ACO5091E or ACO5422E


Richard,

ACO5091E also is displayed when the password stored
is not correct. Try this:
1. Add CLUSTERNODE YES to the DSM.OPT file.
2. Reset the password on the TSM Server for the node you
   are using for DP for SQL.
3. Issue a command that connects to the TSM Server
   specifying the /TSMPASSWORD= option. For example:
  TDPSQLC QUERY TSM /TSMPassword=password
4. Retry the command that was failing.

Thanks,

Del



 I have a strange problem with TDP for MS-SQL 5.2.1.0 (running on TSM
 Server 5.2.1.3 on Windows 2003 Server).

 When I put CLUSTERNode yes in the DSM.OPT I get error ACO5091E, which
 basically tells me that I'm using PASSWORDACCESS GENERATE but there is
no
 password (how come that the normal BA-client is working then?).
 When I put CLUSERNode no in the DSM.OPT I get error ACO5422E, telling me
 that an ODBC error occurred with MS-SQL (now PASSWORDACCESS GENERATE
 works).

 The above system is part of an active-passive Microsoft cluster.


Re: TDP for SQL problem ACO5091E or ACO5422E

2004-01-06 Thread Del Hoobler
Richard,

Like you originally stated... strange.
One more thing to look at...
Go to www.ibm.com. In the upper right Search box enter:

   ACN5087E PASSWORDACCESS

Make sure you put the double quotes around the search term.

It will show two knowledge base entries that describe the
problem you are seeing. If the articles don't help...
If you haven't already done so, please place a call
with IBM support.

Thanks,

Del



 I've tried all that, but it doesn't work.


Re: TDP for SQL problem ACO5091E or ACO5422E

2004-01-06 Thread Richard van Denzel
Del,

I've tried with the /tsmpassword option, but it won't set my password.
Besides that we don't have a scheduler running.
I've already placed a call with support (PMR03922 if you're interested).

Met vriendelijke groet, with kind regards,

Richard van Denzel
Consultant
IBM CATE, TSM Certified Consultant

Solution Professional Services B.V.

Transistorstraat 167, 1322 CN Almere
Postbus 50044, 1305 AA Almere.

T:   +31 (0)36 880 02 22
F:   +31 (0)36 880 02 44
M:  +31 (0)652 663 978
W:  www.sltngroup.com
E:   [EMAIL PROTECTED]

Solution Professional Services B.V. is onderdeel van SLTN GROUP
IBM Premier Business Partner





Del Hoobler [EMAIL PROTECTED]
Sent by: ADSM: Dist Stor Manager [EMAIL PROTECTED]
06-01-2004 14:22
Please respond to ADSM: Dist Stor Manager


To: [EMAIL PROTECTED]
cc:
Subject:Re: TDP for SQL problem ACO5091E or ACO5422E


Richard,

Like you originally stated... strange.
One more thing to look at...
Go to www.ibm.com. In the upper right Search box enter:

   ACN5087E PASSWORDACCESS

Make sure you put the double quotes around the search term.

It will show two knowledge base entries that describe the
problem you are seeing. If the articles don't help...
If you haven't already done so, please place a call
with IBM support.

Thanks,

Del



 I've tried all that, but it doesn't work.


TDP for SQL problem ACO5091E or ACO5422E

2004-01-05 Thread Richard van Denzel
Hi All,

I have a strange problem with TDP for MS-SQL 5.2.1.0 (running on TSM
Server 5.2.1.3 on Windows 2003 Server).

When I put CLUSTERNode yes in the DSM.OPT I get error ACO5091E, which
basically tells me that I'm using PASSWORDACCESS GENERATE but there is no
password (how come that the normal BA-client is working then?).
When I put CLUSERNode no in the DSM.OPT I get error ACO5422E, telling me
that an ODBC error occurred with MS-SQL (now PASSWORDACCESS GENERATE
works).

The above system is part of an active-passive Microsoft cluster.

On another (non-cluster) system I've got the same software running and
this will backup with the TDP for SQL without problems.

Has anyone got a clue to what is going on? Or perhaps someone has
experienced the same problem and knows a solution for it?

Met vriendelijke groet, with kind regards,

Richard van Denzel
Consultant
IBM CATE, TSM Certified Consultant

Solution Professional Services B.V.

Transistorstraat 167, 1322 CN Almere
Postbus 50044, 1305 AA Almere.

T:   +31 (0)36 880 02 22
F:   +31 (0)36 880 02 44
M:  +31 (0)652 663 978
W:  www.sltngroup.com
E:   [EMAIL PROTECTED]

Solution Professional Services B.V. is onderdeel van SLTN GROUP
IBM Premier Business Partner



Re: TDP for SQL problem ACO5091E or ACO5422E

2004-01-05 Thread Bill Boyer
I believe that for clusters you need to specify the /SQLSERVER= parameter of
the virtual SQL server name in the cluster. The default is to logon to the
local instance, which on a cluster there isn't one.

Bill Boyer
DSS, Inc.


-Original Message-
From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] Behalf Of
Richard van Denzel
Sent: Monday, January 05, 2004 9:24 AM
To: [EMAIL PROTECTED]
Subject: TDP for SQL problem ACO5091E or ACO5422E


Hi All,

I have a strange problem with TDP for MS-SQL 5.2.1.0 (running on TSM
Server 5.2.1.3 on Windows 2003 Server).

When I put CLUSTERNode yes in the DSM.OPT I get error ACO5091E, which
basically tells me that I'm using PASSWORDACCESS GENERATE but there is no
password (how come that the normal BA-client is working then?).
When I put CLUSERNode no in the DSM.OPT I get error ACO5422E, telling me
that an ODBC error occurred with MS-SQL (now PASSWORDACCESS GENERATE
works).

The above system is part of an active-passive Microsoft cluster.

On another (non-cluster) system I've got the same software running and
this will backup with the TDP for SQL without problems.

Has anyone got a clue to what is going on? Or perhaps someone has
experienced the same problem and knows a solution for it?

Met vriendelijke groet, with kind regards,

Richard van Denzel
Consultant
IBM CATE, TSM Certified Consultant

Solution Professional Services B.V.

Transistorstraat 167, 1322 CN Almere
Postbus 50044, 1305 AA Almere.

T:   +31 (0)36 880 02 22
F:   +31 (0)36 880 02 44
M:  +31 (0)652 663 978
W:  www.sltngroup.com
E:   [EMAIL PROTECTED]

Solution Professional Services B.V. is onderdeel van SLTN GROUP
IBM Premier Business Partner



Re: TDP for SQL problem ACO5091E or ACO5422E

2004-01-05 Thread Richard van Denzel
We use the /sqlserver parameter.

The complete command we use is:

tdpsqlc backup PRD full /tsmoptfile=dsm.opt /config=tdpsql.cfg

Met vriendelijke groet, with kind regards,

Richard van Denzel
Consultant
IBM CATE, TSM Certified Consultant

Solution Professional Services B.V.

Transistorstraat 167, 1322 CN Almere
Postbus 50044, 1305 AA Almere.

T:   +31 (0)36 880 02 22
F:   +31 (0)36 880 02 44
M:  +31 (0)652 663 978
W:  www.sltngroup.com
E:   [EMAIL PROTECTED]

Solution Professional Services B.V. is onderdeel van SLTN GROUP
IBM Premier Business Partner





Bill Boyer [EMAIL PROTECTED]
Sent by: ADSM: Dist Stor Manager [EMAIL PROTECTED]
05-01-2004 15:41
Please respond to ADSM: Dist Stor Manager


To: [EMAIL PROTECTED]
cc:
Subject:Re: TDP for SQL problem ACO5091E or ACO5422E


I believe that for clusters you need to specify the /SQLSERVER= parameter
of
the virtual SQL server name in the cluster. The default is to logon to the
local instance, which on a cluster there isn't one.

Bill Boyer
DSS, Inc.


-Original Message-
From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] Behalf Of
Richard van Denzel
Sent: Monday, January 05, 2004 9:24 AM
To: [EMAIL PROTECTED]
Subject: TDP for SQL problem ACO5091E or ACO5422E


Hi All,

I have a strange problem with TDP for MS-SQL 5.2.1.0 (running on TSM
Server 5.2.1.3 on Windows 2003 Server).

When I put CLUSTERNode yes in the DSM.OPT I get error ACO5091E, which
basically tells me that I'm using PASSWORDACCESS GENERATE but there is no
password (how come that the normal BA-client is working then?).
When I put CLUSERNode no in the DSM.OPT I get error ACO5422E, telling me
that an ODBC error occurred with MS-SQL (now PASSWORDACCESS GENERATE
works).

The above system is part of an active-passive Microsoft cluster.

On another (non-cluster) system I've got the same software running and
this will backup with the TDP for SQL without problems.

Has anyone got a clue to what is going on? Or perhaps someone has
experienced the same problem and knows a solution for it?

Met vriendelijke groet, with kind regards,

Richard van Denzel
Consultant
IBM CATE, TSM Certified Consultant

Solution Professional Services B.V.

Transistorstraat 167, 1322 CN Almere
Postbus 50044, 1305 AA Almere.

T:   +31 (0)36 880 02 22
F:   +31 (0)36 880 02 44
M:  +31 (0)652 663 978
W:  www.sltngroup.com
E:   [EMAIL PROTECTED]

Solution Professional Services B.V. is onderdeel van SLTN GROUP
IBM Premier Business Partner



Re: TDP for SQL problem ACO5091E or ACO5422E

2004-01-05 Thread Del Hoobler
Richard,

ACO5091E also is displayed when the password stored
is not correct. Try this:
1. Add CLUSTERNODE YES to the DSM.OPT file.
2. Reset the password on the TSM Server for the node you
   are using for DP for SQL.
3. Issue a command that connects to the TSM Server
   specifying the /TSMPASSWORD= option. For example:
  TDPSQLC QUERY TSM /TSMPassword=password
4. Retry the command that was failing.

Thanks,

Del



 I have a strange problem with TDP for MS-SQL 5.2.1.0 (running on TSM
 Server 5.2.1.3 on Windows 2003 Server).

 When I put CLUSTERNode yes in the DSM.OPT I get error ACO5091E, which
 basically tells me that I'm using PASSWORDACCESS GENERATE but there is
no
 password (how come that the normal BA-client is working then?).
 When I put CLUSERNode no in the DSM.OPT I get error ACO5422E, telling me
 that an ODBC error occurred with MS-SQL (now PASSWORDACCESS GENERATE
 works).

 The above system is part of an active-passive Microsoft cluster.


Re: TDP SQL problem

2003-07-02 Thread Richard Sims
I'm getting the following error when I try to open the TDP SQL GUI or
run the tdpfull.cmd script :

ACO5421E Received the following from the MS COM component:
Message text not available. HRESULT:0x80040154

This is a fresh install on a winNT 4 system. TDP version is 5.1.5.0 and
server is on solaris 8 5.1.5.4. I have other TDP SQL servers running
without a problem.

Do a List archives search first, to find prior discussions of such problems.
The most recent was a user who installed and tried to use the TDP without
the SQL Server actually present first.

  Richard Sims, BU


Réf. : Re: TDP SQL problem

2003-07-02 Thread Guillaume Gilbert
Thanks Richard, you were right. I should have checked there first. I found the problem.


Guillaume Gilbert
Conseiller - Gestion du stockage
CGI - Gestion intégré des technologies
TEL.:  (514) 415-3000 ext 5091
Pager:   (514) 957-2615
Email : [EMAIL PROTECTED]





Richard Sims [EMAIL PROTECTED]@VM.MARIST.EDU on 2003-07-02 10:00:11

Veuillez répondre à ADSM: Dist Stor Manager [EMAIL PROTECTED]

Envoyé par :  ADSM: Dist Stor Manager [EMAIL PROTECTED]


Pour : [EMAIL PROTECTED]
cc :
Objet : Re: TDP SQL problem

I'm getting the following error when I try to open the TDP SQL GUI or
run the tdpfull.cmd script :

ACO5421E Received the following from the MS COM component:
Message text not available. HRESULT:0x80040154

This is a fresh install on a winNT 4 system. TDP version is 5.1.5.0 and
server is on solaris 8 5.1.5.4. I have other TDP SQL servers running
without a problem.

Do a List archives search first, to find prior discussions of such problems.
The most recent was a user who installed and tried to use the TDP without
the SQL Server actually present first.

  Richard Sims, BU






Re: SQL problem ....

2003-02-10 Thread PAC Brion Arnaud
Hi Kolbeinn,

This was it ! Now you gave me the solution, I believe I really should
have drank some more coffee ;-)
Many thanks, 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   | 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



-Original Message-
From: Kolbeinn Josepsson [mailto:[EMAIL PROTECTED]] 
Sent: Friday, 07 February, 2003 18:23
To: [EMAIL PROTECTED]
Subject: Re: SQL problem 


try this:

select sum(physical_mb)-(select sum(physical_mb) from occupancy where
stgpool_name='COPYLTO1_WIN') from occupancy where stgpool_name
='TAPELTO1_WIN'





  PAC Brion Arnaud
  Arnaud.Brion@PAN To:
[EMAIL PROTECTED]
  ALPINA.COM   cc:
  Sent by: ADSM:   Subject: SQL problem

  Dist Stor
  Manager
  [EMAIL PROTECTED]
  .EDU


  07.02.2003 10:42
  Please respond to
  ADSM: Dist Stor
  Manager






Hi list,

Could any SQL genius explain me wat is wrong with this statement :

select sum(physical_mb) from occupancy where stgpool_name='TAPELTO1_WIN'
- (select sum(physical_mb) from occupancy where
stgpool_name='COPYLTO1_WIN' )

When trying to use it II get following output :
ANR2916E The SQL data types CHAR(12) and DECIMAL(31,2) are incompatible
for operator '-'. I already tried to add dec() on both selects without
achieving any valuable result ... is it a bug or do I need  additional
coffee to wake up my mind ? What I'm trying to achieve is to calculate
the remaining amount of data to copy before a backup stgpool process
finishes. 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   |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


 



SQL problem ....

2003-02-07 Thread PAC Brion Arnaud
Hi list,

Could any SQL genius explain me wat is wrong with this statement :

select sum(physical_mb) from occupancy where stgpool_name='TAPELTO1_WIN' - (select 
sum(physical_mb) from occupancy where stgpool_name='COPYLTO1_WIN' )

When trying to use it II get following output : 
ANR2916E The SQL data types CHAR(12) and DECIMAL(31,2) are incompatible for operator 
'-'. 
I already tried to add dec() on both selects without achieving any valuable result 
... is it a bug or do I need  additional coffee to wake up my mind ?
What I'm trying to achieve is to calculate the remaining amount of data to copy before 
a backup stgpool process finishes.
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   | 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



Re: SQL problem ....

2003-02-07 Thread Kolbeinn Josepsson
try this:

select sum(physical_mb)-(select sum(physical_mb) from occupancy where
stgpool_name='COPYLTO1_WIN') from occupancy where stgpool_name
='TAPELTO1_WIN'





  PAC Brion Arnaud
  Arnaud.Brion@PAN To:  [EMAIL PROTECTED]
  ALPINA.COM   cc:
  Sent by: ADSM:   Subject: SQL problem 
  Dist Stor
  Manager
  [EMAIL PROTECTED]
  .EDU


  07.02.2003 10:42
  Please respond to
  ADSM: Dist Stor
  Manager






Hi list,

Could any SQL genius explain me wat is wrong with this statement :

select sum(physical_mb) from occupancy where stgpool_name='TAPELTO1_WIN' -
(select sum(physical_mb) from occupancy where stgpool_name='COPYLTO1_WIN' )

When trying to use it II get following output :
ANR2916E The SQL data types CHAR(12) and DECIMAL(31,2) are incompatible for
operator '-'.
I already tried to add dec() on both selects without achieving any
valuable result ... is it a bug or do I need  additional coffee to wake up
my mind ?
What I'm trying to achieve is to calculate the remaining amount of data to
copy before a backup stgpool process finishes.
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   |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



Re: Sql problem

2002-04-12 Thread Zlatko Krastev

There is a workaround the problem but it is ugly and can work for small
number of GROUP BY values.
Look for my post on the thread SQL query - GROUP on derived value? from 25.09.2001.
The rough idea - create records somewhere they would not be a problem.
I've used CLIENT_SCHEDULES table with and empty policy domain for the
task. Join the tables and group by fake records.

Zlatko Krastev
IT Consultant



Please respond to ADSM: Dist Stor Manager [EMAIL PROTECTED]
Sent by:ADSM: Dist Stor Manager [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:

Subject:Sql problem

Hi All,

I just realized I can use the summary table to get tape mount stats.
However I can't get my sql to work
I'm trying
select hour(end_time) as Hour, count(*)
from summary
where activity= 'TAPE MOUNT'
and date(end_time) = current date - 1 day
group by hour(end_time)

and TSM is complaining about the group by clause.

ANR2904E Unexpected SQL key word token - 'HOUR'.

  |
 .V.
 nd date(end_time) =current date - 1 day group by hour(end_time)

I've also tried 'group by 1' and 'group by Hour' but that doesn't work
either.

This is fairly standard SQL, anyone know what I'm doing wrong?


Steve Harris
AIX and TSM Administrator
Queensland Health, Brisbane Australia





**
This e-mail, including any attachments sent with it, is confidential
and for the sole use of the intended recipient(s). This confidentiality
is not waived or lost if you receive it and you are not the intended
recipient(s), or if it is transmitted/ received in error.

Any unauthorised use, alteration, disclosure, distribution or review
of this e-mail is prohibited.  It may be subject to a statutory duty of
confidentiality if it relates to health service matters.

If you are not the intended recipient(s), or if you have received this
e-mail in error, you are asked to immediately notify the sender by
telephone or by return e-mail.  You should also delete this e-mail
message and destroy any hard copies produced.
**



Re: Sql problem

2002-03-26 Thread Alexander Verkooijen

I tried the same thing on an Oracle database:

select count(*) from sometable
group by hour(sometimestampfield)

I get an 'invalid column name' error.

Functions that operate on fields that have
a type other than 'timestamp' work as
one would expect:

select count(*) from sometable
group by lower(somecharfield)

I don't understand this either but it seems
to be a general SQL restriction and not a
problem with the TSM SQL interface.

Alexander

Steve Harris wrote:


 Hi All,

 I just realized I can use the summary table to get tape mount stats.  However I 
can't get my sql to work
 I'm trying
 select hour(end_time) as Hour, count(*)
 from summary
 where activity= 'TAPE MOUNT'
 and date(end_time) = current date - 1 day
 group by hour(end_time)

 and TSM is complaining about the group by clause.

 ANR2904E Unexpected SQL key word token - 'HOUR'.

   |
  .V.
  nd date(end_time) =current date - 1 day group by hour(end_time)

 I've also tried 'group by 1' and 'group by Hour' but that doesn't work either.

 This is fairly standard SQL, anyone know what I'm doing wrong?


 Steve Harris
 AIX and TSM Administrator
 Queensland Health, Brisbane Australia





 **
 This e-mail, including any attachments sent with it, is confidential
 and for the sole use of the intended recipient(s). This confidentiality
 is not waived or lost if you receive it and you are not the intended
 recipient(s), or if it is transmitted/ received in error.

 Any unauthorised use, alteration, disclosure, distribution or review
 of this e-mail is prohibited.  It may be subject to a statutory duty of
 confidentiality if it relates to health service matters.

 If you are not the intended recipient(s), or if you have received this
 e-mail in error, you are asked to immediately notify the sender by
 telephone or by return e-mail.  You should also delete this e-mail
 message and destroy any hard copies produced.
 **

--
---
Alexander Verkooijen([EMAIL PROTECTED])
Senior Systems Programmer
SARA High Performance Computing



Sql problem

2002-03-25 Thread Steve Harris

Hi All,

I just realized I can use the summary table to get tape mount stats.  However I can't 
get my sql to work
I'm trying 
select hour(end_time) as Hour, count(*) 
from summary 
where activity= 'TAPE MOUNT' 
and date(end_time) = current date - 1 day 
group by hour(end_time)

and TSM is complaining about the group by clause.

ANR2904E Unexpected SQL key word token - 'HOUR'.

  |
 .V.
 nd date(end_time) =current date - 1 day group by hour(end_time)

I've also tried 'group by 1' and 'group by Hour' but that doesn't work either.

This is fairly standard SQL, anyone know what I'm doing wrong?


Steve Harris
AIX and TSM Administrator
Queensland Health, Brisbane Australia





**
This e-mail, including any attachments sent with it, is confidential 
and for the sole use of the intended recipient(s). This confidentiality 
is not waived or lost if you receive it and you are not the intended 
recipient(s), or if it is transmitted/ received in error.  

Any unauthorised use, alteration, disclosure, distribution or review 
of this e-mail is prohibited.  It may be subject to a statutory duty of 
confidentiality if it relates to health service matters.

If you are not the intended recipient(s), or if you have received this 
e-mail in error, you are asked to immediately notify the sender by 
telephone or by return e-mail.  You should also delete this e-mail 
message and destroy any hard copies produced.
**