SlideShare a Scribd company logo
iLAB OVERVIEW
Scenario and Summary
Successful database recovery relies on the database being
backed. This is what enables the database to recover data that
were lost due to a media failure, loss of power, or any other
type of disaster. Each time the online line redoes logs filled up
in a log group, the DBMS issues a log switch that will move the
log writer process from the current redo log group to the next
one in line. The archive background process begins archiving
the data in the full online log group files to the archive log
files. This is done simultaneously for each log file in the group.
If media recovery is needed at the time that the database needs
recovery, then the DBMS will search through the archived log
files to find the ones that need to be used.
In Part 1, you will use mysqldump command to dump database,
expand tables, and restore database.
In Part 2, you will use MySQL Workbench to back up, expand
tables, and restore the database.
Note:
Be sure that you are making screenshots and save in Lab4
Report.
Deliverables
Grading of the lab assignment will be based on the following.
Assignment Step
Description
Points
Part 1: Take Dump/Backup and restore database using
command line
Step 1
Taking a backup of the database
5
Step 2
Expand table
5
Step 3
Restore and recover the database
10
Part 2: Backup and Recovery using MySQL Workbench
Step 1
Taking a backup of the database using Export to
Dump Project Folder
5
Step 2
Taking a backup of the database using Export to
self-contained file
5
Step 3
Expand table
5
Step 4
Restore database using Import from
Dump Project Folder
10
Step 5
Expand table
5
Step 6
Restore database using Import from
self-contained file
10
Total iLab Points
60
The Report file should be a single file called
yourname_Lab_4.doc to submit to the Dropbox for the Week 4
iLab.
Your report should show any queries, create statements, or other
SQL code, along with the resulting return from the database.
iLAB STEPS
Part 1: Take Dump/Backup and Restore Database Using
Command Line
Step 1: Taking a Backup of the Database
1.
Go to
MySQL Command line – Unicode
and enter password.
2.
There are several databases here now. To list them, type:
Mysql>show databases;
3.
Identify required database;
You have to make database backup to be used later to restore.
4.
Confirm the location of mysqldump utility on your local
machine.
Usually, it is:
C:Program FilesMySQLMySQL Server5.6bin
5.
Go to
Start - Accessories – Point to Command Prompt and
right-click on Run as administrator
(to be able to have all types of access on PC).
6.
Set up location using cd command: type in Command prompt:
C:user username>cd C: and
press Enter
C:>cd Program Files and
press Enter
C:Program Files> cd MySQL and
press Enter.
C:Program FilesMySQL>cd MySQL Server5.6 and
press Enter.
C:Program FilesMySQLMySQL Server5.6>cd and
press Enter.
7.
Use mysqldump utility.
a)
In Command prompt, type:
Mysqldump –uroot –p databasename > c:backup file name with
extension .sql
For example: “c:mis561.sql”
Where sign > means to take output (from the left part) and put
into the input (right part). All SQL instructions will be written
to back-up file.
Note: The location of back-up file has to be enclosed into the
double quotes.
Example:
C:Program FilesMySQLMySQL Server5.6bin>Mysqldump –
uroot –p databasename >c: backup file name with extension
.sql
b)
Enter password; press Enter;
c)
In case of error Could not execute SELECT @@GTID_Mode,
re-type with GTID options:
Mysqldump –uroot –p
-set-gtid-purged=O
FF
databasename > “c:backup file name with extension .sql”
d)
Enter password;
Please note that c) and d) are needed only in case of error.
Save screenshot
e)
To verify back-up file:
Start -All programs-Computer-Local Disk (C)-backup file.sql
Save screenshot
8.
Go to
MySQL Command line – Unicode
Using DESCRIBE statement show the columns in the table
Mysql>describe databasename.tablename;
Save screenshot
Step 2 Expand table
1.
Using ALTER command add 2 columns to the table
Mysql>ALTER table databasename.tablename
ADD col1 varchar(10);
Save screenshot
2.
Using DESCRIBE statement show the columns in the table
Mysql>describe databasename.tablename;
Save screenshot
Step 3 Restore and recover the database
1.
Go to
Start- Accessories – Point to Command Prompt and
right click on Run as administrator
(to be able to have all types of access on PC)
2.
Set up the location: type in Command prompt:
C:user username>cd C: and
press Enter
C:>cd Program Files and
press Enter
C:Program Files> cd MySQL and
press Enter
C:Program FilesMySQL>cd MySQL Server5.6 and
press Enter
C:Program FilesMySQLMySQL Server5.6>cd bin and
press Enter
3.
Type:
C:Program FilesMySQLMySQL Server5.6bin>Mysql –uroot
–p
databasename < “c:backup file name with extension .sql”
Where sign < means to take output (from the right part) and
put into the output (left part). Database will be restored.
Note: The location of backup file has to be enclosed into the
double quotes.
Save screenshot
4.
Go to
MySQL Command line – Unicode
Using DESCRIBE statement show the columns in the table
Mysql>describe databasename.tablename;
Save screenshot
Part 2 Backup and Recovery using MySQL Workbench
To Backup database
1.
Start MySQL Workbench
2.
Connect to database and Test connection
3.
Double click on
Connections
to connect the database; Enter Password
4.
On
Navigator
panel under the Management click ‘
Data Export’, enter password
5.
On Data Export screen
highlight the database name and check it;
6.
Click
Select tables
button if you want to back up the entire database;
7.
There are 2 options to save backup file.
Option 1
·
Export to Dump Project Folder
. Choose this option and back up all tables. Click
Start Export
, enter password, and review created .sql files (separated for
each table in database). It allows you to restore the selected
tables in a future.
Save screenshots.
·
Close Administration –
Data Export
tab.
·
Go to the Windows Employer,
review folder
dumps
content.
Save screenshots.
Option 2
Repeat steps 5 and 6.
·
Export to Self-contained file
. All tables in database will be stored in one file. Choose this
option and give the unique name to the backup file to help you
to identify file in a future.
Click Start Export,
enter password.
·
Save screenshots
·
When export is finished, close Administration –
Data Export
tab.
·
Go to the Windows Employer,
review folder
dumps
content.
Save screenshots.
8.
Expand table Employee by adding 2 columns. Please use Query
1 screen.
Hint:
Add columns using ALTER command. Highlight query, choose
Query in toolbar and click Execute current statement
-
Save screenshots
9.
Show new table
-
Click icon
Create new SQL tab for executing queries
(located under the File) to display expanded table.
Hint:
Use DESCRIBE statement. Highlight query, choose Query in
toolbar and click Execute current statement
-
Save screenshots
To Restore database
10.
Click on
Data Import/Restore,
enter password
Option 1
a.
Choose
Import from Dump Project Folder
and insure that the file location is correct
b.
Select Schema on Select Database object to Import (only
available for project folders)
c.
You have an option to select which table to restore and click
Start Import; enter Password
d.
Save screenshot
with successful completion
e.
Close Administration – Data Import/Restore tab
f.
Click icon
Create new SQL tab for executing queries
(located under the File) to display restored table.
g.
Save screenshot
Option 2
11.
Repeat Step 8, Step 9 and Step 10. Enter password
12.
Now, restore
from Import from Self-contained file
a.
Choose
Import from Self-contained file
b.
Select file you want to restore
c.
Click on
Start Import;
enter password;
d.
Save screenshot
with successful completion
e.
Close Administration – Data Import/Restore tab
f.
Click icon
Create new SQL tab for executing queries
(located under the File) to display restored table.
g.
Save screenshot

More Related Content

DOCX
All types of backups and restore
PDF
MySQL Backup & Recovery
PPTX
DBMS: Week 14 - Backup and Recovery in MySQL
PPTX
Phpmyadmin administer mysql
PPT
My sql with querys
PPT
All types of backups and restore
MySQL Backup & Recovery
DBMS: Week 14 - Backup and Recovery in MySQL
Phpmyadmin administer mysql
My sql with querys

Similar to iLAB OVERVIEWScenario and SummarySuccessful database recovery re.docx (20)

DOCX
Dbm 438 week 6 ilab
PPTX
Exporting And Importing Data In Mysql
PPTX
MySql:Exporting And Importing Data In Mysql
PPT
PDF
MySQL Backup and Security Best Practices
DOCX
Inno db datafiles backup and retore
ODP
Mysql1
PDF
MySQL Cookbook 1st ed Edition Paul Dubois
PPT
ODP
PPTX
Getting Started with MySQL I
PDF
MySQL Cookbook 1st ed Edition Paul Dubois
PDF
MySQL for beginners
PPT
Introduction to MySQL - Part 2
PDF
MySQL Cookbook 1st ed Edition Paul Dubois
DOC
Cis336 week 7 i lab 7
PPTX
MySQL Tools And Gui
PPTX
Mysql: Tools & Gui
ODP
Mysqlppt
Dbm 438 week 6 ilab
Exporting And Importing Data In Mysql
MySql:Exporting And Importing Data In Mysql
MySQL Backup and Security Best Practices
Inno db datafiles backup and retore
Mysql1
MySQL Cookbook 1st ed Edition Paul Dubois
Getting Started with MySQL I
MySQL Cookbook 1st ed Edition Paul Dubois
MySQL for beginners
Introduction to MySQL - Part 2
MySQL Cookbook 1st ed Edition Paul Dubois
Cis336 week 7 i lab 7
MySQL Tools And Gui
Mysql: Tools & Gui
Mysqlppt

More from rochellscroop (20)

DOCX
In this assignment, you will analyze Fiedlers Contingency Theor.docx
DOCX
In this assignment, you will be a Supreme Court Justice deciding on .docx
DOCX
In this assignment, you will apply your knowledge of cultural influe.docx
DOCX
In this assignment you will analyze the organizational behavior of y.docx
DOCX
In this assessment, students will read the case study provided.  Stu.docx
DOCX
In this assessment, students will read the case study provided.docx
DOCX
In the Wealth of Nations (1776) Smith describes the economy as a sel.docx
DOCX
In the Unit 4 assignment you learned about a complex international o.docx
DOCX
In the Week 4 Case Study AssessmentResources, Mrs. Ashland w.docx
DOCX
In the story The Lady or the Tiger , which comes through the door, t.docx
DOCX
In the third week of the session, you will submit a review of a scho.docx
DOCX
In The Road Not Taken,” Robert Frost writes figuratively about the .docx
DOCX
In the scenarios and resulting simulations, Robert Donovan, a Jurisv.docx
DOCX
In the past weeks, students have learned about leaders and leaders.docx
DOCX
In the poem, The Terrorist, He Watches” by Wislawa Szmborska, how w.docx
DOCX
In the midsized town of Centervale, there is no more crime than one .docx
DOCX
In the movie, the school board decides to make Coach Boone the head .docx
DOCX
In the mid-seventeenth century, Dutch scientist Jan Baptista van Hel.docx
DOCX
In the early 20th century, the specter of infectious disease lurke.docx
DOCX
In the Group Wiki, write by Day 5 a summary to address the follo.docx
In this assignment, you will analyze Fiedlers Contingency Theor.docx
In this assignment, you will be a Supreme Court Justice deciding on .docx
In this assignment, you will apply your knowledge of cultural influe.docx
In this assignment you will analyze the organizational behavior of y.docx
In this assessment, students will read the case study provided.  Stu.docx
In this assessment, students will read the case study provided.docx
In the Wealth of Nations (1776) Smith describes the economy as a sel.docx
In the Unit 4 assignment you learned about a complex international o.docx
In the Week 4 Case Study AssessmentResources, Mrs. Ashland w.docx
In the story The Lady or the Tiger , which comes through the door, t.docx
In the third week of the session, you will submit a review of a scho.docx
In The Road Not Taken,” Robert Frost writes figuratively about the .docx
In the scenarios and resulting simulations, Robert Donovan, a Jurisv.docx
In the past weeks, students have learned about leaders and leaders.docx
In the poem, The Terrorist, He Watches” by Wislawa Szmborska, how w.docx
In the midsized town of Centervale, there is no more crime than one .docx
In the movie, the school board decides to make Coach Boone the head .docx
In the mid-seventeenth century, Dutch scientist Jan Baptista van Hel.docx
In the early 20th century, the specter of infectious disease lurke.docx
In the Group Wiki, write by Day 5 a summary to address the follo.docx

Recently uploaded (20)

PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
Sports Quiz easy sports quiz sports quiz
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
O5-L3 Freight Transport Ops (International) V1.pdf
VCE English Exam - Section C Student Revision Booklet
Complications of Minimal Access Surgery at WLH
Renaissance Architecture: A Journey from Faith to Humanism
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPH.pptx obstetrics and gynecology in nursing
Anesthesia in Laparoscopic Surgery in India
Abdominal Access Techniques with Prof. Dr. R K Mishra
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Microbial disease of the cardiovascular and lymphatic systems
Final Presentation General Medicine 03-08-2024.pptx
O7-L3 Supply Chain Operations - ICLT Program
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Module 4: Burden of Disease Tutorial Slides S2 2025
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Computing-Curriculum for Schools in Ghana
Sports Quiz easy sports quiz sports quiz

iLAB OVERVIEWScenario and SummarySuccessful database recovery re.docx

  • 1. iLAB OVERVIEW Scenario and Summary Successful database recovery relies on the database being backed. This is what enables the database to recover data that were lost due to a media failure, loss of power, or any other type of disaster. Each time the online line redoes logs filled up in a log group, the DBMS issues a log switch that will move the log writer process from the current redo log group to the next one in line. The archive background process begins archiving the data in the full online log group files to the archive log files. This is done simultaneously for each log file in the group. If media recovery is needed at the time that the database needs recovery, then the DBMS will search through the archived log files to find the ones that need to be used. In Part 1, you will use mysqldump command to dump database, expand tables, and restore database. In Part 2, you will use MySQL Workbench to back up, expand tables, and restore the database. Note: Be sure that you are making screenshots and save in Lab4 Report. Deliverables Grading of the lab assignment will be based on the following. Assignment Step Description Points Part 1: Take Dump/Backup and restore database using command line Step 1 Taking a backup of the database 5 Step 2 Expand table
  • 2. 5 Step 3 Restore and recover the database 10 Part 2: Backup and Recovery using MySQL Workbench Step 1 Taking a backup of the database using Export to Dump Project Folder 5 Step 2 Taking a backup of the database using Export to self-contained file 5 Step 3 Expand table 5 Step 4 Restore database using Import from Dump Project Folder 10 Step 5 Expand table 5 Step 6 Restore database using Import from self-contained file 10 Total iLab Points 60 The Report file should be a single file called yourname_Lab_4.doc to submit to the Dropbox for the Week 4 iLab. Your report should show any queries, create statements, or other SQL code, along with the resulting return from the database.
  • 3. iLAB STEPS Part 1: Take Dump/Backup and Restore Database Using Command Line Step 1: Taking a Backup of the Database 1. Go to MySQL Command line – Unicode and enter password. 2. There are several databases here now. To list them, type: Mysql>show databases; 3. Identify required database; You have to make database backup to be used later to restore. 4. Confirm the location of mysqldump utility on your local machine. Usually, it is: C:Program FilesMySQLMySQL Server5.6bin 5. Go to Start - Accessories – Point to Command Prompt and right-click on Run as administrator (to be able to have all types of access on PC). 6. Set up location using cd command: type in Command prompt: C:user username>cd C: and
  • 4. press Enter C:>cd Program Files and press Enter C:Program Files> cd MySQL and press Enter. C:Program FilesMySQL>cd MySQL Server5.6 and press Enter. C:Program FilesMySQLMySQL Server5.6>cd and press Enter. 7. Use mysqldump utility. a) In Command prompt, type: Mysqldump –uroot –p databasename > c:backup file name with extension .sql For example: “c:mis561.sql” Where sign > means to take output (from the left part) and put into the input (right part). All SQL instructions will be written to back-up file. Note: The location of back-up file has to be enclosed into the double quotes. Example: C:Program FilesMySQLMySQL Server5.6bin>Mysqldump – uroot –p databasename >c: backup file name with extension .sql b) Enter password; press Enter; c) In case of error Could not execute SELECT @@GTID_Mode, re-type with GTID options: Mysqldump –uroot –p
  • 5. -set-gtid-purged=O FF databasename > “c:backup file name with extension .sql” d) Enter password; Please note that c) and d) are needed only in case of error. Save screenshot e) To verify back-up file: Start -All programs-Computer-Local Disk (C)-backup file.sql Save screenshot 8. Go to MySQL Command line – Unicode Using DESCRIBE statement show the columns in the table Mysql>describe databasename.tablename; Save screenshot Step 2 Expand table 1. Using ALTER command add 2 columns to the table Mysql>ALTER table databasename.tablename ADD col1 varchar(10); Save screenshot 2. Using DESCRIBE statement show the columns in the table Mysql>describe databasename.tablename; Save screenshot Step 3 Restore and recover the database 1.
  • 6. Go to Start- Accessories – Point to Command Prompt and right click on Run as administrator (to be able to have all types of access on PC) 2. Set up the location: type in Command prompt: C:user username>cd C: and press Enter C:>cd Program Files and press Enter C:Program Files> cd MySQL and press Enter C:Program FilesMySQL>cd MySQL Server5.6 and press Enter C:Program FilesMySQLMySQL Server5.6>cd bin and press Enter 3. Type: C:Program FilesMySQLMySQL Server5.6bin>Mysql –uroot –p databasename < “c:backup file name with extension .sql” Where sign < means to take output (from the right part) and put into the output (left part). Database will be restored. Note: The location of backup file has to be enclosed into the double quotes. Save screenshot 4. Go to MySQL Command line – Unicode Using DESCRIBE statement show the columns in the table Mysql>describe databasename.tablename; Save screenshot Part 2 Backup and Recovery using MySQL Workbench
  • 7. To Backup database 1. Start MySQL Workbench 2. Connect to database and Test connection 3. Double click on Connections to connect the database; Enter Password 4. On Navigator panel under the Management click ‘ Data Export’, enter password 5. On Data Export screen highlight the database name and check it; 6. Click Select tables button if you want to back up the entire database; 7. There are 2 options to save backup file. Option 1 · Export to Dump Project Folder . Choose this option and back up all tables. Click Start Export
  • 8. , enter password, and review created .sql files (separated for each table in database). It allows you to restore the selected tables in a future. Save screenshots. · Close Administration – Data Export tab. · Go to the Windows Employer, review folder dumps content. Save screenshots. Option 2 Repeat steps 5 and 6. · Export to Self-contained file . All tables in database will be stored in one file. Choose this option and give the unique name to the backup file to help you to identify file in a future. Click Start Export, enter password. · Save screenshots · When export is finished, close Administration – Data Export tab. ·
  • 9. Go to the Windows Employer, review folder dumps content. Save screenshots. 8. Expand table Employee by adding 2 columns. Please use Query 1 screen. Hint: Add columns using ALTER command. Highlight query, choose Query in toolbar and click Execute current statement - Save screenshots 9. Show new table - Click icon Create new SQL tab for executing queries (located under the File) to display expanded table. Hint: Use DESCRIBE statement. Highlight query, choose Query in toolbar and click Execute current statement - Save screenshots To Restore database 10. Click on Data Import/Restore, enter password Option 1
  • 10. a. Choose Import from Dump Project Folder and insure that the file location is correct b. Select Schema on Select Database object to Import (only available for project folders) c. You have an option to select which table to restore and click Start Import; enter Password d. Save screenshot with successful completion e. Close Administration – Data Import/Restore tab f. Click icon Create new SQL tab for executing queries (located under the File) to display restored table. g. Save screenshot Option 2 11. Repeat Step 8, Step 9 and Step 10. Enter password 12. Now, restore from Import from Self-contained file
  • 11. a. Choose Import from Self-contained file b. Select file you want to restore c. Click on Start Import; enter password; d. Save screenshot with successful completion e. Close Administration – Data Import/Restore tab f. Click icon Create new SQL tab for executing queries (located under the File) to display restored table. g. Save screenshot