Database Backup and Restore Mechanism. Presented by : Mary Meladath



Similar documents
How To Backup A Database On A Microsoft Powerpoint 3.5 (Mysqldump) On A Pcode (Mysql) On Your Pcode On A Macbook Or Macbook (Powerpoint) On

Maintaining a Microsoft SQL Server 2008 Database

6231A - Maintaining a Microsoft SQL Server 2008 Database

SQL Server for Database Administrators Course Syllabus

Upgrading Your SQL Server 2000 Database Administration (DBA) Skills to SQL Server 2008 DBA Skills Course 6317A: Three days; Instructor-Led

Beginning SQL Server Administration. Apress. Rob Walters Grant Fritchey

Administering a Microsoft SQL Server 2000 Database

Course Syllabus. At Course Completion

Explain how to prepare the hardware and other resources necessary to install SQL Server. Install SQL Server. Manage and configure SQL Server.

Course. Overview. Length: 5 Day(s) Published: English. IT Professionals. Level: Type: Method: Delivery. Enroll now (CAL)

Course Outline: Course 6317: Upgrading Your SQL Server 2000 Database Administration (DBA) Skills to SQL Server 2008 DBA Skills

Administering a Microsoft SQL Server 2000 Database

Designing, Optimizing and Maintaining a Database Administrative Solution for Microsoft SQL Server 2008

Scala InfoChannel Content Manager 5 Backup and Restore Instructions

Course Syllabus. Maintaining a Microsoft SQL Server 2005 Database. At Course Completion

Administering Microsoft SQL Server Databases

MS Design, Optimize and Maintain Database for Microsoft SQL Server 2008

Module 07. Log Shipping

Course 20462C: Administering Microsoft SQL Server Databases

Administering a Microsoft SQL Server 2000 Database

Protecting SQL Server Databases Software Pursuits, Inc.

Administering Microsoft SQL Server Databases

A SURVEY OF POPULAR CLUSTERING TECHNOLOGIES

Recover a CounterPoint Database

Backup and Restore Back to Basics with SQL LiteSpeed

SQL Server AlwaysOn (HADRON)

Module 7. Backup and Recovery

This article Includes:

DB2 9 for LUW Advanced Database Recovery CL492; 4 days, Instructor-led

SQL Server Training Course Content

SQL Server Database Administrator s Guide

Implementing a Microsoft SQL Server 2005 Database

Administering Microsoft SQL Server Databases

Administering Microsoft SQL Server Databases

Designing a Data Solution with Microsoft SQL Server 2014

SQM. Maintaining Microsoft SQL for Broadcast Engineers. Training Course Outline

Appendix A Core Concepts in SQL Server High Availability and Replication

Microsoft SQL Server Security and Auditing Clay Risenhoover ISACA North Texas April 14,

Product Brief. it s Backed Up

50238: Introduction to SQL Server 2008 Administration

for QSS/OASIS Presented by Bill Genske Session 135

Configure SQL database mirroring

ADMINISTERING MICROSOFT SQL SERVER DATABASES

Administering Microsoft SQL Server Databases

Administering Microsoft SQL Server Databases

Technical specifcation

Course 2788A: Designing High Availability Database Solutions Using Microsoft SQL Server 2005

Administering Microsoft SQL Server Databases 20462C; 5 days

About database backups

Microsoft Administering Microsoft SQL Server Databases

$99.95 per user. SQL Server 2008/R2 Database Administration CourseId: 157 Skill level: Run Time: 47+ hours (272 videos)

Would-be system and database administrators. PREREQUISITES: At least 6 months experience with a Windows operating system.

Lab 2: PostgreSQL Tutorial II: Command Line

Course: Administering Microsoft SQL Server Databases Overview

Determining your storage engine usage

HELP DOCUMENTATION E-SSOM BACKUP AND RESTORE GUIDE

Administering Microsoft SQL Server Databases

Backing Up and Restoring Your MySQL Database From the command prompt

MOC 20462C: Administering Microsoft SQL Server Databases

SQL Server 2008 Designing, Optimizing, and Maintaining a Database Session 1

Administering Microsoft SQL Server Databases

Administering Microsoft SQL Server Databases

20462C: Administering Microsoft SQL Server Databases

MS SQL Server 2014 New Features and Database Administration

20462 Administering Microsoft SQL Server Databases

MCTS Microsoft SQL Server 2005 Implementation & Maintenance

Microsoft SQL Database Administrator Certification

Backup and Recovery using PITR Mark Jones EnterpriseDB Corporation. All rights reserved. 1

Backup and Restore with 3 rd Party Applications

$99.95 per user. SQL Server 2005 Database Administration CourseId: 152 Skill level: Run Time: 30+ hours (158 videos)

Computer Visions Course Outline

GoGrid Implement.com Configuring a SQL Server 2012 AlwaysOn Cluster

Databases and SQL. The Bioinformatics Lab SS Wiki topic 10. Tikira Temu. 04. June 2013

Avamar Backup and Data De-duplication Exam

DATABASE ADMINISTRATION (DBA) SERVICES

MS 20465C: Designing a Data Solution with Microsoft SQL Server

KEYWORDS InteractX, database, SQL Server, SQL Server Express, backup, maintenance.

Remote Database Administration Services(RDBA)

Automated backup. of the LumaSoft Gas database

MySQL Backup and Recovery: Tools and Techniques. Presented by: René Senior Operational DBA

MIRRORING: START TO FINISH. Ryan Adams Blog - Twitter

Presented by: CSIR-KNOWGATE. KNOWGATE KNOWGATE Website: knowgate.niscair.res.in

Supporting MS SQL Server Failover Using Database Mirroring

Course 20462: Administering Microsoft SQL Server Databases

Protecting your SQL database with Hybrid Cloud Backup and Recovery. Session Code CL02

Exam : Transition Your MCTS on SQL Server 2008 to MCSA: SQL Server 2012, Part 2. Title : The safer, easier way to help you pass any IT exams.

Online Transaction Processing in SQL Server 2008

Backup and Recovery in MS SQL Server. Andrea Imrichová

Administering Microsoft SQL Server Databases

HP Device Manager 4.6

Destiny system backups white paper

Eurobackup PRO: Configuration Best Practices

Microsoft SQL Server 2008 Administrator's Pocket Consultant

HELP DOCUMENTATION E-SSOM BACKUP AND RESTORE GUIDE

Administering and Managing Log Shipping

Backup and Restore MySQL Databases

Transcription:

Database Backup and Restore Mechanism Presented by : Mary Meladath

Database Server Connection Error Suppose error is handled gracefully. The error message may be :- The Database server is down. Please wait till its up and running. Person responsible for handling such kind of errors :- Database Administrator (DBA) By definition is a person responsible for the design, implementation, maintenance and repair of an organization's database. Source : http://en.wikipedia.org/wiki/database_administrator

Roles and Responsibilities of DBA [1] Installing and upgrading tools on database server. Using storage properly. Transferring Data Scheduling Events Performing backups and recovery duties (this point to be covered in detail ) Plus many more.

Recovery Models Before beginning to take backups the business needs to define the database recovery model. 3 Recovery models are : Simple Full Bulk Logged

Methods for backing up databases Full backup BACKUP DATABASE TestDB TO DISK = 'C:\DB2\Backups\TestDB_Apr25_2010.bak', Transactional log BACKUP LOG TestDB TO DISK = 'C:\DB2\Backups\TestDB_Apr_25_2010_1819.trn Differential backup BACKUP DATABASE TestDB TO DISK = 'C:\DB2\Backups\TestDB.diff' WITH DIFFERENTIAL

Striping Backups BACKUP DATABASE TestDB TO DISK = 'C:\DB2\Backups\TestDB_Stripe1.bak', DISK = 'D:\DB2\Backups\TestDB_Stripe2.bak', DISK = 'E:\DB2\Backups\TestDB_Stripe3.bak' Mirroring Backups BACKUP DATABASE TestDB TO DISK = 'C:\DB2\Backups\TestDB_Original.bak' MIRROR TO DISK = 'D:\DB2\Backups\TestDB_Mirror_1.bak' MIRROR TO DISK = 'E:\DB2\Backups\TestDB_Mirror_2.bak' MIRROR TO DISK = 'F:\DB2\Backups\TestDB_Mirror_3.bak' WITH FORMAT

Restoring Databases RESTORE is not always an online operation. For full database restore user connections must be disconnected from the database prior to restoring over the database. Can be done as follows : ALTER DATABASE TestDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE Full Database restore RESTORE DATABASE TestDB FROM DISK = 'C:\DB2\Backups\TestDB_Apr25_2010.bak WITH NORECOVERY, REPLACE Note : REPLACE argument is used to tell SQL server to overlay the existing TestDB database. Transaction log restore RESTORE LOG TestDB FROM DISK = 'C:\Apress\Recipes\TestDB_Apr25_2010_log.trn' WITH RECOVERY

Scheduling Backups Daily backups can be done by SQL Server Agent using the Management studio tool in sql server 2005 A schedule is to be created and automatically the backups will be created based on the specified time. Another option is to use sqlcmd utility for automating Transact-SQL scripting tasks. [3] & later use Windows scheduled tasks. pgagent is a scheduling agent that comes packages with PgAdmin. pgagent has many advantages compared to other scheduling backup tools. Use crontab to schedule backups repeatedly. add a line in crontab file which reads as :- 15 2 * * * root mysqldump -u root p PASSWORD --all-databases gzip > /mnt/disk2/database_`data ' %m-%d-%y'`.sql.gz Automated Scripts Can write sql stored procedures with input parameter as database name and type of backup. Execute the scripts with required parameters as required.

Tools used : Mysqldump, pg_dump Mysqldump -backup a local database and restore it on remote database at the same time in Mysql.[4] For Backup Shell> mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql - For faster dump use opt option Copying on remote host : shell> mysqldump --opt db_name mysql --host=remote_host -C db_name To dump all databases : shell> mysqldump --all-databases > all_databases.sql To restore : Shell> mysqldump -u root -p[root_password] [database_name] < dumpfilename.sql In the same way pg_dump is the utility for backing up PostgreSQL database. [5]

High Availability Solutions Failover clustering Database Mirroring Log Shipping Replication

Questions?

References [1] http://www.developer.com/db/article.php/718491/what-is-a-database-administrator.htm [2] http://www.simple-talk.com/sql/backup-and-recovery/sql-server-2005-backups/ [3] http://msdn.microsoft.com/en-us/library/ms180944.aspx [4] http://www.thegeekstuff.com/2008/09/backup-and-restore-mysql-database-using-mysqldump/ [5] http://www.postgresql.org/docs/7.4/static/app-pgdump.html