Need up to 30 seconds to load.
everyone welcome back to my channel
technology hope you guys doing good
today i'm going to talk about how to
recover a single table from your
database backup so we'll create a
scenario we'll see uh you know
how we can recover a single table from
database backup okay so before starting
the session i would request each and
everyone whoever newly joined on my
channel please like to subscribe and
share with others also please visit the
channel playlist sql server dba you will
get more than 150 videos which can help
you all the day-to-day activities okay
and i have covered a couple of interview
question sessions also so you can watch
it
if you are getting help please share
with others also and do subscribe
you can join as a channel member by
clicking the join button okay so let me
talk about this current scenario
so now we have a scenario we have a
database size big actually
and by mistake if someone deleted one a
particular table so now you have option
to recover that table
you can go and restore the complete
database with the healthy backups okay
when i say the healthy backup so you
need to recover till the point time
you need to do the pointing time
recovery so basically you need to apply
all the full backups along with the
transaction log backups okay
so now
here the situation is you know
you are not allowing that much time to
keep database in a restoring mode okay
for that particular single table so you
need to find it alternatively how we can
achieve that goal okay without
disturbing our database how we can
restore the particular table
yes we can do a couple of
alternate ways there you can
achieve that goal we can restore
particular table from the database
backups okay so how we can do that
so let me create a scenario you can see
the database tech 01.
here let's assume a particular table
let's say uh db error log okay someone
deleted okay
so before deleting this table i am going
to keep
uh backup okay
uh so let me take a backup for this
okay so we'll create we'll override this
backup only so we'll take a backup first
and then we'll delete it okay so we can
see the live scenario you know how we
can achieve that goal so now i'm going
now i'm going to delete this error log
table okay
before deleting what we'll do
okay let me delete these things
uh okay by clicking the ok
the error log should be
deleted you can give a refresh
and then you can see the error log is
deleted particular table is deleted so
till now is okay
now what we are doing uh either you can
create a new database or if you have any
existing test database you can restore
that database with the help of
those backups so i'm going to use this
demo db backup okay and i'm going to
restore
okay
i'm going to restore or you can create a
new
dv as well with the help of those
backups
which you have taken just now
demodb okay i'm going to
restore it okay
if you come to file section
okay
uh let me remove all those
otherwise this will create a problem
okay let me
remove this directory
i need just i just want to keep a simple
okay
so it's fine it will overwrite it
hopefully
it will overripe it remove this dialog
backup and just
i think
i think it should work it will override
up
cup
not starting okay
either there are two options so
you need to create a single separate
database with the help of those backups
and from there we can
restore it a single table so okay
so now you can see
here we have a table error log which we
have deleted in a text zero one
so now we can restore this table
okay inside the text zero one how we can
do that we have a select
star into command right
so through this command we can achieve
that call of course so now we have a
database here so without disturbing this
database we have recovered
by clicking this command let me execute
if you can see here hopefully inside
tex01
now we have a error log table if you
refresh it
now you can see the table which we have
deleted
we are achieving without disturbing this
database tech 01.
so basically why we why it's required
and why we cannot do with the help of
backup so basically database size is too
high and
instead of restoring a complete database
with the help of backups
you can create a different uh
database with a different name with the
help of same database backup and from
there you can you know select this table
and insert it inside inside this
database and once the insertion done
table is uh
you know available in the particular
database then you can simply go and
delete the database because no need okay
so simply go and delete that database
so through this way you can achieve a
single table you know
restoration from the database backup if
backup size is huge
so instead of restoring complete
database you can achieve this goal so
hope you like it hope you got my point
we'll meet you soon till then bye bye
thank you