Posts

Showing posts from October, 2005

Database updates

I needed a method to update a database application across a WAN, and found that I could do this with my Linux firewalls, and Windows batch scripting. The topology is this: Win2k Svr -> Linux FW -> Internet <- Linux FW <- WinNT Svr Win2k Svr batch file: @ECHO OFF SET _LOGFILE=mydb.log Net Stop "SQL Anywhere - mydb" >> "%_LOGFILE%" ATTRIB -R "C:\Program Files\mydb Software\mydb\mydb.db" ATTRIB -R "C:\Program Files\mydb Software\mydb\mydb.log" NET USE Z: \\win2ksvr\home\backup\backup\mydb admpass /USER:domain\admin FOR /F "tokens=2,3,4 delims=/ " %%i in ('DATE /T') do set d=%%k%%i%%j FOR /F "tokens=1,2,3 delims=:. " %%i in ('TIME /T') do set t=%%i%%j%%k XCOPY "C:\Program Files\mydb Software\mydb\mydb.log" Z: CALL :REPORT %ERRORLEVEL% "C:\Program Files\mydb Software\mydb\mydb.log" XCOPY "C:\Program Files\mydb Software\mydb\mydb.db" Z: CALL :REPORT %ERRORLEVEL% &quo

Time to add to this blog

I can't believe it's been this long, and that I've neglected this blog for such a long time. Oh well, I'll just make it my scratch pad for tech notes.