Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What is wrong with this script? Questions 17 – 20 pose questions from the follow

ID: 3911022 • Letter: W

Question

What is wrong with this script?
Questions 17 – 20 pose questions from the following Windows batch file.
set dbUser=root
set dbPassword=password
set backupDir="C:Documents and SettingsuserDesktopackupmysql"
set mysqldump="C:Program FilesMySQLMySQL Workbench 5.2 CEmysqldump.exe"
set mysqlDataDir="C:Documents and SettingsAll UsersApplication DataMySQLMySQL Server 5.1data"
set zip="C:Program Files-Zipz.exe"

: get date
for /F "tokens=1-3 delims=- " %%i in ('date /t') do
(
set yy=%%i
set mon=%%j
set dd=%%k
)

:: get time
for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do
(
set hh=%%i
set min=%%j
)

echo dirName=%yy%%mon%%dd%_%hh%%min%

:: switch to the "data" folder
pushd %mysqlDataDir%

:: iterate over the folder structure in the "data" folder to get the databases
for /d %%f in (*) do
(

if not exist %backupDir%%dirName%
(
mkdir %backupDir%%dirName%
)

%mysqldump% --host="localhost" --user=%dbUser% --single-transaction --add-drop-table --databases %%f > %backupDir%%dirName%%%f.sql

%zip% a -tzip %backupDir%%dirName%%%f.sql.gz %backupDir%%dirName%%%f.sql

del %backupDir%%dirName%%%f.sql
)
popd

a

It doesn’t backup all of the databases running on MySQL.

b

It doesn’t stop the MySQL server.

c

It overwrites existing backups.

d

It doesn’t check if the server is a slave in a replication environment.

a

It doesn’t backup all of the databases running on MySQL.

b

It doesn’t stop the MySQL server.

c

It overwrites existing backups.

d

It doesn’t check if the server is a slave in a replication environment.

Explanation / Answer

Observe the code

Option a correct

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote