Friday, March 04, 2005

script to copy db backups between servers

@cls
@echo off

net use Z: \\ServerName\ShareFolderName /user:Administrator yourPass

@isql -U sa -P secuse12sql -S ServerName -i "
\\ServerName\AnyKindOfFolder\ScriptName.sql"

net use Y: \\ServerName1\FolderForDBDumps /user:Administrator yourPassnet
net use X: \\ServerName2\FolderForDBDumps /user:Administrator yourPass

copy \\ServerName1\FolderForDBDumps\*DemoDump.* \\ServerName2\FolderForDBDumps

net use Z: /delete net use Y: /delete net use X: /delete

pause

No comments:

Shared Cache - .Net Caching made easy

All information about Shared Cache is available here: http://www.sharedcache.com/. Its free and easy to use, we provide all sources at codeplex.

Facebook Badge