segunda-feira, 18 de julho de 2011

Como alterar uma tablespace de UNDO no banco de dados

Este artigo demonstrará como alterar a tablespace de UNDO num banco de dados. Este procedimento necessitará programar uma parada no banco de dados.


1.Criar uma nova tablespace de UNDO com o tamanhos e caminho desejados, respeitando as regras
   de  negócio da empresa.

SQL> create undo tablespace UNDOTBS2 
     datafile 'E:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL2\UNDOTBS02.DBF' size 500M;


Tablespace created.


2. Atualizar o arquivo "init.ora" apartir do SPFILE caso esteja configurado e editar o parâmetro
    "undo_tablespace=", usar:

SQL> create pfile='d:\oracle\product\10.2.0\db_1\dbs\pfileorcl2.ora' 
       from spfile='D:\ORACLE\PRODUCT\10.2.0\DB_1\DBS\SPFILEORCL2.ORA';


File created.


Alterar os parâmetros abaixo:

UNDO_TABLESPACE=UNDOTBS2
UNDO_MANAGEMENT=MANUAL 

Onde o nome informado no parâmetro UNDO_TABLESPACE será o da nova tablespace de UNDO.

Configurar o parâmetro UNDO_MANAGEMENT para MANUAL para que os segmentos de UNDO possam ser colocados em OFFLINE e editados após o "restart" do banco de dados, (ver passo 6).

3. Agendar uma janela de tempo para baixar o banco de dados, usar:

SQL> shutdown immediate;


4. Levantar o banco de dados, com o PFILE (ajustado no passo 2).

SQL> startup pfile='d:\oracle\product\10.2.0\db_1\dbs\pfileorcl2.ora'


5. Confirmar se a nova tablespace de UNDO está em uso:

SQL> show parameter undo_tablespace


NAME              TYPE            VALUE
-------------     --------------  -----------------
undo_tablespace   string          UNDOTBS2


6. Verificar os status dos segmentos de UNDO e colocar os segmentos de UNDO antigos em OFFLINE.
    Os segmentos de UNDO deverão ser criados na nova tablespace de UNDO.

SQL> select owner, segment_name, tablespace_name, status from dba_rollback_segs order by 3;


OWNER       SEGMENT_NAME    TABLESPACE_NAME STATUS
------      --------------- --------------- ------- 
PUBLIC      _SYSSMU3$       UNDOTBS1        OFFLINE
PUBLIC      _SYSSMU2$       UNDOTBS1        OFFLINE
PUBLIC      _SYSSMU19$      UNDOTBS2        OFFLINE
...
... 
...


Se os segmentos de UNDO antigos estiverem ONLINE, deve-se colocá-los em OFFILNE, usar:

SQL>alter rollback segment "_SYSSMU3$" offline;
SQL>alter rollback segment "_SYSSMU2$" offline;
...
...
...


Esse comando deverá ser executado para todos os segmentos de UNDO antigos que estejam apontando para a tablespace antida de UNDO.

7. Certifique-se que todos os segmentos antigos de UNDO estão em OFFLINE, para a remoção da
    tablespace de UNDO antiga. Para a remoção da tablespace de UNDO antiga usar:

SQL> drop tablespace UNDOTBS1 including contents and datafiles;


Tablespace dropped.


8. Recrie o arquivo de configuração SPFILE para atualizar os parâmetros alterados
    (UNDO_TABLESPACE  e UNDO_MANAGEMENT) porém antes altere o parâmetro
    UNDO_MANAGEMENT para AUTO, conforme demonstrado abaixo:

UNDO_MANAGEMENT='AUTO'
UNDO_TABLESPACE='UNDOTBS2'


SQL> create spfile='d:\oracle\product\10.2.0\db_1\dbs\spfileorcl2.ora' 
       from pfile='D:\ORACLE\PRODUCT\10.2.0\DB_1\DBS\PFILEORCL2.ORA';


File created.


9. Baixe o banco de dados (shutdown immediate) e "restart" o banco de dados utilizando o arquivo SPFILE.

SQL> startup;

Ao término da execução desses passos o banco de dados já estará utilizando a nova tablespace de UNDO.



Rubens Oliveira
DBA Oracle Consultor
olivert.dba@consultant.com

segunda-feira, 11 de julho de 2011

Notas do Oracle Metalink

Neste artigo estão relacionados os "notes" mais usuais do suporte Oracle, através deles podem ser possíveis averiguar possíveis soluções no banco de dados ou mesmo em outros produtos (Portais, EBS, entre outros).
Os tópicos estão separados por assunto.

RDBMS and E-Business Suite Installation and Configuration

118218.1 11i. Installing a Digital Cerificate on both the Server and Client.
252217.1 Requirements for Installing Oracle 9iR2 on RHEL3
146469.1 Installation & Configuration of Oracle Login server & Portal3i
146468.1 Installation of Oracle9i Application Server(9iAS)
152775.1 XML gateway installation
165700.1 Multiple Jserv configuration
207159.1 Documentation of 9iAS
210514.1 Express Server WebIV numbers
170931.1 Notes on Motif troubleshooting
177610.1 Oracle Forms in Applications FAQ
258021.1 How to monitor the progress of a materialized view refresh (MVIEW)
330250.1 Tips & Tricks To Make Apache Work With Jserv
139684.1 Oracle Applications Current Patchset Comparison Utility patchsets.sh
236469.1 Using Distributed AD in Applications Release 11.5.
 96630.1 Cash Management Overview
233428.1 Sharing the Application Tier File System in Oracle Applications 11i
243880.1 Shared APPL_TOP FAQ
330250.1 Tips & Tricks To Make Apache Work With Jserv
241370.1 Concurrent Manager Setup and Configuration Requirements in an 11i RAC Environment
209721.1 How to Change the Port Number on one Machine, When we Use Multiple Collaboration Suite Tiers
177377.1 How to change passwords in Portal (Database and lightweight user passwords)
304748.1 Internal: E-Business Suite 11i with Database FAQ
166213.1 SPFILE internals  INTERNAL ONLY
216208.1 Oracle9i Application Server (9iAS) with Oracle E-Business Suite Release

Physical Standby

180031.1 Creating a Data Guard physical standby
214071.1 Creating a Data Guard physical standby with Data Guard Manager
232649.1 Configuring gap resolution
232240.1 Performing a switchover
227196.1 Performing a failover
187242.1 Applying Patchsets with Physical Standby in Place

Logical Standby

186150.1 Creating a logical standby
214071.1 Creating a logical standby with Data Guard Manager
232240.1 Performing a switchover
227196.1 Performing a failover
233261.1 Tuning Log Apply Services
215020.1 Troubleshooting Logical Standbys
210989.1 Applying Patchsets with Logical Standby in Place
233519.1 Known Issues with Logical Standby

Dataguard General Information

205637.1 Configuring Transparent Application Failover with Data Guard
233509.1 Data Guard Frequently Asked Questions
225633.1 Using SSH with 9i Data Guard
233425.1 Top Data Guard Bugs
219344.1 Usage, Benefits and Limitations of Standby RedoLogs
201669.1 Setup and maintenance of Data Guard Broker using DGMGRL
203326.1 Data Guard 9i Log Transportation on RAC
239100.1 Data Guard Protection Modes Explained

Dataguard Configuration Best Practices

240874.1 Primary Site and Network Configuration Best Practices
240875.1 9i Media Recovery Best Practices

Frequently Asked Questions

 68993.1 Concurrent Managers on NT
130608.1 ADPATCH BASICS
 74924.1 ADI (Applications Desktop Integrator) Installation
 61552.1 DIAGNOSING DATABASE HANGING ISSUES
114226.1 How to Set Up Apache and JSERV w/ Oracle XSQL, JSP, and Developer
146469.1 Installing and Configuring Oracle Login Server and Oracle Portal 3i with Oracle Applications 11i
146468.1 Installing Oracle9i Application Server 1.0.2.2.2 with Oracle Applications 11i
 62463.1 Detailed Guide on How the Intelligent Agent Works
104452.1 Troubleshooting (Concurrent Manager Unix specific)
122662.1 How to change the hostname or domainname of your portal
231286.1 Configuring the Oracle Workflow 2.6 Java-based Notification Mailer with Oracle Applications 11i
230688.1 Basic ApacheJServ Troubleshooting with IsItWorking.class
204015.1 Export/Import Process for Oracle Applications Release 11i Database Instances Using Oracle8i EE
158818.1 Migrating the Workflow Mailer to the APPLMGR Account
185431.1 Troubleshooting Oracle Applications Manager OAM 2.0 for 11i
177089.1 OAM11i Standalone Mode Setup and Configuration
172174.1 WF 2.6: Oracle Workflow Notification Mailer Architecture in Release 11i
166021.1 Oracle Applications Manager 11i Pre-requisite Patches
166115.1 Oracle Applications Manager 11i integrated with Oracle Applications 11i
165041.1 Generic Service Management Functionality
204090.1 Generic Service Management Configuration using Applications Context Files
139863.1 Configuring and Troubleshooting the Self Service Framework with Oracle Applications (latest version)
187735.1 Workflow FAQ All Versions
166830.1 Setting up Real Application Cluster (RAC) environment on Linux Single node
158868.1 Step by Step, Oracle 9iAS Installation Process
123243.1 Scheduling Web Reports Via Oracle Reports Server CGI
165195.1 Using AutoConfig to Manage System Configurations with Oracle Applications 11i

RMAN and Backup & Restore

60545.1 How to Extract Controlfiles, Datafiles, and Archived Logs from RMAN Backupsets

10gR2 Setup Installation, ASM,CRS, RAC , Troubleshooting

471165.1 Additional steps to install 10gR2 RAC on IBM zSeries Based Linux (SLES10)
407086.1 USING CLONING IN CRS/RAC WINDOWS ENVIRONMENTS TO ADD A NODE
414163.1 10gR2 RAC Install issues on Oracle EL5 or RHEL5 or SLES10 (VIPCA Failures)
467753.1 Veritas clusterware 5.0 not recognized by Oracle due to the fact that Veritas
467176.1 RAC: Installing RDBMS Oracle Home Hangs The Oui
466975.1 Step to remove node from Cluster when the node crashes due to OS or H/w
330358.1 CRS 10g R2 Diagnostic Collection Guide
401132.1 How to install Oracle Clusterware with shared storage on block devices
392207.1 CSSD Startup fails with NSerr (12532,12560) transport:(502,0,0) during Install
333166.1 CSSD Startup Fails with NSerr (12546,12560) transport:(516,0,0) During install
330929.1 CRS Stack Fails to Start After Reboot ORA-29702 CRS-0184
463255.1 Enable trace for gsd issues on 10gR2 RAC
338924.1 CLUVFY Fails With Error: Could not find a suitable set of interfaces for VIPs
462616.1 Reconfiguring the CSS disktimeout of 10gR2 Clusterware for Proper LUN Failover
461884.1 How To Disable Fatal Mode Oprocd On HP-UX Itanium 10gR2
404474.1 Status of Certification of Oracle Clusterware with HACMP 5.3 & 5.4
329530.1 Using Redhat Global File System (GFS) as shared storage for RAC
458324.1 Increased ‘Log File Sync’ waits in 10gR2
341214.1 How To clean up after a Failed (or successful) Oracle Clusterware Installation
454638.1 srvctl command failed An unexpected exception has been detected in native
276434.1 Modifying the VIP or VIP Hostname of a 10g Oracle Clusterware Node
383123.1 PRKP-1001 CRS-215 srvctl Can not Start 2nd Instance
358620.1 How To Recreate Voting And OCR Disk In 10gR1/2 RAC
200346.1 RAC: Frequently Asked Questions
220970.1 RAC: Frequently Asked Questions
269320.1 Removing a Node from a 10g RAC Cluster
430266.1 How to install 10gR2 and 9iR2 on the same node with different UDLM requirement
283684.1 How to Change Interconnect/Public Interface IP Subnet in a 10g Cluster
391790.1 Unable To Connect To Cluster Manager Ora-29701
294430.1 CSS Timeout Computation in RAC 10g (10g Release 1 and 10g Release 2)
316583.1 VIPCA FAILS COMPLAINING THAT INTERFACE IS NOT PUBLIC
416868.1 CDMP DIRECTORIES AND TRW FILES ON RAC
414177.1 Executing root.sh errors with “Failed To Upg Oracle Cluster Registry Config
390483.1 DRM Dynamic Resource management
390880.1 OCR Corruption after Adding/Removing voting disk to a cluster when CRS stack
309542.1 How to start/stop the 10g CRS ClusterWare
396643.1 CVU HAS INCORRECT ORA_CRS_HOME VARIABLE AFTER APPLYING CRS BUNDLE II
387205.1 The 10.1.0.4 DB Cannot Start With 10.2.0.2.0 CRS And ASM
270512.1 Adding a Node to a 10g RAC Cluster
395156.1 Startup (mount) of 2nd RAC instance fails with ORA-00600 [kccsbck_first]
363777.1 How to Completely Remove a Service so that its Service_id Can Be Reused
391112.1 Database Resource Manager Spins Lmon To 100% Of Cpu
365530.1 Permissions not set correctly after 10gR2 installation
357808.1 Diagnosability for CRS / EVM / RACG
284752.1 10g RAC: Steps To Increase CSS Misscount, Reboottime and Disktimeout
332180.1 ASMCMD ASM command line utility
371434.1 Using Openfiler iSCSI with an Oracle database
338047.1 cluvfy ERROR: Unable to retrieve database release version
183408.1 Raw Devices and Cluster Filesystems With Real Application Clusters
367564.1 Server Reboots When Rolling Upgrading CRS(10gr1 -> 10gr2)
358545.1 Root.sh is failing with CORE dumps, during CRS installation
343092.1 How to setup Linux md devices for CRS and ASM
295871.1 How to verify if CRS install is Valid
331934.1 RAC Single Instance (ASM) startup fails with ORA-27300/ORA-27301/ORA-27302
341974.1 10gR2 RAC Scheduling and Process Prioritization
341971.1 10gR2 RAC GES Statistics
341969.1 10gR2 RAC OS Best Practices
341965.1 10gR2 RAC Reference
341963.1 10gR2 RAC Best Practices
313540.1 Manually running cvu to verify stages during a CRS/RAC installation
331168.1 Oracle Clusterware consolidated logging in 10gR2
339710.1 Abnormal Program Termination When Installing 10gR2 on RHAS 4.0
339383.1 CSSD FAILURE DOES NOT REBOOT THE NODE
337937.1 Step By Step 10gR2 RAC with ASM install on Linux(x86) Demo
280209.1 10g RAC Performance Best Practices

Real Application Clusters(RAC)

181503.1 Real Application Clusters Whitepapers (OTN)
280209.1 10g RAC Performance Best Practices (INTERNAL ONLY)
302806.1 IBM General Parallel File System (GPFS) and Oracle RAC on AIX 5L and IBM eServer pSeries
270512.1 Adding a Node to a 10g RAC Cluster
137288.1 Manual Database Creation in Oracle9i (Single Instance and RAC)
292776.1 10g RAC Lessons Learned
280216.1 10g RAC Reference (INTERNAL ONLY)
269320.1 Removing a Node from a 10g RAC Cluster
226561.1 9iRAC Tuning Best Practices (INTERNAL ONLY)
220178.1 Installing and setting up ocfs on Linux Basic Guide
208375.1 How To Convert A Single Instance Database To RAC In A Cluster File System Configuration
255359.1 Automatic Storage Management (ASM) and Oracle Cluster File System (OCFS) in Oracle10g
341963.1 10gR2 RAC Best Practices (INTERNAL ONLY)
273015.1 Migrating to RAC using Data Guard
329530.1 Using Redhat Global File System (GFS) as shared storage for RAC
270901.1 How to Dynamically Add a New Node to an Existing 9.2.0 RAC Cluster
203326.1 Data Guard 9i Log Transportation on RAC
169539.1 A Short Description of HA Options Available in 9i
160120.1 Oracle Real Application Clusters on Sun Cluster v3
226569.1 9iRAC Most Common Performance Problem Areas (INTERNAL ONLY)
251578.1 Step-By-Step Upgrade of Oracle Cluster File System (OCFS v1) on Linux
247135.1 How to Implement Load Balancing With RAC Configured System Using JDBC
139436.1 Understanding 9i Real Application Clusters Cache Fusion
285358.1 Creating a Logical Standby from a RAC Primary Using a Hot Backup
222288.1 9i Rel 2 RAC Running on IBM’s General Parallel File System
226567.1 9iRAC Related Init.ora Parameters (INTERNAL ONLY)
210889.1 RAC Installation with a NetApp Filer in Red Hat Linux Environment
341965.1 10gR2 RAC Reference (INTERNAL ONLY)
341969.1 10gR2 RAC OS Best Practices (INTERNAL ONLY)
226566.1 9iRAC Related Latches (INTERNAL ONLY)
220970.1 RAC: Frequently Asked Questions
268202.1 Dynamic node addition in a Linux cluster
285455.1 HOW TO MAKE AN EXCLUSIVE INSTANCE AVAILABLE ON MULTIPLE CLUSTER NODES.
332257.1 Using Oracle Clusterware with Vendor Clusterware FAQ
245079.1 Steps to clone a 11i RAC environment to a non-RAC environment
235158.1 How To Enable/Disbale Archive Log Mode on Oracle9i Real Application Cluster
210022.1 How To Add A New Instance To The Existing Two Nodes RAC Database Manually
317516.1 Adding and Deleting a Cluster Node on 10gR2 / Linux
271685.1 How to Run Autoconfig for RAC Environment on Apps Tier Only
278816.1 How to Setup Parallel Concurrent Processing using Shared APPL_TOP for RAC Environment
334459.1 How to change hostname in RAC environment
250378.1 Migrating Applications 11i to use Oracle9i RAC (Real Application Clusters).
295998.1 How to solve corruptions on OCFS file system
345081.1 How to Rename a RAC Database in a 10g Real Application Clusters Environment
312051.1 How To Remove Ocfs From Linux Box.

Upgrades

125767.1 Upgrading Devloper6i with Oracle Applications 11i
216550.1 RDBMS upgrade to 9.2.0
161779.1 Upgradation of HTTP Server
212005.1 Upgrade Oracle Applications to 11.5.8
139863.1 Self Servie Framework Upgrade
112867.1 Express Server & OFA upgrade
124606.1 Jinitiator upgrade
130091.1 JDK upgrade to 1.3
130091.1 Upgrading Oracle Applications 11i to use JDK 1.3
144069.1 Upgrading to Workflow 2.6 with Oracle Applications 11i
159657.1 Complete Upgrade Checklist for Manual Upgrades from 8.X / 9.0.1 to Oracle9i

Export / Import

230627.1 9i Export/Import Process for Oracle Applications Release 11i
331221.1 10g Export/Import Process for Oracle Applications Release 11i
362205.1 10g Release 2 Export/Import Process for Oracle Applications Release 11i
277650.1 How to Use Export and Import when Transferring Data Across Platforms or Across.
243304.1 10g: Transportable Tablespaces Across Different Platforms
341733.1 Export/Import DataPump Parameters INCLUDE and EXCLUDE How to Load and Unload.


Rubens Oliveira
DBA Oracle Consultor
olivert.dba@consultant.com