Tài liệu Creating a Logical Standby Database by Using Enterprise Manager ppt

29 496 0
Tài liệu Creating a Logical Standby Database by Using Enterprise Manager ppt

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

7 Copyright © 2006, Oracle. All rights reserved. Creating a Logical Standby Database by Using Enterprise Manager Copyright © 2006, Oracle. All rights reserved. 7 - 2 Objectives After completing this lesson, you should be able to do the following: • Explain the advantages of SQL Apply • Explain when to use a logical standby database • Create a logical standby database by using Enterprise Manager Copyright © 2006, Oracle. All rights reserved. 7 - 3 Benefits of Implementing a Logical Standby Database • Provides an efficient use of system resources: – Open, independent, and active production database – Additional indexes and materialized views can be created for improved query performance. • Reduces workload on the primary database by offloading the following workloads to a logical standby database – Reporting – Summations – Queries Copyright © 2006, Oracle. All rights reserved. 7 - 4 Benefits of Implementing a Logical Standby Database • Provides data protection: – Primary database corruptions not propagated • Provides disaster recovery capabilities: – Switchover and failover – Minimizes downtime for planned and unplanned outages Copyright © 2006, Oracle. All rights reserved. 7 - 5 Securing Your Logical Standby Database • Configure the database guard to control user access to tables. • ALTER DATABASE GUARD command keywords: – ALL: prevents users from making changes to any data in the database. – STANDBY: prevents users from making changes to any data maintained by Data Guard SQL Apply. – NONE: normal security • Query GUARD_STATUS column in V$DATABASE. • Database guard level is set to ALL by broker automatically on the logical standby database. • Database guard level applies to all users except SYS. Copyright © 2006, Oracle. All rights reserved. 7 - 6 Preparing to Create a Logical Standby Database Perform the following steps on the primary database before creating a logical standby database: 1. Check for unsupported data types. 2. Be aware of unsupported DDL commands. 3. Ensure row uniqueness. 4. Verify that the primary database is configured for ARCHIVELOG mode. 5. Enable supplemental logging. Copyright © 2006, Oracle. All rights reserved. 7 - 7 Unsupported Objects • Log apply services automatically exclude unsupported objects when applying redo data to the logical standby database. • Unsupported objects: – Tables and sequences in the SYS schema – Tables using table compression – Tables used to support materialized views – Global temporary tables – Tables with unsupported data types (see list on next page) Copyright © 2006, Oracle. All rights reserved. 7 - 8 Unsupported Data Types • Log apply services automatically exclude tables with unsupported data types when applying redo data to the logical standby database. • Unsupported data types: – BFILE, ROWID, and UROWID – User-defined types – Object types REFs – Varrays – Nested tables – XMLtype Copyright © 2006, Oracle. All rights reserved. 7 - 9 Checking for Tables with Unsupported Data Types Query DBA_LOGSTDBY_UNSUPPORTED on the primary database for tables with unsupported data types: SQL> desc DBA_LOGSTDBY_UNSUPPORTED Name Null? Type -------------- -------- ------------- OWNER NOT NULL VARCHAR2(30) TABLE_NAME NOT NULL VARCHAR2(30) COLUMN_NAME NOT NULL VARCHAR2(30) DATA_TYPE VARCHAR2(106) Copyright © 2006, Oracle. All rights reserved. 7 - 10 Unsupported DDL Commands • EXPLAIN • LOCK TABLE • SET CONSTRAINTS • SET ROLE • SET TRANSACTION • ALTER DATABASE • ALTER SESSION • ALTER MATERIALIZED VIEW • ALTER MATERIALIZED VIEW LOG • ALTER SYSTEM • CREATE CONTROL FILE • CREATE DATABASE • CREATE DATABASE LINK • CREATE PFILE FROM SPFILE • CREATE SCHEMA AUTHORIZATION • CREATE MATERIALIZED VIEW • CREATE MATERIALIZED VIEW LOG • CREATE SPFILE FROM PFILE • DROP DATABASE LINK • DROP MATERIALIZED VIEW • DROP MATERIALIZED VIEW LOG [...]... Set to 160 MB or greater 7 - 16 Copyright © 2006, Oracle All rights reserved Creating a Logical Standby Database with Enterprise Manager Click “Add Standby Database. ” 7 - 17 Copyright © 2006, Oracle All rights reserved Using the Add Standby Database Wizard Select “Create a new logical standby database. ” 7 - 18 Copyright © 2006, Oracle All rights reserved Step 1: Specifying the Backup Type 7 - 19 Copyright... dbms_logstdby.apply_set ('LOG_AUTO_DELETE','FALSE'); 7 - 28 Copyright © 2006, Oracle All rights reserved Summary In this lesson, you should have learned how to: • Explain the advantages of a logical standby database • Decide when to use a logical standby database • Create a logical standby by using Enterprise Manager 7 - 29 Copyright © 2006, Oracle All rights reserved Practice 7: Overview This practice covers the... 2006, Oracle All rights reserved Enabling Supplemental Logging • Data Guard broker automatically enables supplemental logging • Manually enable full supplemental logging before you create your logical standby: SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA 2 (PRIMARY KEY, UNIQUE INDEX) COLUMNS; SQL> ALTER SYSTEM ARCHIVE LOG CURRENT; • Verify that the following columns in V $DATABASE contain a YES value:... Files by SQL Apply Redo logs from primary database SQL Apply Transform redo information into SQL Delete redo log files 7 - 27 Copyright © 2006, Oracle All rights reserved Logical standby database Enabling and Disabling the Auto-Delete Feature • Enabling the auto-delete feature: EXECUTE dbms_logstdby.apply_set ('LOG_AUTO_DELETE','TRUE'); • Disabling the auto-delete feature: EXECUTE dbms_logstdby.apply_set... value: – SUPPLEMENTAL_LOG_DATA_MIN – SUPPLEMENTAL_LOG_DATA_PK – SUPPLEMENTAL_LOG_DATA_UI 7 - 15 Copyright © 2006, Oracle All rights reserved Verifying Values of Initialization Parameters Verify the values for the following initialization parameters on the primary database : • PARALLEL_MAX_SERVERS: – Set to 5 or greater – Recommended value is 9 • LOG_PARALLELISM: Set to 1 (default) • SHARED_POOL_SIZE:... DBA_LOGSTDBY_NOT_UNIQUE on the primary database to find tables without a unique identifier: SQL> desc DBA_LOGSTDBY_NOT_UNIQUE Name Null? Type -OWNER NOT NULL VARCHAR2(30) TABLE_NAME NOT NULL VARCHAR2(30) BAD_COLUMN VARCHAR2(1) • BAD_COLUMN values: – Y: Data type is unbounded – N: Table contains enough column information • Add a primary key or unique index to ensure that SQL Apply can... 2006, Oracle All rights reserved Step 2: Specifying the Backup Options 7 - 20 Copyright © 2006, Oracle All rights reserved Step 3: Selecting the Database Location Instance Name 7 - 21 Copyright © 2006, Oracle All rights reserved Step 4: Specifying the Standby Database File Locations Access Method 7 - 22 Copyright © 2006, Oracle All rights reserved Step 4: Specifying the Standby Database File Locations... levels of database supplemental logging: – Full: enables database- wide, before-image logging of primary keys or unique indexes for all updates – Minimal: Minimal amount of information needed for LogMiner to identify, group, and merge the redo operations that are associated with DML changes – None: No additional redo information added to the redo stream • SQL Apply requires full supplemental logging... efficiently apply data updates 7 - 11 Copyright © 2006, Oracle All rights reserved Adding a Disabled Primary Key RELY Constraint You can add a disabled RELY constraint to uniquely identify rows: SQL> ALTER TABLE hr.employees 2 ADD PRIMARY KEY (employee_id, last_name) 3 RELY DISABLE; 7 - 13 Copyright © 2006, Oracle All rights reserved Supplemental Logging • Adds supplemental data to the log stream • Three... Locations File Locations 7 - 23 Copyright © 2006, Oracle All rights reserved Step 5: Specifying Standby Database Configuration Parameters 7 - 24 Copyright © 2006, Oracle All rights reserved Step 6: Reviewing the Configuration Information 7 - 25 Copyright © 2006, Oracle All rights reserved Standby Database Creation Processing 7 - 26 Copyright © 2006, Oracle All rights reserved Automatic Deletion of . - 6 Preparing to Create a Logical Standby Database Perform the following steps on the primary database before creating a logical standby database: 1. Check. Enterprise Manager Click “Add Standby Database. ” Copyright © 2006, Oracle. All rights reserved. 7 - 18 Using the Add Standby Database Wizard Select “Create a new

Ngày đăng: 09/12/2013, 16:15

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan