Embed
Email

Contents - McGraw-Hill Professional

Document Sample

Shared by: yunyi
Categories
Tags
Stats
views:
2
posted:
11/12/2011
language:
English
pages:
11
Contents



FOREWORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi

ACKNOWLEDGMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii

INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii



PART I

Overview

1 Windows 2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Oracle and Microsoft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Windows 2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

A Brief Look Inside Windows 2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

The Windows 2000 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

The Registry and the Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

2 Overview of Oracle9i RDBMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Process Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

The Oracle Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

The Database Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Internal Database Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Database Integrity Checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56



PART II

Implementing the Oracle RDBMS on Windows 2000

3 Configuring Windows 2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Tuning Windows for Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

Optimize Windows 2000 for Oracle . . . . . . . . . . . . . . . . . . . . . . 63







ix

x Oracle9i for Windows 2000 Tips & Techniques







Microsoft Management Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

Computer Management Console . . . . . . . . . . . . . . . . . . . . . . . . . 70

Building Custom MMC Consoles . . . . . . . . . . . . . . . . . . . . . . . . . 76

Command-Line Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

Using the Windows 2000 Shell . . . . . . . . . . . . . . . . . . . . . . . . . . 79

Unix Integration Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

Using the Resource Kit Appropriately . . . . . . . . . . . . . . . . . . . . . 87

Sysinternals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

System Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Using the Event Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Managing Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

The Task Scheduler Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

The Operating System Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

Understanding and Controlling the Environment on

Windows 2000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

Active Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

Remote Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

Remote Administration with MMC . . . . . . . . . . . . . . . . . . . . . . . 106

Remote Administration with VNC . . . . . . . . . . . . . . . . . . . . . . . . 107

Remote Administration with the Windows 2000 Telnet Server . . 107

Remote Administration with pcAnywhere and Other

Commercial Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

Microsoft Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

Oracle Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

Looking Ahead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

The Future of Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

4 Installing and Configuring the Oracle RDBMS . . . . . . . . . . . . . . . . . . . . . . . . . 115

History of Oracle on Windows NT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

File Naming on Previous Versions . . . . . . . . . . . . . . . . . . . . . . . . 117

Multiple Oracle Homes on Windows NT/2000 . . . . . . . . . . . . . . 117

How Oracle Interacts with the Registry . . . . . . . . . . . . . . . . . . . . 119

The Oracle Home Selector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

The Oracle Universal Installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

Java-Based Installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Beginning the Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

Viewing Installed Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

Defining the Current Installation . . . . . . . . . . . . . . . . . . . . . . . . . 125

Creating the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

Behind the Scenes with the Oracle Database

Configuration Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Contents xi





Using the ORADIM Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

Setting the ORACLE_SID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

Creating a Parameter File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

DB Sizing Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

Defining the Buffer Cache for Multiple Block Sizes . . . . . . . . . . . 140

Shared Pool, Large Pool, and Java Pool . . . . . . . . . . . . . . . . . . . . 141

SORT_AREA_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

Archiving Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

The Database Storage Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

The Create Database Command . . . . . . . . . . . . . . . . . . . . . . . . . 143

Finalizing the Database Creation . . . . . . . . . . . . . . . . . . . . . . . . . 148

The Demise of Connect Internal and SVRMGRL . . . . . . . . . . . . . 150

Deinstalling Oracle Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

Removing an ORACLE_HOME . . . . . . . . . . . . . . . . . . . . . . . . . . 153

Removing Oracle Altogether . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

5 Advanced Database Administration for Windows 2000 . . . . . . . . . . . . . . . . . 157

Advanced Database Creation and Management . . . . . . . . . . . . . . . . . . . 159

Using Database Templates on Windows 2000 . . . . . . . . . . . . . . 159

Oracle Managed Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

SPFILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

Using SGA_MAX_SIZE and the Dynamic SGA . . . . . . . . . . . . . . 167

Oracle Memory Usage on Windows 2000 . . . . . . . . . . . . . . . . . . . . . . . 168

Oracle in the Windows Memory Architecture . . . . . . . . . . . . . . . 168

Give Oracle All the Memory You’ve Got . . . . . . . . . . . . . . . . . . . 168

Monitor Memory Usage from Outside the Database . . . . . . . . . . 172

Use Your Memory Wisely . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

Going Beyond 3GB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

Using the Performance Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

Understanding and Using the Performance Monitor . . . . . . . . . . 183

Identifying and Viewing Threads Within the RDBMS . . . . . . . . . . 187

Using tlist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

Monitoring CPU Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

Disk Usage on Windows 2000 . . . . . . . . . . . . . . . . . . . . . . . . . . 193

Using the Oracle Administration Assistant . . . . . . . . . . . . . . . . . . . . . . . 194

Getting Started with the Oracle Administration Assistant . . . . . . . 195

Configuring Operating System Authentication with ORAADM . . 195

Additional 9i Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

Reorganizing Using Oracle9i DBMS_REDEFINITION . . . . . . . . . 199

Transportable Tablespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

xii Oracle9i for Windows 2000 Tips & Techniques







6 Backup and Recovery Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

Base Your Backup Strategy on Your Business Needs . . . . . . . . . . . . . . . 211

The Nature of Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

Frequency of Data Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212

Align Backup Strategies with Business Needs Before Agreeing to a

Service Level Agreement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

Cold Backups Make Your Life Easier . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

Using Windows 2000 Backup Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

Third-Party Backup Products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

Understanding and Implementing Hot Backups . . . . . . . . . . . . . . . . . . . 217

Leveraging Server Managed Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . 220

Understanding the Oracle9i Recovery Manager Architecture . . . . . . . . . 221

RMAN Configuration: A Primer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

Target Database Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 223

Recovery Catalog Configuration . . . . . . . . . . . . . . . . . . . . . . . . . 224

A Note on RMAN Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . 225

RMAN Integration with Media Management Software . . . . . . . . . . . . . . 226

Understanding the Benefits of an RMAN Implementation . . . . . . . . . . . . 227

Backup Memory Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

RMAN and Corruption Checking . . . . . . . . . . . . . . . . . . . . . . . . . 229

The Beauty of Block-Level Backups . . . . . . . . . . . . . . . . . . . . . . . 229

RMAN Backups: Syntax and Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

The RMAN Run Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

Channel Allocation Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . 233

The RMAN Backup Command . . . . . . . . . . . . . . . . . . . . . . . . . . 234

Establishing Persistent Backup Parameters . . . . . . . . . . . . . . . . . . . . . . . 241

RMAN Restore and Recovery: A Primer . . . . . . . . . . . . . . . . . . . . . . . . . 242

The RMAN Restore Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . 242

RMAN Recovery: Syntax and Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245

Manual Recovery Using SQL*Plus . . . . . . . . . . . . . . . . . . . . . . . . 245

Use RMAN to Avoid Manual Restore and Recover Operations . . 246

The Recover Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246

Channel Allocation and Recovery . . . . . . . . . . . . . . . . . . . . . . . . 247

Incremental Backups and Recovery . . . . . . . . . . . . . . . . . . . . . . . 248

Understanding and Using Incomplete Recovery . . . . . . . . . . . . . . . . . . . 248

Time-Based Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

The Time Clause and Restore Operations . . . . . . . . . . . . . . . . . . 249

SCN and Log Sequence-Based Recovery . . . . . . . . . . . . . . . . . . . 250

Resetlogs, Reset Database, and Database Incarnations . . . . . . . . 250

Using Tablespace Point-in-Time Recovery . . . . . . . . . . . . . . . . . 252

Using RMAN Backups to Create Clone Copies of Production Databases 257

Duplicating to the Same Server as the Target Database . . . . . . . . 258

Duplicating to a Remote Server from the Target Database . . . . . . 260

Contents xiii





Test All Backups for Recoverability . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262



PART III

Windows 2000: The Premiere Enterprise Management Platform

7 Oracle Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

The Oracle Net Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

Net Name Resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

Connecting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285

Basic Client Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289

Dedicated Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

Shared Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294

Connectivity Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295

Net Manager: The Primary Configuration Tool . . . . . . . . . . . . . . 295

Client Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297

Client Configuration for Higher Availability . . . . . . . . . . . . . . . . . 301

Dedicated Server Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 303

Shared Server Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303

Listener Control and Configuration . . . . . . . . . . . . . . . . . . . . . . . 312

General Network Tuning and Configuration . . . . . . . . . . . . . . . . . . . . . . 316

The Virtual Interface Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318

Reference Material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

8 Oracle Enterprise Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323

EM Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324

EM Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329

Jobs, Events, and Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329

EM Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331

Notification Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331

Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

The Discovery Name Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

Management Regions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340

Connecting to a Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340

Standalone Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341

The Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342

The 9i Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342

Agent Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343

Agent Blackouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343

Isolate the Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344

Agent Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344

xiv Oracle9i for Windows 2000 Tips & Techniques







Events .................................................. 346

The Base Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346

Advanced Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346

User-Defined Events: Leverage Your Current Scripts . . . . . . . . . . 346

Event Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347

Event Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351

Event Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351

Responding to Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352

Event History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354

Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

Job Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

Already Available Job Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355

SQL*Plus Script as a Job Element . . . . . . . . . . . . . . . . . . . . . . . . . 356

Fix-It Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

Job Output Limit Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 357

Database Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358

Navigating Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358

Space Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359

Security Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359

Configuration Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360

Real Time Session Management . . . . . . . . . . . . . . . . . . . . . . . . . 362

Real Time Lock Management . . . . . . . . . . . . . . . . . . . . . . . . . . . 362

The Oracle Management Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363

The Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363

OMS Performance and Configuration . . . . . . . . . . . . . . . . . . . . . 364

Preparing Instances to Be Managed . . . . . . . . . . . . . . . . . . . . . . . 366

Directory Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367

Tracing, Logging, and Troubleshooting the OMS . . . . . . . . . . . . . 368

EM Web Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368

Using the Reporting Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . . 372

Custom Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374

EM 3-Tier Infrastructure and Firewalls . . . . . . . . . . . . . . . . . . . . . . . . . . 375

EM Reference and Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378

9 Advanced Management, Tools, and Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 379

Techniques with Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380

iSQL*Plus: SQL from a Browser . . . . . . . . . . . . . . . . . . . . . . . . . . 380

Use the UTL_FILE Package to Access the Windows 2000

File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384

UTL_SMTP: Send Mail from Stored Procedures . . . . . . . . . . . . . . 390

Using DBMS_JOB to Get Things Done Regularly . . . . . . . . . . . . 391

Java Stored Procedure to Run Commands . . . . . . . . . . . . . . . . . . 394

E-mail Notification from the Command Line . . . . . . . . . . . . . . . . 396

Contents xv





Tools for Holistic Database Management . . . . . . . . . . . . . . . . . . . . . . . . 398

Use Perl for Database and System Administration . . . . . . . . . . . . 398

Tracking Changes: Version Control with CVS and Wincvs . . . . . . 400

Statspack: A New Approach to Performance . . . . . . . . . . . . . . . . 402

External Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407

DBMS_FLASHBACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409

Oracle-Supplied PL/SQL Packages . . . . . . . . . . . . . . . . . . . . . . . 411

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412

10 Change Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413

Upgrading the Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414

Impact of an Operating System Upgrade . . . . . . . . . . . . . . . . . . . 415

Windows 2000 Service Packs . . . . . . . . . . . . . . . . . . . . . . . . . . . 417

MSCS and Rolling Upgrades of the Operating System . . . . . . . . . 418

Migrating or Upgrading the Oracle Database . . . . . . . . . . . . . . . . . . . . . 419

Migrating from Oracle7 to Oracle9i . . . . . . . . . . . . . . . . . . . . . . 420

Embarking on the Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422

Upgrading the Database from Oracle8.x to Oracle9i . . . . . . . . . . 426

Upgrading the Data Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . 428

Post-Migration/Post-Upgrade Steps . . . . . . . . . . . . . . . . . . . . . . . 430

Applying Patchsets to the Oracle RDBMS . . . . . . . . . . . . . . . . . . 432

Upgrading in a Clustered or Standby Environment . . . . . . . . . . . . . . . . . 434

Upgrading/Migrating in a Failsafe Environment . . . . . . . . . . . . . . 434

Upgrade Considerations in a RAC Environment . . . . . . . . . . . . . . 436

Migration in a Standby Environment . . . . . . . . . . . . . . . . . . . . . . 436

Upgrading and Patching in a Standby Environment . . . . . . . . . . . 437

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438



PART IV

Clustering and High Availability

11 Oracle Failsafe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441

Oracle Failsafe Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443

Understanding Failsafe and MSCS Concepts . . . . . . . . . . . . . . . . 443

Crash Recovery Versus Disaster Recovery . . . . . . . . . . . . . . . . . . 443

Virtual Servers and Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444

Cluster Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446

Designing an Oracle Failsafe Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 447

How Many Groups Do I Need? . . . . . . . . . . . . . . . . . . . . . . . . . . 447

Active/Active Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448

Active/Passive Cluster Configuration . . . . . . . . . . . . . . . . . . . . . . 449

N-Node Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449

Preparing to Install MSCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450

Configure Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450

Configure Network Cards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

xvi Oracle9i for Windows 2000 Tips & Techniques







Installing Microsoft Cluster Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453

Installing the First Node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453

Adding Additional Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456

Using Cluster Administrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457

Installing Cluster Administrator on a Client Machine . . . . . . . . . . 458

Installing Oracle Failsafe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458

Match Home Names on All Nodes . . . . . . . . . . . . . . . . . . . . . . . 459

Oracle Services for MSCS Security Setup . . . . . . . . . . . . . . . . . . . 459

Managing Your Failsafe Environment . . . . . . . . . . . . . . . . . . . . . 460

Making the Database Failsafe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462

Creating the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463

Verifying the Stand-Alone Database Configuration . . . . . . . . . . . 464

Creating a Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465

Adding the Database to a Group . . . . . . . . . . . . . . . . . . . . . . . . . 468

Troubleshooting in a Failsafe/MSCS Environment . . . . . . . . . . . . . . . . . . 472

Troubleshooting Tools in a Clustered Environment . . . . . . . . . . . 472

Maintenance in a Failsafe Environment . . . . . . . . . . . . . . . . . . . . 474

Removing Failsafe Components . . . . . . . . . . . . . . . . . . . . . . . . . . 476

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476

12 Oracle Real Application Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477

The RAC Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479

Shared Everything in the RAC Environment . . . . . . . . . . . . . . . . . 479

RAC Cluster Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480

Preparing for the Cluster Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481

Configuring the Interconnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482

Configuring the Raw Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . 482

Creating Symbolic Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488

Running the RAC Clustercheck . . . . . . . . . . . . . . . . . . . . . . . . . . 491

Installing the Cluster Software and Oracle9i RDBMS . . . . . . . . . . . . . . . 493

Running the Cluster Setup Wizard . . . . . . . . . . . . . . . . . . . . . . . . 493

What Just Happened? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496

Installing the Oracle Software . . . . . . . . . . . . . . . . . . . . . . . . . . . 499

Maintaining a RAC Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502

Services for Multiple Instances . . . . . . . . . . . . . . . . . . . . . . . . . . 502

System-Managed UNDO and/or Rollback in a RAC Environment 504

Redo Log Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504

Adding Additional Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505

Adding Datafiles and Creating Additional Tablespaces . . . . . . . . 506

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507

Contents xvii





13 The Standby Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509

Standby Database Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510

Standby Database Recovery Modes . . . . . . . . . . . . . . . . . . . . . . . 515

Opening the Standby Database in Read-Only Mode . . . . . . . . . . 516

Creating Sort Space for Long-Running Queries on the

Standby Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516

Standby Database Limitations and Restrictions . . . . . . . . . . . . . . 517

Traditional Standby Configuration: A Test Case . . . . . . . . . . . . . . . . . . . 518

Operating the Standby Database in Manual Recovery Mode . . . . 520

Setting Up the Standby Database in Managed Recovery Mode . . 521

Utilizing Oracle9i Log Transport Services . . . . . . . . . . . . . . . . . . . . . . . 523

Configuring LGWR for Log Transport . . . . . . . . . . . . . . . . . . . . . 524

Using Oracle9i Data Guard for Standby Database Management . . . . . . 525

Data Guard Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526

Graceful Switchover and Switchback . . . . . . . . . . . . . . . . . . . . . 526

Use RMAN to Configure the Standby Database . . . . . . . . . . . . . . . . . . . 528

Use the Standby Database for RMAN Backups of the

Production Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531

14 Oracle9i Advance Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533

Replication: Load Balancing, Disaster Recovery, and Distributed Offline

Transaction Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535

Load Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535

Disaster Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535

Distributed Offline Transaction Processing . . . . . . . . . . . . . . . . . 536

The Advanced Replication Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 536

N-Way Master Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536

Materialized View (Snapshot) Replication . . . . . . . . . . . . . . . . . . 538

Replication and Database Performance . . . . . . . . . . . . . . . . . . . . . . . . . . 539

Replication Manager vs. Replication API . . . . . . . . . . . . . . . . . . . . . . . . . . 539

N-Way Setup and Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540

Preparing the Oracle Databases for Replication . . . . . . . . . . . . . . 541

Building the Users and Configuring Connectivity . . . . . . . . . . . . 541

Building Automated Push and Purge Jobs . . . . . . . . . . . . . . . . . . 544

Building Replication Groups and Objects . . . . . . . . . . . . . . . . . . 546

Using Replication Manager for Master Group Setup . . . . . . . . . . 549

Conflict Resolution Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553

Types of Conflicts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554

Offline Instantiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554

Offline Instantiation for Resolving Conflicts . . . . . . . . . . . . . . . . . 556

xviii Oracle9i for Windows 2000 Tips & Techniques







Administration of the

Replication Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556

Monitoring Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557

Conclusions and Advice

for the Replication DBA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558

Test, Test, Then Retest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558

Keep All Database Staff Informed . . . . . . . . . . . . . . . . . . . . . . . . 559

Keep an Eye on Things . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559

15 Maximizing Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561

Transparent Application Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 562

Understanding Transparent Application Failover . . . . . . . . . . . . . 563

Real Application Clusters Guard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564

How Real Application Clusters Guard Works . . . . . . . . . . . . . . . 565

Rapid Connect-Time Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . 565

Installing MSCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566

Installing Real Application Clusters Guard . . . . . . . . . . . . . . . . . . 566

Configuring the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568

What Configuring the Database Does . . . . . . . . . . . . . . . . . . . . . 573

Defining a Termination Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . 574

Instance Restart Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575

Hang Detection Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575

Policies for Individual Instances . . . . . . . . . . . . . . . . . . . . . . . . . 577

Primary vs. Secondary Instances . . . . . . . . . . . . . . . . . . . . . . . . . 578

Manual Shutdowns and oracgcmd . . . . . . . . . . . . . . . . . . . . . . . 581

Backing Up a RAC Database Using RMAN . . . . . . . . . . . . . . . . . . . . . . 581

Datafile and Control File Backups . . . . . . . . . . . . . . . . . . . . . . . . 582

Archive Log Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583

Restoring Files in a Cluster Environment . . . . . . . . . . . . . . . . . . . 586

Creating a Single Instance Standby Database from a Cluster Database . . 587

Putting Your Standby Database to Use . . . . . . . . . . . . . . . . . . . . 588

Restoring to the Primary RAC Database from a Standby Database

Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590



PART V

Appendices

A Media Management Configuration for RMAN Backups to Tape . . . . . . . . . . . 593

VERITAS NetBackup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594

NetBackup Configuration for RMAN Backups . . . . . . . . . . . . . . . . . . . . 594

Monitoring Backups from the NetBackup Server . . . . . . . . . . . . . . . . . . 596

Contents xix





B Generating and Finding Diagnostic Information for Oracle 9i . . . . . . . . . . . . . 599

Oradebug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600

Oradebug Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601

Dumping Information to Trace Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602

Which Trace File? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603

State Dumps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603

Tracing SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605

Dumping Datafile, Redo, and Control File Headers . . . . . . . . . . . 608

Dumping Redo Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609

Dumping Blocks in Datafiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609

Error Stack Dumps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610

More to Explore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611



Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613



Related docs
Other docs by yunyi
2.2 Virtueller Adressraum
Views: 3  |  Downloads: 0
HIGHLINE TAPPED TO PRODUCE INAUG
Views: 2  |  Downloads: 0
Heteroflexibility
Views: 8  |  Downloads: 0
Lynn Jones 5 Grade Lesson Plan F
Views: 0  |  Downloads: 0
SPONSOR SHIP AND TABLE HOSTING OPPOR TUNITIES
Views: 0  |  Downloads: 0
NJTinside2
Views: 0  |  Downloads: 0
The Vegetarian Food Pyramid J
Views: 0  |  Downloads: 0
Anti-Spam Measures for End Users
Views: 0  |  Downloads: 0
Slide 1 - UCL
Views: 1  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!