Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Restoring a BACKUP FILE to a Database --- Urgently?


Restoring a BACKUP FILE to a Database --- Urgently?

Author
Message
venu_ksheerasagaram
venu_ksheerasagaram
SSC-Enthusiastic
SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)

Group: General Forum Members
Points: 101 Visits: 243
Hi friends,
In this forums all are giving their valuable answers and advices . Let us give ur answer for this also.

See I am having a Database named Database1 and i take up the Backup (Database1.bak)for that database.The database is working fine.I know How to restore a database with the backup file(Database1.bak) when my DB gets corrupted but i want to do it ones practically(Restoring a Corrupted DB). Can anybody advice me how to corrupt the existing DB (Database1) and restore it with its Back up file.

Give me an idea of Restoring the Database Practically.

Thank you all,

Venu Gopal.K
Software Engineer
INDIA
PaulB-TheOneAndOnly
PaulB-TheOneAndOnly
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3093 Visits: 4639
Firstly, your title is Software Engineer so you should be as away as possible from databases and ask a DBA for help when needed.

Secondly, if you are training yourself to become a DBA and assuming you are talking about a test or lab server there are lots of ways of corrupting your database to simulate a catastrophic situation.

The easiest one is just to imagine your database got corrupted so you go ahead and restore it.

If for some untold reason you really want to corrupt it look at the O/S level for the mdf file and overwrite it with a text file -or any file you want.

Last but not least, in your post you say you know how to restore it so; restore it.

_____________________________________
Pablo (Paul) Berzukov

Author of Understanding Database Administration available at Amazon and other bookstores.

Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Elliott Berkihiser
Elliott Berkihiser
SSC Veteran
SSC Veteran (264 reputation)SSC Veteran (264 reputation)SSC Veteran (264 reputation)SSC Veteran (264 reputation)SSC Veteran (264 reputation)SSC Veteran (264 reputation)SSC Veteran (264 reputation)SSC Veteran (264 reputation)

Group: General Forum Members
Points: 264 Visits: 2014
Venu--

It sounds like you are on the right track. It is definitely a good idea to practice restoring your backups.

I would suggest that you create a test database to work with. That way you could practice a side-by-side restoration (restore the backup file as "Database2" to exist alongside Database1); you could over-ride the existing (corrupted) Database1 (by using the REPLACE command in your script), and you could learn about differential backups and point in time restorations.

These are all good tools, but you really should not experiment with a production database.

I'm not sure what you are asking for with regards to testing a "corrupt" database. With a test database you could perform many actions to simulate potential mistakes. You could delete entire tables, you could "accidently" delete a user, or you could test your ability to restore to a point in time by having a job which inserted record into a test table every minute. You could then delete some of those records and try to recover the data by using differential or log backups.

Be sure to look at Microsoft Books On Line (BOL) for ideas and commands for these options.

Cheers,
Elliott
venu_ksheerasagaram
venu_ksheerasagaram
SSC-Enthusiastic
SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)

Group: General Forum Members
Points: 101 Visits: 243
Thank u for u r suggestions ,

Let me know this one ---- Suppose my DB gets corrupted(after taking the backup)? For restoring the database which files i required to have? Is the backup file *.bak is only enough to restore or else we also have necessary of .mdf, .ldf files.

Tell me how to corrupt a DB and restore it with its backup file which was already taken?

Thank U all,

Venu Gopal.K
Software Engineer
INDIA
Joy Smith San
Joy Smith San
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2083 Visits: 3198
[b]Let me know this one ---- Suppose my DB gets corrupted(after taking the backup)? For restoring the database which files i required to have? Is the backup file *.bak is only enough to restore or else we also have necessary of .mdf, .ldf files.
Thank U all,


You can create a new blank database and restore it from the .bak file you have. you can delete the currepted database and keep the newly created DB.
venu_ksheerasagaram
venu_ksheerasagaram
SSC-Enthusiastic
SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)

Group: General Forum Members
Points: 101 Visits: 243
One more Question ,

1)What is the use of Log shipping transaction ?
2)Can we restore a corrupted database by using these log shipping transaction files?
3)Tell me the procedure hoe to restore a DB if we can restore a corrupted database by using these log shipping transaction files?


Thank you,

Venu Gopal.K
Software Engineer
INDIA
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search