- Create one batch file
- copy the following code. replace correct value in necessary place.
set SqlServer=192.168.0.2
set InstanceName=MSSQLSERVER
set Username=sa
set Password=**********
set LocalFolder=D:\EFL
set DatabaseName=EFL
SqlCmd -S %SqlServer% -U %Username% -P %Password% -Q “RESTORE DATABASE [%DatabaseName%] FROM DISK=’%LocalFolder%\%DatabaseName%.bak’ WITH REPLACE”
3. Save it as batch file. That is all
Revisions
- March 12, 2022 @ 11:38:35 [Current Revision] by arul
- March 12, 2022 @ 11:38:35 by arul