Try taking the redirection out of the script, and put it on the run line.
Tyree, David wrote:
I'm trying to send the results of a select statement to a text file within TSM as a scheduled job.
It works just fine if I run it from the console. If I try to schedule it within TSM then it will fail:
tsm: BACKUP1>run make_get
ANR2913E Invalid SQL identifier token - 'C:'.
............................ ....................................V..........................
DIA WHERE STATE='COURIERRETRIEVE' > c:\automation\temp\list.txt
ANR1463E RUN: Command script MAKE_GET completed in error.
ANS8001I Return code 4.
Here's the command I'm trying to run:
SELECT VOLUME_NAME as "Tape Number" FROM DRMEDIA WHERE STATE='COURIERRETRIEVE' > c:\automation\temp\list.txt
I've tried different variations within TSM as a scheduled command but I get basically the same type of error referring to invalid SQL identifier token. If I just run the select statement as a scheduled job without the redirect then the results will show up in the activity log. That tells me that I'm close to getting it to do what I want it to do.
I've looked around the QuickFacts website and the adsm.org website but didn't see anything useful in this situation.
Is this even possible?
TSM version 5.2.2 running on a Win2k box.
David Tyree Enterprise Backup Administrator South Georgia Medical Center 229.333.1155
Confidential Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
-- Andy Carlson - Senior Technical Specialist BJC Healtcare --------------------------------------------------------------------------- Gamecube:$150,PSO:$50,Broadband Adapter: $35, Hunters License: $8.95/month, The feeling of seeing the red box with the item you want in it:Priceless.
