Thursday, March 29, 2012

exectuing a .bat from cmdexec

All,
sql 2000 sp3
I have a .bat file at d:\wip\queries.bat, the step succeeds, but there is no
data in the files that I am creating. Below is the contents of the .bat. I
have 'd:\queries.bat' in the cmdexec step. I have verified the odbc
connection, any other ideas would be a great help.
db2cmd /c /w /i DB2 +o -tf ds1_query.sql -r d:\wip\ds1_query.txt
db2cmd /c /w /i DB2 +o -tf ds2_wrs_ind_employee_db2_query.sql -r
d:\wip\ds2_wrs_ind_employee_db2.txt
db2cmd /c /w /i DB2 +o -tf ds3_wrs_clr_employee_db2_query.sql -r
d:\wip\ds3_wrs_clr_employee_db2.txt
db2cmd /c /w /i DB2 +o -tf ds4_wrs_client_db2_query.sql -r
d:\wip\ds4_wrs_client_db2.txt
db2cmd /c /w /i DB2 +o -tf ds5_wrs_diary_db2_query.sql -r
d:\wip\ds5_wrs_diary_db2.txt
db2cmd /c /w /i DB2 +o -tf ds6_wrs_dry_history_db2_query.sql -r
d:\wip\ds6_wrs_dry_history_db2.txt
db2cmd /c /w /i DB2 +o -tf ds7_wrs_folder_control_db2_query.sql -r
d:\wip\ds7_wrs_folder_control_db2.txt
--
Thanks,
SnyperSorry, the step does fail. I see it in the appliction log as a failure. I do
not know how to get the .bat to execute properly. Any ideas?
--
Thanks,
Snyper
"snyper" wrote:

> All,
> sql 2000 sp3
> I have a .bat file at d:\wip\queries.bat, the step succeeds, but there is
no
> data in the files that I am creating. Below is the contents of the .bat. I
> have 'd:\queries.bat' in the cmdexec step. I have verified the odbc
> connection, any other ideas would be a great help.
> db2cmd /c /w /i DB2 +o -tf ds1_query.sql -r d:\wip\ds1_query.txt
> db2cmd /c /w /i DB2 +o -tf ds2_wrs_ind_employee_db2_query.sql -r
> d:\wip\ds2_wrs_ind_employee_db2.txt
> db2cmd /c /w /i DB2 +o -tf ds3_wrs_clr_employee_db2_query.sql -r
> d:\wip\ds3_wrs_clr_employee_db2.txt
> db2cmd /c /w /i DB2 +o -tf ds4_wrs_client_db2_query.sql -r
> d:\wip\ds4_wrs_client_db2.txt
> db2cmd /c /w /i DB2 +o -tf ds5_wrs_diary_db2_query.sql -r
> d:\wip\ds5_wrs_diary_db2.txt
> db2cmd /c /w /i DB2 +o -tf ds6_wrs_dry_history_db2_query.sql -r
> d:\wip\ds6_wrs_dry_history_db2.txt
> db2cmd /c /w /i DB2 +o -tf ds7_wrs_folder_control_db2_query.sql -r
> d:\wip\ds7_wrs_folder_control_db2.txt
> --
> Thanks,
> Snyper|||Snyper
Although i know nothing of the detail of what you are trying to do here ...
If running the indiviual commands are being created but not populted then
perhaps it might be worth looking at it being a permissions error in creatin
g
the information or permisiions on population the file.
when you run one of these commands what permissions context is it running
under
under, your id, under the os id or under the applicaion you are running the
commands from.
Are the drive letters in the contect of the user and location you are
running them from ie if runnind this on a remote serverits D: will not be th
e
same as you d:
perhap you need to qualify the files such \\<severname>\<sharename>
Can you break these commands down
a simpler command to say display a directory listing work via this method ie
the cmdexec works but not he commnd you are running...
"snyper" wrote:
[vbcol=seagreen]
> Sorry, the step does fail. I see it in the appliction log as a failure. I
do
> not know how to get the .bat to execute properly. Any ideas?
> --
> Thanks,
> Snyper
>
> "snyper" wrote:
>

No comments:

Post a Comment