Get Practical Guide To Large Database Migration Preston Zhang Free All Chapters
Get Practical Guide To Large Database Migration Preston Zhang Free All Chapters
com
https://textbookfull.com/product/practical-guide-
to-large-database-migration-preston-zhang/
https://textbookfull.com/product/practical-guide-to-oracle-sql-t-sql-
and-mysql-1st-edition-preston-zhang/
textbookfull.com
https://textbookfull.com/product/a-practical-guide-to-database-
design-2nd-edition-rex-hogan/
textbookfull.com
https://textbookfull.com/product/a-practical-guide-to-database-
design-2nd-edition-rex-hogan-2/
textbookfull.com
https://textbookfull.com/product/non-invasive-instrumentation-and-
measurement-in-medical-diagnosis-second-edition-robert-b-northrop/
textbookfull.com
The Metamorphoses of the Brain – Neurologisation and its
Discontents 1st Edition Jan De Vos (Auth.)
https://textbookfull.com/product/the-metamorphoses-of-the-brain-
neurologisation-and-its-discontents-1st-edition-jan-de-vos-auth/
textbookfull.com
https://textbookfull.com/product/evidence-based-public-health-ross-c-
brownson/
textbookfull.com
https://textbookfull.com/product/the-old-northwest-a-chronicle-of-the-
ohio-valley-and-beyond-ogg/
textbookfull.com
https://textbookfull.com/product/total-innovative-management-
excellence-time-the-future-of-innovation-1st-edition-h-james-
harrington-editor/
textbookfull.com
Design of Piles Under Cyclic Loading SOLCYP
Recommendations 1st Edition Alain Puech
https://textbookfull.com/product/design-of-piles-under-cyclic-loading-
solcyp-recommendations-1st-edition-alain-puech/
textbookfull.com
Practical Guide to
Large Database
Migration
Preston Zhang
p,
p,
A SCIENCE PUBLISHERS BOOK
A SCIENCE PUBLISHERS BOOK
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted,
or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, includ-
ing photocopying, microfilming, and recording, or in any information storage or retrieval system, without written
permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.com
(http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers,
MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety
of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment
has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for
identification and explanation without intent to infringe.
The success of any modern business relies on its ability to adapt to fast changing business
environments: for example, IT infrastructure, database version and servers need to be
upgraded every few years.
When upgrading existing hardware or servers or to a new system, a common task for an
IT team is how to migrate database from old system to new system. We need to make sure
that there is low business downtime during the migration. We also need to test new system
to avoid application failure.
As a database administrator I have done database migrations many times. For example,
migrating a MySQL database from a developer server to a production server or migrating
a SQL Server database from an older server to a new server. Usually, migrating data
within the same database system is not a difficult task. However, it is a challenging when
migrating database from one system to a different system. For example, migrating a SQL
Server database to Oracle database system.
I have tried to find a book about database migration in Oracle, SQL Server and MySQL
database systems, but I only found books about Oracle or AWS database migration. I
would like to share database migration experience with database developers and DBAs.
All the migration examples in this book use large databases in Oracle, SQL Server and
MySQL. This book is written in easy to read style with step-by-step examples.
Preface iii
3.6Template Browser 56
3.7Database Engine Tuning Advisor 57
3.8Disk Usage Report 61
3.9Database Properties 62
3.10
SQL Server Backup 63
3.10.1 Using T-SQL 63
3.10.2 Using Agent Job 63
3.10.3 Using Maintenance Plan 65
Summary 74
Chapter 4 MySQL Database Migration 75
4.1 MySQL to MySQL Migration Example 75
4.1.1 Using MySQL Export Commands and Import Wizard 75
4.1.2 Using MySQL Workbench Schema Transfer Wizard 80
4.2 MySQL to SQL Server Migration Example 86
4.2.1 Using Microsoft SQL Server Migration Assistant for 86
MySQL Tool
4.2.2 Using ESF Database Migration Tool 92
4.3 MySQL to Oracle Migration Example 99
Summary 108
Chapter 5 More About MySQL Workbench 109
5.1 MySQL Database Modeling 109
5.1.1 Visual Database Design 109
5.1.2 Reverse Engineering 114
5.1.3 A Visual Query Builder for MySQL & Other Databases 118
5.2 MySQL Server Management 121
5.2.1 Server Status 121
5.2.2 Server Logs 122
5.2.3 Server Performance Dashboard 123
5.3 Online Backup 123
5.4 MySQL Synchronization 125
5.5 Unique MySQL INSERT IGNORE Statement 130
Summary 130
Chapter 6 Oracle Database Migration 131
6.1 Oracle to MySQL Migration Example 131
6.2 Oracle to SQL Server Migration Example 137
6.3 Oracle to Oracle Migration Example 146
6.3.1 Using Oracle Data Dump Export and Import in 146
SQL Developer
6.3.2 Using ESF Database Migration Toolkit 159
Summary 168
Chapter 7 More About Oracle SQL Developer and Oracle EM 169
7.1 Oracle Query Builder 169
7.2 Oracle SQL Developer DBA Tool 171
7.3 Oracle 12c Enterprise Manager Database Express 173
Summary 179
Contents vii
You will see database migration examples from MySQL to MySQL, MySQL to SQL Server
and MySQL to Oracle in Chapter 4. We will use MySQL Employees database in this book.
You will see database migration examples from Oracle to MySQL, Oracle to SQL Server
and Oracle to Oracle in Chapter 6. We will use Oracle HR or SH database in this book.
You will see database migration examples from Microsoft Access to MySQL, Microsoft
Access to SQL Server and Microsoft Access to Oracle in Chapter 5. We will use Microsoft
Access MonthlySalesReports database in this book.
Figure 1-13 Sample records from MySQL Employees database salaries table
Summary
Chapter 1 covers the following:
Database migration definition
Database migration stages including Migration Preparing Stage, Database Migration
Stage, ETL Stage and Database and Application Testing Stage
Database migration sample paths
Database migration tools for Oracle SQL Server, MySQL and Microsoft Access databases
Database migration sample databases in Oracle, SQL Server, MySQL and Microsoft Access
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Chapter 2
The main topics in this chapter are illustrated in Figure 2-1: SQL Server database migration
to MySQL, SQL Server database migration to SQL Server and SQL Server database
migration to Oracle.
It’s important to understand the source database before migration. You can open SQL
Server database and view all the tables, views, stored procedures and functions. A decision
needs to be made weather your organization want to keep current database objects or
change them.
Steps to migrate SQL Server to MySQL Using ESF Database Migration Toolkit:
Step 1:
Let us set up Chinook database on the source SQL Server. If you have not downloaded the
Chinook.sql file, please see Chapter 1 for the download link. Open the Chinook.sql file in
Query window and execute the commands. The Chinook database appears in the left pane
after refreshing the Object Explorer:
Step 2:
Open table columns you will notice that all the fields have double quotes and brackets.
Remove the double quotes and brackets from the filed names.
14 Chapter 2 SQL Server Database Migration
Figure 2-3 Removing the double quotes and brackets from the filed names
Step 3:
Right Click Chinook database and select Reports -> Standard Reports -> Disk Usage by
Table:
Step 4:
Figure 2-5 shows all the table records from Disk Usage by Table Report:
Step 5:
Open ESF Database Migration Toolkit. Choose Microsoft SQL Server (Windows
Authentication) as source server. Enter the SQL Server instance name. Username sa and
default port 1433 will be used. Enter SQL Server database name Chinook.
16 Chapter 2 SQL Server Database Migration
Step 6:
Create database Chinook on the target MySQL database by running a command:
create database Chinook;
There are a few exceptions to the rule that the muscular fibres are
of the non-striated variety. Thus in some Teleosts, as in the Tench
(Tinca vulgaris), striated fibres are continued from the oesophagus
into the walls of the stomach and intestine, and there form an outer
longitudinal and an inner circular layer, situated externally to the
corresponding layers of the non-striated stratum. In the Siluroid,
Amiurus, the striated fibres of the outer circular layer of the
oesophagus are continued, although but sparsely, into the inner
circular layer of the stomach.
The submucosa (Fig. 157) lies between the muscular layer externally
and the epithelial lining internally, and is characteristically developed
in the stomach, and even more so in the intestine. Histologically, it
consists of a framework of connective tissue, enclosing in its meshes
masses of leucocytes (lymphoid tissue), some of which are
amoeboid and migratory, and may even be found between the cells
of the intestinal epithelium (including in some instances the cloacal
epithelium), probably actively participating in the transmission of
food material from the alimentary canal to the lymphatics and blood-
vessels; while other and somewhat similar, but larger, leucocytes
(phagocytes), are concerned with the elimination of waste
substances or noxious micro-organisms. In addition to the diffused
lymphoid tissue of the submucosa, special rounded or oval, and
sometimes encapsuled, masses of this tissue (lymph follicles) are
common in the intestinal wall (Fig. 157) of Acipenser, the Dipnoi and
some Elasmobranchs, and are perhaps the only representatives in
Fishes of the solitary follicles or "Peyer's patches" of the higher
Vertebrates. A mass of lymphoid tissue exists in the axis of the spiral
valve of Acipenser, which has been compared with a similarly
situated structure in Lepidosiren.[238] In some Elasmobranchs a
large lymphoid organ is imbedded in the submucosa of the
oesophageal wall, while a local thickening of the tissue is met with in
the pyloric sphincter. Protopterus is remarkable among Vertebrates
for the extraordinary development of lymphoid tissue,[239] which,
apart from its distribution in the submucosa, is abundantly present
between the longitudinal and circular muscle layers, and the
peritoneal and muscular coats of the intestine.
In various Teleostomi (Fig. 158, B, C, D), the union of the two series
of folds becomes more or less retiform, and the network of
intersecting ridges bounds a series of deep tubular crypts which
appear to penetrate to a considerable distance into the intestinal
wall, and possibly foreshadow the characteristic Lieberkühn's glands
of Mammalia. Crypts may also be found in the stomach, where they
receive the apertures of the gastric glands, as in Amiurus, but more
usually they are restricted to the intestine. In the Dipnoi (e.g.
Protopterus) the mucous membrane of the stomach, and—excluding
the Bursa Entiana where a number of oblique folds are present—of
the intestine also, is, on the contrary, perfectly smooth.
In one specimen of Raia sp. (Fig. 159, A) the last four coils of the
valve are similar to those of the hypothetical type, but the more
anterior ones, owing to the greater width of the valve, which here
exceeds the semi-diameter of the intestine, have their free margins
deflected downwards, while that portion of the valve which forms
the first half turn is coiled inwards upon itself, so as to form a hollow
cone, open dorsally, and having its apex directed forwards. In other
examples a further modification is introduced by the increasing width
of the valve, which now, throughout its whole length, equals the
semi-diameter of the intestine; and by the formation of an axial
columella by the thickened free edge of the valve, which is traversed
by a central band of unstriped muscle, as well as by the intra-
intestinal artery and vein, and takes the place of the central canal of
the preceding types. The valve is, however, still regular, and its free
margin remains on the same level as the corresponding portion of
the attached edge. In other specimens, again, additional
complications are introduced by a still further increase in the width
of the valve, which now exceeds, often considerably, the semi-
diameter of the intestine, and the consequent deflection of the free
edge of the valve either forwards or backwards (C and D). As shown
in C the valve, in consequence of the backward deflection of its free
margin, presents the appearance of a nest of imperfect truncated
cones with their apices directed backwards, the successive cones
adhering so closely to one another that they combine to form a
central conical chamber with a spirally disposed cavity winding round
it. In D, on the contrary, the free edge of the valve is deflected
forwards, so that, as in C, a nest of cones is formed, but the apices
of the successive cones are directed forwards instead of backwards.
Notwithstanding these variations in the structure of the valve as a
whole, the first coil or half coil nearly always resembles that
described in A.
From what has been said as to the structure of the spiral valve in the
different groups of Fishes, it may be concluded that the valve most
nearly retains its primitive condition in the Cyclostomata; attains its
maximum development in the Elasmobranchs, especially in the
Notidanidae, and shows no indication of degeneration in the Dipnoi.
In the Holocephali and the lower Teleostomi, on the other hand, the
valve exhibits various stages of retrogressive modification, and in the
Teleosts is either absent altogether or persists only as a vestigial
structure in a very few species.
From a physiological point of view the object of the spiral valve is to
increase the absorptive inner surface of the intestine,[257] but, from
what has been said as to the structural variability of the valve, it is
obvious that its efficacy from a functional standpoint must be equally
variable. The value of the valve as an absorptive mechanism
necessarily depends on the area of absorption-surface which it
provides, as well as on the degree of resistance which it offers to the
passage of food material along the cavity of the intestine. These
factors will in turn depend on the number of coils, on the width of
the valve, and on the extent to which its free margin is deflected in
forming the series of cones, but these again are precisely the
structural features which are most liable to variation. The total
absorption area in the four types of valve characteristic of the genus
Raia has been calculated, and may be expressed in square
centimetres as follows:—A, 136.64; B, 143.82; C, 254.3; and D,
276.7.[258] Hence as regards mere absorption area a spiral valve of
the type D has twice the extent of a valve of the type A, and if, in
addition, account be taken of the retardation of the food due to the
increased obstruction offered by the columella and cones in D, it is
clear that the difference in physiological value between the two
types must be far more considerable than is indicated by a
comparison of their relative superficial areas alone.
The evolution of the spiral valve was probably due to the necessity
of increasing the absorptive area of an almost straight unconvoluted
intestine, a result which in other animals is often obtained by an
increase in the length and concurrent convolution of the intestine
itself. Any attempt to correlate the variations in the degree of
perfection or imperfection of the valve considered as an absorptive
mechanism with any special variations in the nature or quality of the
food is, however, a very difficult problem, and a satisfactory
explanation has yet to be found. The difficulty, moreover, is
increased by the fact that the majority of Fishes with a spiral valve
are mainly carnivorous; the Elasmobranchs, in which this structure is
at the same time most highly developed and most variable,
exclusively so. On the other hand, the term "carnivorous" covers a
multiplicity of minor differences in the nature and relative
digestibility of different forms of animal food, and it is quite possible
that it is with differences of this kind that the specific or individual
variations in the development of the spiral valve are associated. The
absence of the valve in the variously nourished Teleosts, save
perhaps as a vestige in one or two, is also difficult to account for,
although it is not improbable that compensating structural
modifications exist in this group. As a rule, the intestine is much
more convoluted in these Fishes, but to an extent which varies
greatly in different species, while the characteristic pyloric caeca and
the spiral valve appear to a certain extent to be developed in inverse
proportion to one another.
The Glands.
Oral salivary glands are wanting in all Fishes, the only secretory
structures in the mouth being numerous mucus-secreting goblet
cells, which here, as elsewhere throughout the alimentary canal, are
intermixed with the ordinary epithelial cells.
The liver of Fishes (Figs. 153, 154) is very variable in size, shape,
colour, and degree of lobulation. Anteriorly, it is usually moulded to
the posterior face of the transverse septum between the pericardial
and abdominal portions of the coelom, and from thence extends
backwards in the abdominal cavity to a varying distance, in some
Sharks as far as the cloaca. Externally, the gland is invested by the
peritoneum, which extends on to it from the pericardial septum and
forms a suspensory fold, and also from the oesophagus and
stomach. The shape of the liver usually bears some relation to that
of the body, being, for example, longest in the Eels and broadest in
the Rays. In the great majority of Fishes the liver is bilobed,
consisting of two sub-equal lateral lobes, disposed longitudinally and
confluent anteriorly for a portion of their extent. From this normal
type there are a few minor variations.[261] In Petromyzon,
Lepidosteus (Fig. 155, B), and a few Teleosts (e.g. the
Gymnodontes, Lophobranchii, and some Salmonidae) the liver is
unilobed. In the Myxinoids and in the Dipnoi (e.g. Protopterus), the
organ is bilobed, but the small anterior lobe lies immediately in front
of the much larger posterior lobe, with the gall-bladder between the
two (Fig. 155, A). In some Teleosts (e.g. Scomber), the liver is
trilobed. A gall-bladder is invariably present in either the larval or
adult Cyclostomata, in the Chrondrostei, Holostei, Crossopterygii and
Dipnoi, and generally also in Elasmobranchs and Teleosts. In the
Elasmobranchs it is rarely entirely wanting, as in Sphyrna and Pristis,
and in the Teleosts in some of the Gurnards (Trigla). The gall-
bladder and bile-duct of Petromyzon fluviatilis atrophy after the
metamorphosis which follows the larval Ammocoetes stage, but in
Petromyzon marinus the duct, although usually absent, is sometimes
retained. In the Ammocoetes the epithelium lining the gall-bladder is
ciliated. In some Fishes, as, for example, in many Elasmobranchs,
the gall-bladder is more or less completely embedded in the
substance of the liver; in others, as in most Teleostomi, the organ is
quite distinct from the gland (Fig. 154).
CHAPTER X
In the Hag-Fish (Myxine) (Fig. 163), there are usually six, very rarely
seven, pairs of gill-sacs, all of which open directly into the pharynx,
and not into a branchial canal as in the Lampreys. On the other
hand, Myxine is unique in having the outer extremities of its gill-sacs
produced into a corresponding number of tubular canals which, after
a longer or shorter course obliquely backwards and outwards, unite
to form on each side a ventrally-situated external aperture (Fig.
163). In the same genus a short canal, or oesophageo-cutaneous
duct, passes from the pharynx behind the last gill-sac of the left
side, and opens externally with the common external branchial
aperture of that side.
In the Holocephali there are but four branchial clefts, the fifth cleft
being closed. Spiracles are absent in the adult, although present in
the young of Chimaera. The branchial lamellae resemble those of
Elasmobranchs, but the inter-branchial septa are somewhat shorter,
so that the lamellae project slightly beyond their outer margins (Fig.
164, B). A hyoidean hemibranch is present. A noteworthy feature is
the development of a cutaneous fold from the outer surface of the
hyoid arch, which grows backwards over the gill-clefts, and, uniting
above and below with the body-wall, terminates in a free posterior
margin, just behind the last gill-cleft. By the growth of this opercular
fold the gills become enclosed in a spacious branchial cavity, and the
clefts communicate with the exterior through a slit-like opening
between the free margin of the fold and the body-wall.