Welcome !
         

 Need HELP with my code!!

Author Message
Clown_Jackal

  • Total Posts : 2
  • Scores: 0
  • Reward points : 0
  • Joined: 12/19/2016
  • Status: offline
Need HELP with my code!! Monday, December 19, 2016 4:04 AM (permalink)
0
I'm trying to write a script to shutdown our Cache database and then bring it back up after our backup runs. But I keep getting an error. Here is the error:
 
Script:      C:\Users\Administrator\Desktop\Bkup.vbs
Line:         13
Char:        5
Error:        Syntax error
Code:        800A03EA
Source:      Microsoft VBScript compilation error
 
******Here is the script I'm using********
REM @echo off
REM *****************************************************************
REM *  BkupPre.cmd
REM *  Script for backup programs that support the functionality
REM *  To be run before backup
REM *  --copy the Cache database(s) to a 2nd server
REM *  --then restart Cache
REM ******************************************************************

REM **********************
REM *  Save the last log
REM **********************
cmd /c type e:\wins\1\backup\dbackup.log >>e:\wins\1\backup\obackup.log

REM **********************
REM *  Initial stuff
REM *  Put message in log file
REM **********************
cmd /c e:\wins\1\util\now.exe Shutdown Cache for backup >e:\wins\1\backup\dbackup.log

REM *************************
REM *  Show list of running processes
REM *************************
REM cmd /c e:\wins\1\util\tlist.exe >>e:\wins\1\backup\dbackup.log
cmd /c e:\wins\1\util\now.exe Doing ccontrol stop >>e:\wins\1\backup\dbackup.log





REM ***********************************
REM *  Tell Cache to do a shutdown
REM ***********************************
cmd /c E:\Intersystems\cache\bin\ccontrol stop CACHE

REM ***********************************
REM *  Wait 2 min.
REM ***********************************
cmd /c e:\wins\1\util\sleep 120


REM ***************************
REM *  Copy Cache Database
REM ***************************
copy /y e:\wins\1\*.dat m:\ > m:\copy_main_cache_dat.log 2>&1
copy /y E:\Intersystems\Cache\Mgr\cache.dat d:\ > m:\copy_mgr_cache_dat.log 2>&1
cmd /c e:\wins\1\util\sleep 120

REM ***************************
REM *  Restart Cache
REM ***************************
cmd /c e:\wins\1\util\now.exe Start Cache after backup >>e:\wins\1\backup\dbackup.log
cmd /c E:\Intersystems\cache\bin\ccontrol start CACHE
 
 
 
Someone please help me out!!
 
#1
    59cobalt

    • Total Posts : 2584
    • Scores: 253
    • Reward points : 0
    • Joined: 7/17/2011
    • Status: offline
    Re:Need HELP with my code!! Monday, December 19, 2016 9:27 AM (permalink)
    0
    Apparently you renamed a batch script (.bat/.cmd) to .vbs. That's not going to work. Batch and VBScript are entirely different languages.
     
    #2
      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2017 ASPPlayground.NET Forum Version 3.9