|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, March 05, 2013 6:28 AM
Points: 7,
Visits: 9
|
|
When we run the command we get the .txt on the SQL server but it is empty. If we try to run RMTCMD to just do a regular copy file from one folder to the other it is working. However as soon as we do SQLCMD. It doesn't work. We tried doing a sql command just to run a select * from table and this doesn't work. Is there something that needs to be installed on the AS400 or some rights that I am not aware of.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: 2 days ago @ 1:26 PM
Points: 4,
Visits: 32
|
|
I don't remember exactly what I did with that project years ago. But I am sure that no need to install anything extra on AS400. If you directly run SQLCMD from Windows command prompt, it should give you error message to diagnose.
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Friday, March 29, 2013 11:17 AM
Points: 3,432,
Visits: 14,332
|
|
thsu (3/4/2013) I don't remember exactly what I did with that project years ago. But I am sure that no need to install anything extra on AS400. If you directly run SQLCMD from Windows command prompt, it should give you error message to diagnose.
It would be nice if you remember the year because an Agent Job after an EDI between SQL Server and AS400 can be payroll transaction so running it with the simple test example may not be relevant to the actual task needed.
Kind regards, Gift Peddie
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, March 05, 2013 6:28 AM
Points: 7,
Visits: 9
|
|
Thanks. We got it to work. We used the RMTCMD command to call a .bat. The main issue is that we had to use OSQL instead of sqlcmd which is weird because we are on SQL 2005.
This is the .bat
osql -U sqluser -P sqlpassword -S server -Q "EXEC msdb.dbo.sp_start_job N'JOB NAME'" .
Also we has to change the user and password for the RMTCMD because it is different than the sql user and password.
Thanks for your help.
|
|
|
|