Copy log to a txt file ERROR
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
Copy log to a txt file ERROR
Hi,
I'm trying to copy the complete(INFO | WARNING | FATAL | REJECT | STARTED | RESET | BATCH) log into a txt file and I'm having the following error:
ERROR: Failed to open project
Status code = 39204
My Project = DWProjetoDBM
My Job = Load_FTP_DSwitch
My Txt_target = C:\temp\test\DWProjetoDBMLog.txt
I'm using the following command:
C:\Ascential\DataStage\Engine\bin\dsjob -logsum -type INFO -max 30 DWProjetoDBM Load_FTP_DSwitch > C:\temp\teste\DWProjetoDBMLog.txt
Can anyone help me?
Regards,
Fernando
I'm trying to copy the complete(INFO | WARNING | FATAL | REJECT | STARTED | RESET | BATCH) log into a txt file and I'm having the following error:
ERROR: Failed to open project
Status code = 39204
My Project = DWProjetoDBM
My Job = Load_FTP_DSwitch
My Txt_target = C:\temp\test\DWProjetoDBMLog.txt
I'm using the following command:
C:\Ascential\DataStage\Engine\bin\dsjob -logsum -type INFO -max 30 DWProjetoDBM Load_FTP_DSwitch > C:\temp\teste\DWProjetoDBMLog.txt
Can anyone help me?
Regards,
Fernando
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
Use the following command and fill in the server name, user and password and remove the << and >>.
Code: Select all
C:\Ascential\DataStage\Engine\bin\dsjob -server <<Your Server>> -user <<Your User>> -password <<Your Password>> -logsum -type INFO -max 30 DWProjetoDBM Load_FTP_DSwitch > C:\temp\teste\DWProjetoDBMLog.txt
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
DSguru2B wrote:Use the following command and fill in the server name, user and password and remove the << and >>.
Code: Select all
C:\Ascential\DataStage\Engine\bin\dsjob -server <<Your Server>> ...[/quote] Now, worded with the following command: C:\Ascential\DataStage\Engine\bin>dsjob -server myserver -user myuser -password mypassword -logsum -type INFO -max 30 DWProjetoDBM Load_FTP_DSwitch > C:\ temp\test\DWProjetoDBMLog.txt But, I need the complete log (INFO | WARNING | FATAL | REJECT | STARTED | RESET | BATCH | ...) I tryed: C:\Ascential\DataStage\Engine\bin>dsjob -server myserver -user myuser -password mypassword -logsum -type INFO | WARNING -max 30 DWProjetoDBM Load_FTP_DSwitch > C:\ temp\test\DWProjetoDBMLog.txt and C:\Ascential\DataStage\Engine\bin>dsjob -server myserver -user myuser -password mypassword -logsum -type INFO WARNING -max 30 DWProjetoDBM Load_FTP_DSwitch > C:\ temp\test\DWProjetoDBMLog.txt but, doesn't worded. :oops: Regards, Fernando
So now, your command is working but your not happy with the output, right?
If that is the case then I think you need detailed log, use the -logdetail command instead of logsum and if you are on 7.5 or above, at the end you can give the event id numbers, so all the logs between those numbers will be generated. Read about it under Command Line Interface in your server edition developers guide.
If that is the case then I think you need detailed log, use the -logdetail command instead of logsum and if you are on 7.5 or above, at the end you can give the event id numbers, so all the logs between those numbers will be generated. Read about it under Command Line Interface in your server edition developers guide.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
Hi Ray!ray.wurlod wrote:Just leave out (omit) the -type option to get all types. ...
Worked, but omitting the -type option I haven't the complete Message, for example:
The complete message for the event 10 is:
Load_FTP_DSwitch..D_SWITCH:
SELECT S.SWITCH_KEY SWITCH_KEY,
S.DESCRIPTION DESCRIPTION,
S.CNL CNL,
S.SWITCH_CODE SWITCH_CODE,
S.SWITCH_ABBREVIATION SWITCH_ABBREVIATION,
S.DESCRIPTION_GIS DESCRIPTION_GIS,
S.STATUS STATUS,
S.FREE_CONNECTION_POINT FREE_CONNECTION_POINT,
S.USED_CONNECTION_POINT USED_CONNECTION_POINT,
S.TOTAL_CONNECTION_POINT TOTAL_CONNECTION_POINT,
S.ACTIVATION_DATE ACTIVATION_DATE,
S.DEACTIVATION_DATE DEACTIVATION_DATE
FROM D_SWITCH S
WHERE S.RECORD_STATUS = 1
AND S.START_DATE >= SYSDATE - 30
AND S.START_DATE < SYSDATE
With the command I only have:
Load_FTP_DSwitch..D_SWITCH:
SELECT S.SWITCH_KEY SWITCH_KEY, (...)
Regards,
Fernando
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
Yes, I was using -logsum!chulett wrote:That should be - as already noted - that you are using logsum rather than logdetail... yes? ...
But ..
My Project = DWProjetoDBM
My Job = Load_FTP_DSwitch
When i tryed to use the command:
dsjob -server myserver -user myuser -password mypassword -logdetail DWProjetoDBM Load_FTP_DSwitch
Give me the following message:
Invalid arguments: dsjob -logdetail [-useid] <project> <job|jobid> <event id>
Status code = -9999 DSJE_DSJOB_ERROR
How I need the all events, so I omitted <event id>, is it correct?
I'm thinking that i need to put <job|jobid>!
But when I try to get the jobid by
dsjob -server 10.32.14.140 -user fernandomf -password Gustavo10 -jobid DWProjetoDBM Load_FTP_DSwitch
Only show me Status code = 0 and not the jobid.
Regards,
Fernando
Forget about 'jobid', it is not needed and only useful if you've assigned a job an 'alias/id' which not many peoples do, I'd wager. You missed the eventid which caused the syntax error. AFAIK, you need to get a list of event ids and then loop thru them getting the detail for each one.
Now, I've never seen a need to futz with this so could be completely wrong. I'll let others that have actually done this pop in with the gory details.
Now, I've never seen a need to futz with this so could be completely wrong. I'll let others that have actually done this pop in with the gory details.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
I put the event in the command, but get only the event 0.chulett wrote:Forget about 'jobid', it is not needed and only useful if you've assigned a job an 'alias/id' which not many peoples do, I'd wager. You missed the eventid which caused the syntax error. AFAIK, you need to get a list of event ids and then loop thru them getting the detail for each one.
Now, I've never seen a need to futz with this so could be completely wrong. I'll let others that have actually done this pop in with the gory details.
Work
dsjob -server myserver -user myuser -password mypassword -logdetail DWProjetoDBM Load_FTP_DSwitch event0
Event Id: 0
Time : Fri Jun 27 09:20:25 2008
Type : RESET
User : fernandomf
Message : Log cleared by user
Status code = 0
Work
dsjob -server myserver -user myuser -password mypassword -logdetail DWProjetoDBM Load_FTP_DSwitch event10
Event Id: 0
Time : Fri Jun 27 09:20:25 2008
Type : RESET
User : fernandomf
Message : Log cleared by user
Status code = 0
Doesn't work
dsjob -server myserver -user myuser -password mypassword -logdetail DWProjetoDBM Load_FTP_DSwitch event 10
Invalid arguments: dsjob -logdetail [-useid] <project> <job|jobid> <event id>
Status code = -9999 DSJE_DSJOB_ERROR
Regards,
Fernando
-
- Participant
- Posts: 142
- Joined: Wed Mar 24, 2004 10:51 am
- Location: Brazil
Thanks a lot Chullet, now work! :Dchulett wrote:Just use the number, don't include the word 'event' on the command line. ...
dsjob -server myserver -user myuser -password mypassword -logdetail DWProjetoDBM Load_FTP_DSwitch 2
Now, my problem is make a routine that get all log entries and put it in a txt file.
Regards,
Fernando