Sunday, March 06, 2005

script to copy create db backups, restore them, and call the web config adaption script

@echo offecho create network mappingnet

use I: \\DBServer\F$\SQLData\BackupForCopy /user:Administrator XXX >nul

echo run script to create backups
@isql -U sa -P XXXX -S DBServer -i "\\DBServer\F$\SQLData\BackupForCopy\RunScriptForDumpBackup.sql" >nul

echo Copy all DB's from the Server to localcopy \\DBServer\F$\SQLData\BackupForCopy\backup\*.*
echo Delete all created backups on the server
del /Q \\DBServer\F$\SQLData\BackupForCopy\backup\*.*

echo run script to
restore db's@isql -U sa -P XXXXX -S localhost -i "E:\SQLServerBackups_DBServer\RestoreDB.sql" >nul

echo Delete all copied backups
del /Q E:\SQLServerBackups_DBServer\DBBackup\*.bak >nul

echo delete network mapping
net use I: /delete >nul

echo changing all web.config files to localhost db
cscript LocalDB.vbs >nul

No comments:

Shared Cache - .Net Caching made easy

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

Facebook Badge