►
Description
PowerShell Saturday is a training event for all things PowerShell. The event was held in Raleigh, North Carolina and hosted by Research Triangle PowerShell User Group.
Joshua Corrick teaches us all about dba tools. This is a great primer showing you how to get dba tools set up and start using it for db migrations
The files for Joshua's slides and code can be found on our github page:
https://github.com/rtpsug/PowerShell-Saturday/tree/master/2019-NC.State/
A
All
right
welcome
excited
to
have
the
second
talk
of
the
morning
at
the
first
as
I
heard
PowerShell
Saturday
here,
Research
Triangle,
so
this
session
is
called
using
DBA
tools
to
automate
database
migrations.
If
you
were
not
familiar
with
database
administration.
That's
fine!
If
you
are
then
probably
know
more
about
database
administration
that
I
do.
A
A
So
we
want
to
say
thanks
to
our
sponsors,
they
without
them
probably
couldn't
have
this
event.
Take
care
of
the
food
and
some
of
the
other
niceties
that
we
get
here
so
go
ahead
and
talk
to
them
check
them
out
because
they're
here
to
talk
to
you,
alright,
so
Who
am
I.
My
name
is
Joshua
korok,
most
people
call
me
Josh
I
go
by
Josh
core
on
the
Twitterverse.
You
can
follow
me.
A
There
I
do
blog
from
time
to
time,
although
I
haven't
as
of
as
of
late
I'm,
a
systems
engineer
currently
in
the
middle
of
actually
transitioning
to
a
different
company.
I
am
an
accidental
DBA
I,
never
actually
wanted
to
get
into
being
a
DBA
I.
Remember
we
had
like
an
internal
lunch-and-learn
that
I
had
helped
like
kind
of
start,
that
my
company
that
I'm
at
currently
and
we
had
some
different
people,
talk
and
one
guy
talked
about
hey
I
want
to
teach
everybody.
Some
basic
sequel
and
I
was
like
great.
A
A
A
Ok
more
than
a
year,
but
like
less
than
five
years,
okay
and
then
five
years,
more
okay,
all
right
I
just
want
to
get
the
temperature
of
the
room
just
so
that
I,
you
know
I'm
gonna,
try
and
walk
through
some
basic
stuff
so
that
the
new
people,
the
PowerShell,
don't
get
lost
and
like
what
are
you
talking
about,
but
I'm
also
gonna,
hopefully
have
some
stuff
that
people
who've
been
doing
it
for
a
while
can
hopefully
latch
on
to
and
like.
So.
What
are
we
talking
about?
A
What
is
DBA
tools,
so
DBA
tools
is
a
tool
set
for
managing
Microsoft
sequel
servers.
It's
written
in
PowerShell
as
well
as
there
is
some
C
sharp
and
it
is
an
open
source,
PowerShell
module,
meaning
that
it
is
open
for
people
in
the
community
to
get
involved
with
the
website,
for
the
project
is
called
DBA
tools
that
IO
and
it
is
actually
run
by
our
benevolent
dictator
for
life,
christy,
lemire
and
Rob
Sewell
who's.
A
Also
in
this
photo
he
is
also
one
of
the
first
people
to
who
jumped
on
board
their
both
Microsoft
MVPs,
which
means
that
Microsoft's
has
recognized
them
as
being
major
contributors
to
the
community
and
major
people
that
have
helped
move
forward
community
and
PowerShell
or
Microsoft
products.
Crissy
is
actually
a
duelin
VP
she's,
the
datacenter
MVP
and
a
powershell
MVP
I'm,
sorry,
data
product,
so
she's
like
a
sequel
and
a
datacenter
MVP.
So
that's
pretty
awesome.
A
B
A
One
day,
but
any
one
of
you
could
could
absolutely
give
to
this
product
so
so
question
is
as
well
VBA
tools,
it's
open
source
and
it's
a
community
module,
but
but
is
that
there
something
else
already
well,
there
are
so
there's
a
couple,
different
tools
that
are
currently
or
currently
we're
out
there
and
I'm
more
les
going
through
a
quick
history.
So
we
had
sequel
CMD.
This
was
not
PowerShell,
but
this
is
kind
of
like
the
built-in
command
line
batch
tool
that
you
could
use
to
do.
A
Sequel
queries
as
well
as
different
things
within
sequel
server
and
this
kind
of
came
around
around
2008.
Actually,
maybe
this
is
earlier
than
that
late
2005,
but
this
is
not
PowerShell
right.
This
is
not
object.
Oriented.
This
is
pretty
much
just
like
execute,
T,
sequel
right
and
it
actually
uses
the
OBD
c
driver.
So
there's
a
potential
that
if
you
wrote
a
query
in
T
sequel,
which
is
net
or
sorry
if
you
wrote
a
T
sequel
statement
in
SSMS,
write,
sequel,
server
management
studio,
and
then
you
wrote
a
query
and
executed
with
sequel
CMD.
A
You
would
potentially
get
different
results,
not
different
results.
In
data
but
different
kind
of
functionality,
so
then
they
kind
of
developed,
a
mini
shell,
which
is
known
as
sequel,
PS,
9
exe,
and
this
actually
started
used
to
power
shell,
but
it
use
like
PowerShell
snap
ends,
which
is
the
2.0
version
of
a
module,
and
this
was
very
restrictive.
It
would
be
very,
like
you
couldn't
load
that
snap
in
outside
of
the
mini
shell.
You
had
to
launch
the
mini
shell
and
you
had
to
execute
stuff
within
it.
A
So
it's
more
of
like
an
interactive
tool
than
an
actual
tool
that
you
could
use
to
automate
things.
Then
we
had
the
sequel
server,
snap
in
which
is
version
2.0,
and
there
was
a
lot
of
grumbling
about
that
because
it
you
know
where
sequel
mini
shell
is
very
restrictive.
The
2.0
scripts
weren't
any
better.
It
was
pretty
much
just
one
that
you
could
load
outside
of
it,
but
you
couldn't
do
much
more
with
it.
A
Then
we
had
SML
objects
which
were
developed
and
SML
options,
our
sequel
management
objects,
and
these
are
actually
like
the
api's
that
exist
behind
what
is
known
as
sequel,
server
management
studio.
So
this
is
what
Microsoft
presented
to
the
community
as
an
opportunity
say:
you're
a
vendor,
and
you
wanted
to
create
your
own
custom,
SSMS
plugin
right.
A
You
could
use
these
s
mo
objects
to
actually
interface
and
create
your
GUI
tool
right,
because
at
the
time
that
this
is
all
being
developed,
Microsoft
is
still
of
the
focus,
make
a
GUI
tool
we're
all
about
Windows,
we're
all
about.
You
know
wizards
to
click
through
right.
So
this
s
mo
object
was
more
of
a
developer's
toolset
than
an
actual
like
powershell
toolset,
but
they've
used
these
s
mo
objects
to
be
behind
their
PowerShell
module,
as
well
as
DBA
tools
so
from
there.
We
then
get
the
sequel
server
module,
which
has
been
shipped
I.
A
Think
inside
of
the
the
module
and
now
it's
available
from
the
PowerShell
gallery,
and
the
biggest
complaint
from
this
is
that
limited
set
of
command
lets
that
you
could
use
kind
of
slowly
developed.
So
if
somebody
had
a
bug
or
a
feature
request,
it
would
be
months
before
you'd
actually
see
it
in
the
product
or
even
years.
Right.
Wait
for
the
next
version,
a
sequel
to
come
out.
You.
B
A
Two
years
we'll
get
you
that
bug
fix
right
and
there
are
certain
command.
Let's
like
invoke
sequel
CMD,
which
were
kind
of
slow
and
buggy
and
couldn't
do
you
know
parsing
of
certain
things
as
well
as
you
couldn't
output
it
into
a
specific
custom
data
type.
It
had
to
come
out
as
a
data
table
which,
if
anybody
has
ever
messed
with
data
tables
before
is
painful.
A
You
have
to
create
your
structure
of
what
the
data
table
looks
like
before
you
can
actually
fill
it
and
then
filling
it
can
even
be
problematic
because
you
may
have
to
iterate
through
that
data
set
that
you're
getting
as
an
object.
So,
if
you're
trying
to
create
variables
and
custom
objects,
it's
you're
messing
around
with
sequel
data
into
PowerShell.
It's
kind
of
it
can
be
problematic.
So,
as
a
result
of
this,
you
know
everybody's,
like
oh
yeah.
These
are
fine.
This
is
via
these
fun
tools.
A
Dba
tools
was
kind
of
developed
in
somewhat
of
a
response
to
this
to
the
slowness
that
Microsoft
was
doing
as
well
as
to
some
specific
use
cases.
So
what
makes
DBA
tools
different
right?
Well,
first
off
its
community
built
there's
over
160
community
contributors
that
have
you
know,
done
everything
from
entire
modules
or
very
specific
modules,
to
like
myself,
just
mainly
writing
integration
tests,
and/or
doing
kind
of
some
cleanup
work
to
prep
for
version
1.0,
which
was
just
released.
A
It's
open
for
user
review,
so
it's
out
on
github
you
can
should
be
able
to
understand.
What's
going
on.
There
are
some
c-sharp
pieces
that
are
compiled
just
because
they
run
more
performant
faster
if
they're,
c-sharp
and
compiled,
but
you
can
still
see
that
c-sharp
code
on
github
and
do
pull
requests
and
reviews
of
it.
It
is
code
sign.
So
if
you
live
in
a
very
secure
environment
and
you
have
a
security
team,
that's
worried
about
what
kind
of
PowerShell
is
running
in
your
environment.
You
have
assigned
only
settings
turned
on
for
PowerShell
execution.
A
This
PowerShell
module
as
downloaded
from
the
PowerShell
gallery,
is
signed
by
a
code.
Signing
cert
and
I.
Believe
Kristy
is
the
only
one
who
has
access
to
that
code,
so
you
can
have
kind
of
a
high
level
of
confidence
that
if
you
download
it
from
the
gallery,
it's
signed
and
it's
validated
if
you
download
it
from
github
what
you
can
do.
A
It's
not
sign
so
just
know
that,
as
a
caveat,
the
deed,
the
module
is
trying
to
codify
best
practices,
so
as
it's
community
built,
so
the
people
who
are
using
sequel
server
are
saying:
hey,
let's
build
this
tool.
They're
then
saying!
Well,
you
know,
there's
no
tool
that
exists
for
making
sure
that
the
power
plan
is
set
to
high
performance.
So
let's
make
a
tool
that
says,
let's
test,
to
make
sure
that
the
power
plan
on
every
single
server
set
the
high
performance.
A
So
like
one
of
those
random
Stack,
Overflow
articles,
you
might
read
and
you're
like.
Why
is
it
constantly
spiking
whenever
we
do
this
query
with
the
CPU
right
and
that's
to
known
bug,
so
also
the
focus
is
on
ease
of
use
right
if
you're
new
to
power
show.
This
should
be
easy
to
use
if
you're
more
of
a
data,
professional
who's
never
touched.
A
Powershell
this
should
help
you
or
should
be
a
tool
set
that
you
as
a
data
professional,
would
want
to
use
or
would
think
of
using
and
be
intuitive
enough
that
you
don't
have
to
go
man.
What
is
my
sequel
instance
right?
It
has
some
intelligence
sometimes
to
actually
reach
out
and
figure
out
what
your
sequel
instance
you're,
trying
to
look
for
and
or
if
you're
connected
to
a
sequel
instance
like
what
is
the
name
of
that
database.
I
can't
remember,
because
I
have
like
a
hundred
databases
on
this
one
instance
right.
A
So
our
module
then
supports
running
on
Mac
and
running
on
Linux
and
running
on
PowerShell
core.
That's
on
Windows
some
commandlets
aren't
available,
which
just
makes
sense
some
of
the
ones
that
are
more
Windows
specific.
So,
like
domain
checking
and
stuff
like
that,
which
you
wouldn't
expect
in
a
Linux
environment,
you
can,
but
you
wouldn't
expect
that
so
those
Commandments
have
kind
of
been
removed.
When
you
load
the
module
on
a
Linux
machine,
we
support
sequel
server,
2000
all
the
way
up
to
2017.
A
Now,
commandlets
support
is
kind
of
limited
back
to
the
2000
ones,
which
I
hope
nobody's
running.
But
it
is
there
because
we
know
people,
people
still
have
those
in
their
environments.
We
support
Express
data
up
to
datacenter,
editions
of
sequel
server.
Some
of
the
commandlets
may
not
work,
and
that's
just
because
they
rely
on
a
feature
that
is
only
available
in
standard
or
Enterprise
editions.
A
It
also
supports
windows
and
sequel
authentication
as
well
as
supporting
MFA.
So,
if
you're
trying
to
get
to
like
azure
ad,
it
supports
off
two
databases
that
are
behind
Azure
ad.
It
supports
databases
that
are
behind
as
your
ad
MFA
as
well,
so
pretty
much
if
you
go
to
an
S
sequel,
server
management
studio
and
you
hit
the
drop-down
of
authentication
methods,
we
want
to
try
and
support
every
single
one
of
those
authentication
methods
that
are
in
that
window.
A
It
supports
other
things
that
you
would
take
for
granted
right
default
named
instances,
multiple
instances
on
once
server,
as
well
as
alternate
methods
of
authentication
like
we
just
talked
about
all
right,
so
I've
spent
probably
about
enough
time
actually
going
over
just
the
basic
base
from
Microsoft
and
then
what
the
community
is
built.
Any
questions
at
this
point
before
we
dive
into
demos
I
just
want
to
yes,.
B
A
It's
it's
all
about
single
server,
so
the
question
was:
is
it
mainly
Azure
focus
or
on
Prem
focused
and
the
the
module
is
focused
to
just
be
databases
right?
So
it's
irregardless
of
if
your
database
is
running
in
a
VM
and
Azure
or
running
on
a
VM
in
an
AWS
we're
running
on
a
VM
in
your
data
center.
You
know
in
New,
York
or
wherever.
Your
databases
are
right.
If
it
can
get
to
1433,
then
it
should
be
working.
Fine,
you
know,
most
of
the
commands
will
work
any
other
questions.
B
A
B
B
A
Os
layer
necessarily,
there
are
some
Commandments
that
we've
written
that
do
address
the
OS
layer,
but
for
the
most
part
they
are
interfacing
with
the
actual
database.
So
if
it
doesn't
care,
if
it's
a
service
or
if
it's
a
actual,
hosted
VM
right,
it's
just
trying
to
connect
to
the
database
service,
any
questions,
all
right
cool,
so
the
demos
that
we're
gonna
do
we're.
Gonna
try
and
you
know,
step
through
a
couple
different
things.
I
didn't
want
to
go
too
deep
into
your
deep
dive
of
life.
A
This
is
the
internals
of
how
it
all
works,
although
we
can
do
a
little
bit
of
that
if
anybody's
interested.
This
is
mainly
just
kind
of
introducing
you
to
DBA
tools
for
new
people,
how
to
install
DBA
tools
right,
that's
a
great
place
to
start
we're
going
to
look
at
migrating,
some
databases
from
one
instance
to
another
instance.
A
We're
gonna
migrate,
some
more
databases
right,
because
this
is
called
migrating
databases
and
then
we're
gonna
talk
a
little
bit
about
internals,
just
more
or
less
a
breakdown
of
how
some
of
these
commandlets
work
and
then
we're
going
to
look
at
some
offline
alternatives,
as
well
as
some
large
database
alternatives.
So
is
anybody
who's
a
database
administrator
deal
with
like
one
terabyte
or
larger
databases
right?
So
if
you're.
A
Those
instances
your
downtime
window
may
not
be
as
gracious
as
the
university
that
I
work
for
where
we
have
almost
all
of
Sunday
to
bring
a
database
down
that
nobody
cares
right.
You
may
be
in
the
environment
where
you
have
to
have
it
less
than
five
minutes
cut
over
time.
Alright,
so
we'll
talk
about
that,
we
won't
do
any
demos
specifically
on
that,
but
I
feel
like
I
have
to
mention
that,
since
that
is
a
there's,
a
thing
that
people
do
a
lot
of
alright.
B
A
So
one
thing
I
wanted
to
show
before
we
get
started
is
you
can
go
to?
I
already
gave
the
DBA
tools
Daioh
website,
but
you
can
go
to
Doc's
DBA
tools
on
I/o
and
this
is
a
great
place
where
it
actually
walks
through
all
the
commands,
and
you
can
actually
look
through
this
to
figure
out
what
specifically
you're
looking
for
as
well
as
they
have
some
helpful
articles
here
about
offline
installs
of
DBA
tools
and
other
other
tools
to
get
started
with.
A
A
B
A
If
it
gets
too
annoying,
I
can
turn
it
off,
but
I
feel
like
it
helps,
because
if
I
do
a
keyboard
shortcut
you're
like
wait,
what
did
he
just
do
so?
Hopefully
that
will
help
and
also
a
lot
of
people
like
this
dark
theme.
I
use
a
dark
theme
a
lot
of
times,
but
there's
also,
let's
see,
there's
also,
if
you
get
the
PowerShell
plug-in,
there's
a
PowerShell
ISE
theme
I
mean
who
likes
PowerShell,
I,
see
right
right,
team,
I,
I,
see,
okay,
all
right,
so
more
or
less
one
of
the
questions.
A
I
get
asked
a
lot
of
times
about
DB
tools.
Is
it's
like
well?
Do
I
need
to
install
this
module
on
my
sequel
servers
right?
No,
this
is
like
SSMS
right,
don't
install
SSMS
on
your
servers.
Don't
install
this
module
on
your
servers
right
unless
that
server
happens
to
be
like
your
management
server
that
you
do
all
of
your
work
right.
Think
of
this
as
that
right
install
this
module
where
you're
going
to
work
from
in
your
day-to-day
to
reach
out
to
your
nodes
or
to
your
instances.
A
We
are
also
going
to
change
this
really
quick
change.
The
prompt
which
I
like
to
do
because
then
it
gives
a
little
bit
more
focus
for
the
commandments.
That's
what
we're
here
for
and
just
again
can
everybody
see
this?
This
is
great,
sighs,
okay,
all
right!
So,
let's
start
with
the
basics.
So
I
can't
do
this
in
this
current
environment,
because
this
is
a
closed
off
network
because
it's
a
domain,
controller
and
I
would
get
in
trouble
at
work
if
I
just
have
and
to
plug
this
into
the
network
right.
A
My
domain
controller
was,
you
know,
starting
to
replicate
from
other
domain
controllers.
So,
if
you're
on
your
box,
you
can
actually
go
ahead
and
do
install
module
DBA
tools
on
version
5.1
and
later
you
can
actually
do
this
scope
parameter.
So
if
you're,
not
an
admin
on
your
box,
a
local
admin,
I
should
say
you
can
now
use
this
parameter
to
install
DBA
tools
or
whatever
PowerShell
module
you
need
to
within
your
current
C
users,
username
Documents
folder
path.
A
Again,
I
mentioned,
you
can
also
actually
manually,
go
in
download
the
module
from
github
comm,
but
be
aware
that
that's
like
the
bleeding
edge
PowerShell
gallery
isn't
that
much
far
behind
what
is
in
the
master
branch
out
there
like,
for
example,
I
downloaded
version,
46
I,
believe
and
they
already
updated
to
47
within
two
days,
so
I
just
downloaded
the
latest
version
and
I'm
already
out
of
date.
So
so
just
be
aware
of
that
all
right.
So
what
we're
gonna
do.
A
First,
is
we're
going
to
import
the
module
because
I've
already
downloaded
it,
and
that
was
actually
pretty
fast,
which
I'm
scared
about
all
right.
So
here
we
go.
We
did
get
module
which
will
show
us
our
currently
loaded
modules.
You
can
see.
We
have
version
1.46
and
then
the
question
two
is
well.
You
know
the
sequel,
server
management
module
has
like
I
want
to
say:
120
commandlets,
currently
DBA
tools.
This
is
just
using
git
command
has
574
closely
approaching
600
and
that's
I
believe
just
the
externally
exposed
Commandments.
A
We
have
a
bunch
of
internal
commands
that
we
use
to
kind
of
do
different
things
inside
the
modules
plenty
of
stuff
here,
if
you're,
just
looking
at
get
command
and
looking
at
the
module
and
you're
trying
to
look
at
for
Migration
commands
right,
because
that's
what
we're
doing
today
we're
trying
to
migrate
from
our
2008
box
to
get
command,
which
is
a
PowerShell
command
line.
We
use
a
term
migration
right.
A
Another
thing
that's
cool
is
you
can
actually
do
a
tag.
So,
if
you're
looking
for
a
specific
thing
like
migration,
this
will
return
anything
that
has
the
specific
tag
in
migrate
of
migration
or
say,
for
example,
you're
looking
for
a
GS
or
at
availability
groups.
You
can
also
do
that
as
well
and
that
will
bring
back
all
the
commandments
that
specifically
deal
with
that
specific
feature.
So,
if
you're
working
with
something
else,
there's
like
almost
600
commands
here,
I,
don't
think
I've
even
used
all
600
commandlets.
A
Turning
that
off
I,
don't
want
you
not
that
I'm
using
these
credentials
anywhere
else,
but
it's
just
funny,
alright,
so
say,
for
instance,
we
have
another
domain
user.
We
can
do
get
credential
for
that
username,
and
you
can
do
this
also
as
user
principal
name.
It
doesn't
have
to
be
the
domain,
slash
user
and
then
we
can
put
in
our
credentials
for
that
user.
Now.
A
I'm
being
sarcastic,
don't
do
that
don't
do
that!
This
is
a
demo
too
right.
So
what
we
can
do
is
if
you
were
logged
in
as
a
Kerberos
session
on
most
of
these
DB
a
tool
command
lets.
You
don't
have
to
do
sequel,
credential
it'll,
just
say:
who
are
you
logged
in
with?
Let
me
try
with
you
who
you're
logged
in
with
right,
just
like
if
you're
logged
in
with
SSMS
right,
you
log
into
one
time,
and
then
you
don't
have
to
think
about
your
credentials
again
right.
A
A
You
have
to
use
a
sequel,
credential,
well,
I'm
kind
of
lazy
and
so
I
decided
to
use
this
PowerShell
built,
something
which
is
PS
default,
parameter,
values
and
inside
these
brackets
I'm,
basically
saying
what
command
I
want
to
have
a
default
parameter
for,
and
you
can
create
this
as
a
whole
list
right.
In
fact,
I
think
you
can
even
do
this
not
as
a
commandment,
but
just
as
anytime,
you
see
sequel
credential,
give
it
this
credential,
so
we're
essentially,
we've
already
stored
our
our
sa
credentials
in
this
one
variable.
A
A
You
have
to
basically
have
your
variable
name,
and
then
you
have
an
act,
sign
double
quote,
and
then
you
have
to
have
a
return,
fill
it
with
whatever
text
you
want
and
then,
when
you
want
to
close
it
out,
you
basically
have
to
do
a
carriage
return
and
hit
the
reverse,
write,
double
quote,
and
then
that
sign.
So
this
is
going
to
be
our
career,
yet
we're
going
to
use
for
do
different
executions.
So
now
that
we
have
that
we
can
actually
go
ahead
and
do
our
invoke
query.
A
A
A
A
Think
it's
gonna
work,
I'm
hopeful,
it's
gonna
work
and
will
actually
highlight
both
of
these
lines
so
that
we
can
just
execute
it
all
at
once,
and
it
didn't
like
my
query,
but
it
did
say
that
I
am
executing
as
essay
so
because
I
saved
that
as
a
default
parameter.
So
again,
this
is
just
more
or
less
basics,
just
some
quick
tips,
tips
and
tricks,
for
maybe
some
of
you
who
are
more
familiar
with
DBA
tools.
When
did
you
get
something
out
of
this?
A
Alright?
So
that's
the
basics.
We
still
got
some
good
times,
so
we're
gonna
go
ahead
and
dive
into
the
rest
of
this.
So
let's
look
at
start
DBA
migration.
This
is
what
is
considered
the
easy
button
migration
for
DDA
tools,
where
essentially
you
pretty
much
just
give
it
your
source,
your
destination,
you
hit
enter,
and
it
goes
ahead
and
does
a
bunch
of
stuff
for
you.
So
we
have
a
couple
different
instances.
Of
course
we
have
our
2008
instance,
which
we
want
to
get
off
of.
A
A
Could
use
affect
DBA
instance
to
get
information
about
that
database
so
currently
what
we
have
on
our
source
TV
is.
We
have
two
user
databases,
we
have
the
old-time
adventureworks
and
we
have
who
wrote
this
app
aw
2008
r2,
so
two
apps
that
we
have
to
get
off
of
this
old
system
and
we
have
to
move.
Then
we
have
a
couple
other.
This
is
our
destination
right,
so
I
wanted
to
show
you
that
technically
destination
1
does
have
some
databases
right.
Let's
make
sure
yes
does
have
some
databases
already
there
right.
A
We
have
world
wide
end
porter's
there
we
have
a
report
server,
but
destination.
2
doesn't
show
up
in
this
list
right
so
destination.
2
has
no
user
databases,
so
we'll
use
that
kind
of
as
a
test
after
we
migrate
our
databases
I
wanted
to
show
you
there's
nothing,
nothing
up
my
sleeves,
nothing
up!
My
sleeves,
you
know
nothing,
nothing
behind
my
back.
You
know.
A
And
this
is
a
tough
crowd,
all
right
so
start
DBA
migration,
like
I
said,
is
the
easy
button,
and
so
you
can
exclude
stuff
from
this
easy
button
if
you
want
to
so.
If
you
look
at
get
help
for
start
DV
migration
and
we
look
at
the
parameter
exclude,
you
can
see
that
these
are
all
the
different
things
that
you
can
exclude
from
start
DBA
migration.
A
So
you
can
exclude
databases,
logins
agent,
servers,
credentials,
link,
servers,
SP,
configures,
central
management,
server,
database
system,
user
objects,
system
triggers
backup
devices,
audits,
endpoints,
extended
events,
policy
management,
resource
governor
server,
audit
specifications,
custom
errors,
data
collectors,
start
up
procedures
and
agent
server
properties.
That's
a
lot
of
stuff,
that's
like
20
different
things
and
a
minimum,
and
it's
good
to
know
this
because
say
you're
in
a
2008
r2
environment
right
that
you're
migrating
away
from
well.
It
doesn't
support,
extended
events.
A
So
if
you
know
that
by
default,
you're
like
hey
I'm,
not
gonna
do
extended
events
as
a
as
a
thing.
I'm
gonna
just
exclude
that
from
my
run,
all
right
so
there's
two
actual
methods
that
start
DBA
migration
supports.
There's
the
backup
and
restore
method
which,
depending
on
your
environment,
if
you're
trying
to
do
something
and
say
like
push
production
down
to
a
QA
environment
right,
this
may
be
a
good
environment
to
kind
of
do
that
right,
you're,
backing
up
your
databases,
you're,
not
you're,
not
pulling
them
out,
and
you
can
actually
do
copy.
A
Only
data
backups
as
well
or
you
can
say,
hey
use,
my
last
backup
set
so
you're
not
actually
running
a
backup
on
your
instance
and
it'll
copy
everything
over
the
requirements
of
this
is
that
you
actually
have
a
shared
path
for
the
backups
to
be
copied
to
that.
Both
instances
have
access
to
so
whether
that's
the
sequel,
server
service
account
that
has
access
to
that
share
or
in
our
2008
environment.
Unfortunately,
we
have,
you
know
right
as
network
service
which
you
shouldn't
be
doing,
but
because
it's
writing.
B
A
A
So
if
we
just
do
this,
we
can
actually
hit
FA
and
it
is
running
so
we
should
get
some
text
put
out
to
the
screen
here,
but
this
is
pretty
pretty
seamless
and
what
is
actually
going
on
under
the
hoods
is.
This
is
more
or
less
just
a
wrapper
function
that
is
wrapping
up
a
bunch
of
other
commandlets
that
are
already
in
the
module
that
you
can
use
one
off
right.
So
this.
B
A
Basically,
taking
all
those
other
Commandments
we've
written
and
rolling
it
up
into
an
easy
button,
so
let's
see
what
was
copied,
so
we
copied
a
whole
bunch
of
configuration
values
for
the
server
right.
You
can
not
do
that
if
you
want
to
lots
of
configuration,
values,
more
configuration
values.
Here
we
go
so
we
got
our
databases
migrated
successfully
right
and
then
we
got
any
logins
that
may
be
supported
by
that
application
that
were
copied
as
well.
A
I,
don't
actually
have
any
service
accounts
that
were
on
that
instance,
but
say
you're
in
a
production
environment
where
you
actually
have
service
accounts
that
run
apps,
then
yeah,
you
would
have
it
and
it
gives
you
warnings
if
it
was
skipped
you
know
so
already
exists
on
destination.
This
is
a
local
machine
name,
so
those
aren't
going
to
be
copyright,
because
that
would
be
bad
if
you've
copied
over
a
production,
databases,
local
machine
name.
A
A
What
databases
exist
right
so
since
this
was
a
backup
and
restore
right,
the
database
instances
are
untouched
in
some
regard
over
on
that
original
source
server
and,
as
you
can
see,
they're
now
present
on
our
production
server
or
our
soon-to-be
2016
production
server.
So
another
method
that
is
supported
the
second
method
is
called
the
detach
copy
and
restore,
and
this
one
works
a
little
seemeth
a
little
little
easier.
A
In
some
circumstances
to
say
you
don't
have
a
service
account,
writing
sequel
server
in
a
newer
version,
and
you
don't
want
to
go
through
the
hassle
of
changing
out
to
be
a
service
account
and
then
connecting
it
to
a
file
share.
This
will
actually
detach
the
databases
from
your
desk
from
your
source
copy
it
over
via
UNC
admin
share
to
the
destination
host
to
that
default.
Data
directories
for
the
logs
for
the
master
and
then
reattach
it
into
that
instance.
B
B
A
Yeah,
what
I
mean
you'd
have
to
have
the
same
amount
of
volume
to
run
and
when
I
say
by
admin
to
UNC
I'm
in
chairs
is
that
so
say
the
data
is
in
D.
You
know
data
database
files
right
for
the
MDF
files.
Then
it
would
copy
it
to
the
destination
path
where
that
single
instance
usually
runs
its
data
files
from
so
there
has
to
be
enough
space
on
the
D
Drive
or
the
e
Drive
right
for
data
blogs.
A
If
you
split
it
up
that
way,
so
you
don't
have
to
necessarily
have
the
space
on
the
C
system
drive
to
copy
it
up
for
them,
but
you
do
then
have
to
have
those
permissions
right.
You
have
to
be
able
to
be
able
to
connect
to,
and
in
that
instance
or
in
that
way,
or
have
a
service
account
that
can
do
that
and
again
I'm
not
going
to
run
this
now,
because
we're
going
to
look
a
little
bit
deeper
into
that
how
this
works
in
another
commandment.
A
A
Because
we
determined,
we
don't
want
to
copy
any
of
the
other
objects
and
that's
what
we'll
be
be
looking
at
next,
but
we
did
this
the
other
day
for
our
dev
environment,
which
is
just
as
big
as
our
production,
SharePoint
environment,
and
we
were
done
copying
databases
over
in
15
minutes.
This
gotta
say
the
last
time
I
had
to
migrate.
A
A
Nobody
has
a
source
code
for
it,
and
essentially
we
have
to
move
this,
but
we
don't
know
if
we're
gonna
break
anything,
we
don't
have
the
password
for
you.
Source
I
mean
that
sounds
bad
right.
Copy,
DBA
credential
uses
some
black
magic
to
reach
into
the
registry,
find
those
credentials
copy
it
out
and
reinsert
it
into
your
destination
instance.
A
A
So
DBA
credentials
is
inside
of
if
you're,
looking
in
sequel,
server
management
studio,
it's
in
server
objects
who
the
app
is
compiled.
Nobody
has
a
source
code
for
it
and
essentially
we
have
to
move
this,
but
we
don't
know
if
we're
gonna
break
anything,
we
don't
have
the
password
for
you.
Source
I
mean
that
sounds
bad
right.
Copy,
DBA
credential
uses
some
black
magic
to
reach
into
the
registry,
find
those
credentials
copy
it
out
and
reinsert
it
into
your
destination
instance.
So
it's
not
the
same
thing
as
no
it's
different.
So
this
is
for
service.
A
A
So
DBA
credentials
is
inside
of
if
you're
looking
in
server
management
studio,
you
can
see
its
server
objects
and
then
it's
under
credentials
and
you
can
store
a
credential
in
there
and
then
you
can
use
it
to
execute
agent
jobs.
You
can
get
four
proxies
as
well,
so
yeah,
that's
the
kind
of
harness
thing
and
it's
like
once
it's
in
there.
You
can't
read
that
password
out
right.
This
uses
some
black
magic,
like
I,
said
to
reach
in
find
it
in
the
registry
and
move
it
over
into
the
other
instance.
A
There's
some
other
ones
that
are
really
handy
to
like
copy
DBA
DB
mail.
So
if
you
have
your
mail
settings
set
up
on
one
environment
can
easily
migrate
those
over
to
your
other
environments.
Sometimes
what
I
actually
have-
and
this
is
more
like
deployment
stuff
to
write.
I
have
a
kind
of
golden
standard
management
server
that
I
have,
that
has
like
backup,
maintenance
solutions
already
there
and
backup
maintenance
solution,
jobs,
agent,
jobs
that
I
like
that
are
already
configured
the
way
we've
already
defined
that
one
place.
A
We
can
easily
use
these
Commandments
to
deploy
it
down
to
new
instances
once
we
once
we
spin
them
up
into
production,
so
link
servers
all
these
wonderful
things
right,
we're
not
going
to
dive
into
every
one
of
these
too
much,
but
there
are
also
eleven
other
commandments
that
are
copy.
That
I
want
you
to
be
aware
of.
That,
aren't
in
start
deviate,
migration
and
they're,
not
there
for
good
reasons
right.
Some
of
these
are
agent
ones,
so
think
about
it.
A
If
you're
on
a
2008,
Express
or
any
Express
Edition
right
doesn't
have
the
agent
installed
by
default,
doesn't
have
it
all
by
default
right.
So
it's
one
of
those
things
that,
if
you're
only
in
an
environment
environment,
that's
probably
the
only
time
you
would
want
to
have
it.
Also.
Some
of
these
are
very
specific,
where
you
have
to
give
it
a
name,
so
it
doesn't
really
fit
into
the
wrapper
module.
Very
well
there's
some
other
ones
here,
such
as
DB
assembly,
I,
believe
there's
some
reasons.
A
A
I
feel
like
this
one
is
a
good
candidate
to
go
in
there,
but
for
some
reason
it
hasn't
been
included.
Yet,
although
query
store
is
kind
of
a
newer
feature,
so
I
mean
I
would
imagine
that
that
would
have
yet
be
kinda
like
the
agent
job
stuff
copy
DB
table
data
is
actually
more
just
for
copying
data
right.
It's
not
necessarily
a
migration
thing.
A
A
We're
gonna
shut
down
this
instance
after
we're
done
with
it,
or
we
want
it
to
only
be
available
to
like
double
check
that
everything
looks
the
same,
so
we're
gonna,
detach
the
databases,
reattach
them
as
read-only,
so
that
no
application
actually
reads
against
it
and
all
the
data
is
over
on
this
new
instance.
So,
in
this
scenario,
we're
actually
going
to
put
it
to
our
2017
box,
which
I
had
shown
you
before
it
doesn't
actually
have
anything
on
it,
which,
if
we
look
at
this
again
right,
there's
nothing
in
there.
A
A
Checking
to
ensure
the
attach
attach
is
not
attempted
on
sequel
server
to
to
a
sequel
server
to
2012
warning
if
it's
from
a
2005
to
2012
ensuring
the
destination
server
version
is
equal
to
or
greater
than
source,
that's
important,
and
then
it
goes
ahead
and
starts
building
out
the
files
that
it's
going
to
move.
So
we
get
the
sequel
file
structure.
For
these
two
databases.
We
start
copying
the
these
databases
over
to
check
for
accessibility.
A
If
we
can
reach
it,
it
does
the
detach
it
does
the
alter
statements
it
copies
it
over
and
then
it
successfully
has
already
reattached
us
and
that
took
18
seconds
in
my
testing.
Carmen
cannot
be
deviated
base
with
my
my
other
junior
engineer
to
actually
be
like:
oh
hey,
it's
it's
all
over
there.
It
took
like
15
minutes,
and
most
of
that
was
copy
time
because
of
those
databases
being
larger.
B
A
Will
yes,
so
that
it
does
that
that
feature
as
well?
That's
why
I
use
copy
DBA
login,
so
that
if
you
create
a
sequel
account,
it
has
the
identical
Sid
on
both
instances,
which
is
good
thanks
for
the
question
all
right,
so
here's
more
or
less
something
that
we
may
take
a
look
at.
So
what
about
offline
migrations?
A
What
if
you
have
a
slow
lan
link
and
you're
like
we
got
to
back
this
up,
put
on
a
drive
ship
it
out
to
that
site
and
then
they're
going
to
restore
it
and
then
we'll
go,
do
incrementals
from
there
or
say
you're
in
an
environment
where
you're
like
hey
I,
want
to
put
this
into
my
QA
environment,
but
I
don't
want
to
I,
don't
have
a
direct
connection
to
it.
I
only
have
like
a
console
access.
You
can
actually
use
these.
A
You
can
use
backup,
DB
a
database
to
backup
the
actual
files,
but
then
you
can
use
these
export
commandlets
to
actually
export
out
T
sequel
scripts
that
will
set
whatever
objects
are
set
on
your
environment.
What
other
environments
you
execute
this
s
and,
of
course
we
wouldn't
be
doing
it.
Justice
to
you
guys,
if
we
didn't
have
an
easy
button,
so
we
actually
have
export
DBA
instance,
which
wraps
up
all
of
these
export
commands
into
its
own
command
line.
So
if
we
go
ahead
and
run
that
we
will.
B
B
A
Not
actually
sure
on
that
I
mean
we
could
talk
about
afterwards,
it'll
taking
a
look
at
your
scenario.
There
are
some
AG
specific
Commandments
that
can
be
used,
so
I
would
imagine
you
would
need
to
make
sure
that
that
listener
is
available
about
it.
That
is
actually
a
node
included
in
that
availability
group
for
her
separately.
A
What
we
have
here
actually
is:
this
is
a
folder
structure
that
has
all
of
these
sequel
scripts
and
before
you
get
excited
about
hey,
there's
a
database
thing
there
right.
This
actually
is
only
really
a
script
to
restore
your
databases
right.
So,
if
there's
a
recent
backup
which
are
new
databases
which
we
have
migrated,
aren't
there
yet
because
we
haven't
backed
them
up
yet
this
would
actually
go
out,
find
those
files
and
restore
them
back
to
their
sort
of
rightful
place.
A
So
you'd
have
to
make
sure
that
this
files
are
in
place,
but
this
is
a
way
that
you
could
basically
potentially
take
a
snapshot
of.
What
are
the
configs
look
like
and
do
I
have
a
quick
restore
script
that
I
could
run
to
put
those
settings
back
in
place.
So
that's
one
option.
The
last
option
that
we
can
look
at
here
really
quick
and
we
aren't
actually
gonna-
have
time
to
run
this.
A
Nor
do
I
have
the
data
sets
required
for
this
is
if
you've
ever
used
log
shipping
log
shipping
is
a
way
that
you
can
get
massive
databases
over
quickly
and
what
this
does
there's
a
lot
of
parameters
for
this
command
that
you
need
to
research
on
your
own,
but
you
basically
set
up
source
destination
like
we
did
on
our
other
ones.
You
say
what's
a
database
and
then
you
need
to
have
a
share
path
to
kind
of
put
the
logs
so
that
it
can
run
copies
and.
A
Sets
up
agent
jobs
on
the
source
and
destination
I
believe,
and
it
runs
those
agent
jobs
to
kind
of
keep
the
log
syncing
for,
however
long
you
have
set
whatever
your
time
frame
is,
and
so-
and
this
is
called
splatting
if
you're
not
familiar
with
with
the
feature,
and
basically
you
would
run
invoke
DBA
log
shipping
and
then
once
you're
ready
to
recover.
You
would
run
DB
a
DB
log
shipping
recovery
and
that
would
actually
bring
the
database
back
online
all
right.
So
let
us
finish
off
this.