ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

RUNRMTCMD iSeries >> wintel SQL >> logfile

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • RUNRMTCMD iSeries >> wintel SQL >> logfile

    Running the following batch file on a Windows 2008 Server (w/SQL Server 2008 R2):

    Code:
    C:\Windows\system32>"C:\Program Files\Microsoft SQL Server\100\Tools\Binn\sqlcmd
    .exe"  -i C:\Mapicsscm61\Plants\ElkSched\BatchFiles\Start_24x7.sql  -S EBThruput
     -U thruput -P thruput1  1>\\190.190.1.26\c$\AutoResync.log
    1) When run (manually) on the Wintel box, the SQL executes and the logging works.

    2) When run using RUNRMTCMD, the SQL executes and the logging doesn't work.

    We would like the logging to work, anyone out there ever encounter/solve this?

    Thanks for looking!

    Regards,

    Rico

  • #2
    Re: RUNRMTCMD iSeries >> wintel SQL >> logfile

    Play around with your quotes for the string in the command. Me thinks you don't have enough.
    Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

    Comment


    • #3
      Re: RUNRMTCMD iSeries >> wintel SQL >> logfile

      DeadMan,

      Thanks, the code in the original post is the batch file (.bat) on the Wintel server.

      When we run this batch file using RUNRMTCMD, the SQL script executes, but the logging (>> AutoResync.log) does not work.
      When we run the exact same batch file from the Wintel server, the logging works.

      We "upgraded" the Wintel server to 2008, and the logging broke

      Comment


      • #4
        Re: RUNRMTCMD iSeries >> wintel SQL >> logfile

        we got Sysinternals psexec and used with RUNRMTCMD and the logging works again (until the next upgrade or service pack), Tada!

        Code:
        RUNRMTCMD  CMD('"psexec \\190.190.1.26 -s -i -d -u +
                                  MYUSER -p myuser1 +
                                  \\190.190.1.26\C$\MAPICSSCM61\Plants\ElkSch+
                                  ed\BatchFiles\Post_Sync_Updates.bat"') +
                                  RMTLOCNAME('190.190.1.26' *IP)

        Comment

        Working...
        X