Administration etc.. What is this ? This section is devoted to those bits that I could not find another home for… Again these may be useless, but humour.

Slides:



Advertisements
Similar presentations
Refeng Wu CQ5 WCM System Administrator
Advertisements

INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
CSCI 3140 Module 8 – Database Recovery Theodore Chiasson Dalhousie University.
File System Implementation
Chapter 8 : Transaction Management. u Function and importance of transactions. u Properties of transactions. u Concurrency Control – Meaning of serializability.
Harvard University Oracle Database Administration Session 5 Data Storage.
Chapter 12 File Management Systems
Module 7: Restoring Databases. Overview SQL Server Recovery Process Preparing to Restore a Database Restoring Backups Restoring Databases from Different.
Backup and Recovery Part 1.
9 Copyright © Oracle Corporation, All rights reserved. Oracle Recovery Manager Overview and Configuration.
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
Agenda  Overview  Configuring the database for basic Backup and Recovery  Backing up your database  Restore and Recovery Operations  Managing your.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Oracle backup and recovery strategy
NovaBACKUP 10 xSP Technical Training By: Nathan Fouarge
Backup & Recovery 1.
Building Highly Available Systems with SQL Server™ 2005 Vineet Gupta Evangelist – Data and Integration Microsoft Corp.
Module 8: Server Management. Overview Server-level and instance-level resources such as memory and processes Database-level resources such as logical.
Distributed Deadlocks and Transaction Recovery.
Implementing Database Snapshot & Database Mirroring in SQL Server 2005 Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server MVP Microsoft.
1 Chapter 12 File Management Systems. 2 Systems Architecture Chapter 12.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
5 Copyright © 2008, Oracle. All rights reserved. Using RMAN to Create Backups.
Chapter 7 Making Backups with RMAN. Objectives Explain backup sets and image copies RMAN Backup modes’ Types of files backed up Backup destinations Specifying.
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
16 Copyright © 2007, Oracle. All rights reserved. Performing Database Recovery.
Extents, segments and blocks in detail. Database structure Database Table spaces Segment Extent Oracle block O/S block Data file logical physical.
Architecture Rajesh. Components of Database Engine.
7202ICT – Database Administration
Module 16: Performing Ongoing Database Maintenance
© 2013 Cisco System Inc. All rights reserved Cisco Confidential 1 © 2013 Cisco System Inc. All rights reserved. 1 System Backup And Restore Utility.
11 DISASTER RECOVERY Chapter 13. Chapter 13: DISASTER RECOVERY2 OVERVIEW  Back up server data using the Backup utility and the Ntbackup command  Restore.
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
Transactions and Locks A Quick Reference and Summary BIT 275.
Week 7 : Chapter 7 Agenda SQL 710 Maintenance Plan:
Database structure and space Management. Segments The level of logical database storage above an extent is called a segment. A segment is a set of extents.
11 Copyright © 2004, Oracle. All rights reserved. Dealing with Database Corruption.
1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 15: Reliability and Security in Database Servers Instructor’s.
IT Database Administration Section 09. Backup and Recovery Backup: The available options Full Consistent (cold) Backup Database shutdown, all files.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File System Implementation.
11.1 Silberschatz, Galvin and Gagne ©2005 Operating System Principles 11.5 Free-Space Management Bit vector (n blocks) … 012n-1 bit[i] =  1  block[i]
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
Unicenter NSM Debugging Tips & Tricks -Release r11.
Backup and Recovery - II - Checkpoint - Transaction log – active portion - Database Recovery.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
8 Copyright © 2007, Oracle. All rights reserved. Using RMAN to Duplicate a Database.
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
TOP 10 Thinks you shouldn’t do with/in your database
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
SQL SERVER MAINTENANCE PLANS Kat
6 Copyright © Oracle Corporation, All rights reserved. Backup and Recovery Overview.
Microsoft SQL is known as RDMS (Relational Database Management System) which is developed by Microsoft and is highly used at corporate and enterprise.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
You Inherited a Database Now What? What you should immediately check and start monitoring for. Tim Radney, Senior DBA for a top 40 US Bank President of.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
Oracle Database Architectural Components
WHEN DATABASE CORRUPTION STRIKES Presented by Steve Stedman Founder/Owner of Stedman Solution, LLC.
File-System Management
Database Corruption Advanced Recovery Techniques|
A Technical Overview of Microsoft® SQL Server™ 2005 High Availability Beta 2 Matthew Stephen IT Pro Evangelist (SQL Server)
Overview Continuation from Monday (File system implementation)
Performing Database Recovery
10 Administration etc..
Chapter 14: File-System Implementation
Transaction Log Performance Tuning
File System Implementation
Presentation transcript:

Administration etc.

What is this ? This section is devoted to those bits that I could not find another home for… Again these may be useless, but humour me! We will cover –BACKUP –SP_IQCHECKDB –DBCC options –Some other Stored Procedures

Backup Three Types of Backup –FULL backup –INCREMENTAL backup –INCREMENTAL-since-FULL backup All will backup the IQ Store and the Catalogue Store The IQ Temporary Store is never backed up

Backup Types FULL causes a full backup of the Catalogue and IQ Stores INCREMENTAL makes a full backup of the Catalogue Store, and backs up all changes to the IQ Store since the last IQ backup of any type INCREMENTAL SINCE FULL makes a full backup of the Catalogue Store, and backs up all changes to the IQ Store since the last FULL IQ backup

Backup Processing Backup backups committed data only –Backup begins and ends with a checkpoint –Any data that is committed during the backup process will be included in the backup –The transaction log is not backed up, it is deleted after a successful backup IQ Store Catalog Store Trans. Log Issue Checkpoint 1. Write Marker into Log 2. Write Catalog to Tape(s) 3. Tape Drive(s) Write (Changed) Data To Tape(s) 4. Write Marker into Log 5. Check for Completed TX. 6. If there are – backup the changed pages Then go to 5. 7a. If there are no committed TX Checkpoint,Delete Log and Stop 7b.

Transaction Log The log is deleted or renamed after a backup completes –Not needed for a Restore If there are ASA tables in the catalog store (other than system tables) you must retain the log to recover transactions for this data

Restore Before Restore –You must have dba authority –No users on the database –The database server must be running To ensure exclusive access start the server with the -gd option (-gd dba)

Restore Restrictions For incremental restores there must be no user access between restores Restore will create and drop dbspaces as required

When to do Restores If the database is corrupt - you must do a restore If the last backup was FULL restore the FULL backup only IF you have an INCREMENTAL SINCE FULL backup that precedes the database failure then restore the FULL followed by the INCREMENTAL SINCE FULL

Check DB The routine to check the database for potential corruptions is SP_IQCHECKDB There are no run-time options for this command, however the DBCC options control the behavior of the SP_IQCHECKDB command Also there are some (2) server startup switches that affect the performance and behavior of SP_IQCHECKDB

Normal Checkdb Performance If none of the defaults are set SP_IQCHECKDB –checks ALL of the allocated pages in the database –Traverses all of the index chains (and checks the reverse addresses) –Reports any errors found –If no errors are found then the free list is updated This last point is moot – if there are no errors, then the free list is OK – but well…

Checkdb Output DB StatisticsValueFlags IQ DBCC Verification Summary Total Blocks In Database20480 Blocks Marked as In Use1026 Blocks Verified as In Use1026 Blocks Detected as Duplicates0 Blocks Detected as Unowned0 Blocks Detected as Leaked0 Tables Verified9 Indexes Verified74 Join Indexes Verified0

Checking the database There are 3 procedures that check the system “metadata” in addition to SP_IQCHECKDB These are –SP_IQDBSIZE –SP_IQTABLESIZE –SP_IQINDEXSIZE These procedures not only report on sizes, they check on the objects, and will fail if there is an error At this point the procedure SP_IQCHECKDB should be executed

Warning Just because the procedures execute cleanly does not guarantee that the object is clean, but it is a good quick check If you suspect there is corruption in the database you should run SP_IQCHECKDB first But this will take time If SP_IQCHECKDB finds corruption then run the other procedures to try and localize the corruption – or run SP_IQCHECKDB with the fix options on

Force_Drop The FORCE_DROP option will allow a dba to drop a corrupted object (index or table) The space used by the object will not be recovered To recover the space the server should be started with the –iqfrec and –iqdropblks switches

Server Switches The switch –iqfrec will mark the database as clean (may not be what you want!) and allow you to try and drop any corrupted objects The switch –iqdroplks sets an option in SP_IQCHECKDB to allow the collection of dropped blocks –Effectively this rebuilds the free list

DBCC_OPTION - 1 The Option DBCC_OPTION controls the action of SP_IQCHECKDB when problems are encountered Value are 0 thru 7, default is Zero

DBCC_OPTION - 2 ValueAction 0If –iqdropblks is set this checks for leaked blocks and corrupt pages – if there are no errors the free list is rebuilt – if there are errors then the error list is reported, but no action is taken If –iqdropblks is not set then if an error is found the server (probably) will terminate 1Fast leak check – walks the block maps only. This is very fast (1-2 GB per second) 2Checks for leaked blocks and corrupt pages/chains. Runs at around 50Mb to 100Mb per second. This is the same as 0 when –iqdropblks is set ValueAction 3Server must have –iqdropblks set. Checks leaked blocks (same as 0 and –iqdropblks but only checks leaks 4Checks page chaining on all indexes 5Full chain and consistency check on all indexes, not just the index chaining (This can be slow) 6Full consistency check on all indexes, and will try to repair broken chains 7A more detailed version of 6 - more through but very much slower.

SP_IQDBSTATISTICS This procedure (used to) give(s) a more detailed map of the storage in the database Now (12.4) and with this information is present in the SP_IQCHECKDB output

Sizing the database There are a series of sizing stored procedures I am not going through them – you can read as well as I can One minor issue – if the IQ_PageSize is different to the default the estimated sizes will be wrong!

Server/Database information Everyone knows sp_iqstatus But also try –sa_conn_properties – this does not just display the options list - there is a set of almost useful counters at the front of the report –sa_db_properties -this gives you the database related information – again sometimes useful –sa_eng_properties – this returns the engine related data

Sp_IQStatus Adaptive Server IQ (TM) Copyright (c) by Sybase, Inc. All rights reserved. Version:12.4.0/(32bit mode)/MS Windows NT 4.0/EBF 0009 Time Now: :20: Build Time:Jan , 03:38:09 File Format:22 on 10/29/1998 Catalog Format:2 Stored Procedure Revision:1 Page Size:1024/512blksz/2bpc Number of DB Spaces:1 Number of Temp Spaces:1 DB Blocks: IQ_SYSTEM_MAIN Temp Blocks: IQ_SYSTEM_TEMP Create Time: :00: Update Time: :00: Main IQ Buffers:6393, 8Mb Temporary IQ Buffers:3196, 4Mb Main IQ Blocks Used:1026 of 20480, 5%, Max Block#: 1205 Temporary IQ Blocks Used:13 of 10240, 0%, Max Block#: 0 Memory:Current: 13mb, Max: 14mb Main IQ Buffers:Used: 12, Locked: 1 Temporary IQ Buffers:Used: 6, Locked: 0 Main IQ I/O:I: L27/P12 O: D4/P1 C: D Temporary IQ I/O:I: L32/P0 O: D6/P0 C: D0

Sa_conn_properties NumberPropNumPropNamePropDescriptionValue CacheHitsCache hits CacheReadCache reads DiskReadDisk reads DiskSyncReadDisk synchronous reads DiskWaitReadDisk wait for reads DiskWaitWriteDisk wait for writes CacheReadTableCache table reads CacheReadIndLeafCache index leaf reads0 Etc…

Sa_db_properties NumberPropNumPropNamePropDescriptionValue 0125NameDatabase nameasiqdemo 0126AliasMounted database nameasiqdemo 0127FileDatabase file C:\Program Files\Sybase\ASIQ12\demo\asiqdemo.db 0128PageSizeDatabase page size LogNameDatabase log file name C:\Program Files\Sybase\ASIQ12\demo\asiqdemo.log 0131ConnCountNumber of connections2 0146FileVersionDatabase file version number CheckpointUrgencyDatabase checkpoint urgency0 0148RecoveryUrgencyDatabase recovery urgency0 0151IQStoreIQ store is on/offON 0163CharSetCharacter Setcp MultiByteCharSetMulti Byte Character Set ( on/off )OFF 0165LanguageLanguageunknown

Sa_eng_properties PropNumPropNamePropDescriptionValue 0IdleCheckIdle I/O checked0 1IdleWriteIdle I/O writes 0 2IdleChkptIdle I/O checkpoints0 3IdleChkTimeIdle I/O checkpoint time0 4ChkptCheckpoints1 5ChkptPageCheckpoint log pages2 6ChkptFlush Checkpoint flushed pages2 7ExtendDB Extend database file writes0 8ExtendTempWriteExtend temporary file writes66 9FreeWritePushFree list write to pushable list0 10FreeWriteCurrFree list write to current list0 11CommitFile Commit writes to disk PendingReq Pending requests detected0 13CurrRead Active disk read requests0 14MaxReadMaximum active disk read requests2 15CurrWriteActive disk write requests 0 16MaxWrite Maximum active disk write requests2 17CurrIO Active disk read/write requests0 18MaxIOMaximum active disk read/write requests2 19JavaNSSize Java VM Namespace size0 20IOToRecover0

Administration - End