Write the below commands in batch file and execute through command prompt with the parameter values.
MySQL
"%~1\mysql"
-h %2 -p%3 -u %4 %5 < "%6.sql" >> %7 2>&1
Call
cmd>MySQL_Import.bat "C:\Program Files\MySQL\MySQL Server
5.6\bin" localhost 1234 root app301
E:\ASBREST\AgileCloud\ReplicateApp\app1_bak e:\mysqldump.log
Oracle
imp
%1/%2@%3 file=%~4 full=y log=%~5;
Call
cmd>Oracle_Import.bat
app301 log orcl11g “E:\oradump.dmp” “E:\oralog.txt”
MSSQL
SQLCMD
-U %1 -P %2 -S %3 -Q "RESTORE DATABASE %4 FROM DISK='%5' WITH RECOVERY,
REPLACE, MOVE '%6' TO '%7.mdf', MOVE '%6_log' TO '%7_log.ldf'" -o %8
Call
cmd>MSSql_Import.bat
sa dms@123 ARAVIND-PC\SQLEXPRESS app301 \\192.168.2.254\Backups\ mssqldump.bak
v95 \\192.168.2.254\axpert\data\app301 E:\MSSqlLog.txt
No comments:
Post a Comment