domingo, 15 de fevereiro de 2009

Migração Single to RAC

[oracle@rac1 backup_rman]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.desenv.db application OFFLINE OFFLINE
ora....v1.inst application OFFLINE OFFLINE
ora....v2.inst application OFFLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
[oracle@rac1 backup_rman]$ ls -ltr
total 105552
-rw-r----- 1 oracle oinstall 7405568 Out 11 11:19 desenv_controlfile_backup.rman
-rw-r----- 1 oracle oinstall 1114112 Out 11 11:19 desenv_database_full_20081009_667668381_14.rman
-rw-r----- 1 oracle oinstall 99442688 Out 11 11:19 desenv_database_full_20081009_667668315_13.rman
-rwxrwxrwx 1 oracle oinstall 903 Out 11 12:06 restore.sh
[oracle@rac1 backup_rman]$ sh restore.sh
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19>




RMAN> RMAN> [oracle@rac1 backup_rman]$
[oracle@rac1 backup_rman]$
[oracle@rac1 backup_rman]$
[oracle@rac1 backup_rman]$
[oracle@rac1 backup_rman]$
[oracle@rac1 backup_rman]$ ps -ef | grep smon
oracle 6070 1 0 09:29 ? 00:00:03 asm_smon_+ASM1
oracle 28129 27416 0 13:17 pts/2 00:00:00 grep smon
[oracle@rac1 backup_rman]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 13:17:14 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> shutdown abort
ORACLE instance shut down.
SQL> quit
Disconnected
[oracle@rac1 backup_rman]$ ls
desenv_controlfile_backup.rman desenv_database_full_20081009_667668381_14.rman restore.sh
desenv_database_full_20081009_667668315_13.rman log_restore_rman_full_20081011.1317.log
[oracle@rac1 backup_rman]$ ls -ltr
total 105556
-rw-r----- 1 oracle oinstall 7405568 Out 11 11:19 desenv_controlfile_backup.rman
-rw-r----- 1 oracle oinstall 1114112 Out 11 11:19 desenv_database_full_20081009_667668381_14.rman
-rw-r----- 1 oracle oinstall 99442688 Out 11 11:19 desenv_database_full_20081009_667668315_13.rman
-rwxrwxrwx 1 oracle oinstall 903 Out 11 12:06 restore.sh
-rw-r--r-- 1 oracle oinstall 727 Out 11 13:17 log_restore_rman_full_20081011.1317.log
[oracle@rac1 backup_rman]$ rm log_restore_rman_full_20081011.1317.log
[oracle@rac1 backup_rman]$ ls
desenv_controlfile_backup.rman desenv_database_full_20081009_667668315_13.rman desenv_database_full_20081009_667668381_14.rman restore.sh
[oracle@rac1 backup_rman]$ ls -ltr
total 105552
-rw-r----- 1 oracle oinstall 7405568 Out 11 11:19 desenv_controlfile_backup.rman
-rw-r----- 1 oracle oinstall 1114112 Out 11 11:19 desenv_database_full_20081009_667668381_14.rman
-rw-r----- 1 oracle oinstall 99442688 Out 11 11:19 desenv_database_full_20081009_667668315_13.rman
-rwxrwxrwx 1 oracle oinstall 903 Out 11 12:06 restore.sh
[oracle@rac1 backup_rman]$ nohup ./restore.sh &
[1] 28202
[oracle@rac1 backup_rman]$ nohup: appending output to `nohup.out'

[oracle@rac1 backup_rman]$
[oracle@rac1 backup_rman]$ clear
[oracle@rac1 backup_rman]$ tail -f log_restore_rman_full_20081011.1317.log

Recovery Manager: Release 10.2.0.4.0 - Production on Sat Oct 11 13:17:23 2008

Copyright (c) 1982, 2007, Oracle. All rights reserved.

connected to target database (not started)

RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19>
Oracle instance started

Total System Global Area 104857600 bytes

Fixed Size 1266032 bytes
Variable Size 67112592 bytes
Database Buffers 33554432 bytes
Redo Buffers 2924544 bytes

using target database control file instead of recovery catalog
allocated channel: ch1
channel ch1: sid=150 instance=desenv1 devtype=DISK

allocated channel: ch2
channel ch2: sid=149 instance=desenv1 devtype=DISK

allocated channel: ch3
channel ch3: sid=148 instance=desenv1 devtype=DISK

Starting restore at 11-OCT-08

channel ch2: skipped, autobackup already found
channel ch3: skipped, autobackup already found
channel ch1: restoring control file
channel ch1: restore complete, elapsed time: 00:00:19
output filename=+DADOS/desenv/controlfile/current.273.664744055
Finished restore at 11-OCT-08

database mounted

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 11-OCT-08

channel ch1: starting datafile backupset restore
channel ch1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to +DADOS/desenv/system01.dbf
restoring datafile 00002 to +DADOS/desenv/undotbs01.dbf
restoring datafile 00003 to +DADOS/desenv/sysaux01.dbf
restoring datafile 00004 to +DADOS/desenv/users01.dbf
restoring datafile 00005 to +DADOS/desenv/users02.dbf
channel ch1: reading from backup piece /tmp/backup_rman/desenv_database_full_20081009_667668315_13.rman
channel ch1: restored backup piece 1
piece handle=/tmp/backup_rman/desenv_database_full_20081009_667668315_13.rman tag=SIMPSON_DB_${DATA}
channel ch1: restore complete, elapsed time: 00:01:35
Finished restore at 11-OCT-08

datafile 1 switched to datafile copy
input datafile copy recid=6 stamp=667833588 filename=+DADOS/desenv/system01.dbf
datafile 2 switched to datafile copy
input datafile copy recid=7 stamp=667833588 filename=+DADOS/desenv/undotbs01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=8 stamp=667833588 filename=+DADOS/desenv/sysaux01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=9 stamp=667833589 filename=+DADOS/desenv/users01.dbf
datafile 5 switched to datafile copy
input datafile copy recid=10 stamp=667833589 filename=+DADOS/desenv/users02.dbf

released channel: ch1

released channel: ch2

released channel: ch3

RMAN>
RMAN>

Recovery Manager complete.

[1]+ Done nohup ./restore.sh
[oracle@rac1 backup_rman]$ ps -ef | grep smon
oracle 6070 1 0 09:29 ? 00:00:03 asm_smon_+ASM1
oracle 28235 1 0 13:17 ? 00:00:00 ora_smon_desenv1
oracle 30206 27416 2 13:22 pts/2 00:00:00 grep smon
[oracle@rac1 backup_rman]$ cd $ORACLE_HOME
[oracle@rac1 db_1]$ cd dbs/
[oracle@rac1 dbs]$ ls
lsab_+ASM1.dat arch1_3_667830618.dbf arch1_6_667830618.dbf hc_desenv1.dat initdesenv1.ora.bkp orapw+ASM1
arch1_1_667830618.dbf arch1_4_667830618.dbf arch1_7_667830618.dbf init+ASM1.ora initdw.ora orapwdesenv1
arch1_2_667830618.dbf arch1_5_667830618.dbf hc_+ASM1.dat initdesenv1.ora init.ora
[oracle@rac1 dbs]$ ls -ltr
total 8172
-rw-r----- 1 oracle oinstall 8385 Set 11 1998 init.ora
-rw-r--r-- 1 oracle oinstall 12920 Mai 3 2001 initdw.ora
-rw-r----- 1 oracle oinstall 1536 Set 6 16:10 orapw+ASM1
lrwxrwxrwx 1 oracle oinstall 41 Set 6 16:10 init+ASM1.ora -> /u01/app/oracle/admin/+ASM/pfile/init.ora
-rw-rw---- 1 oracle oinstall 1544 Set 6 16:11 hc_+ASM1.dat
-rw-rw---- 1 oracle oinstall 1544 Set 6 16:20 hc_desenv1.dat
-rw-r----- 1 oracle oinstall 1536 Set 6 19:06 orapwdesenv1
-rw-r----- 1 oracle oinstall 40 Set 6 19:40 initdesenv1.ora.bkp
-rw-r--r-- 1 oracle oinstall 1220 Set 6 22:14 initdesenv1.ora
-rw-rw---- 1 oracle oinstall 1591 Out 11 09:29 ab_+ASM1.dat
-rw-r----- 1 oracle oinstall 72704 Out 11 12:31 arch1_1_667830618.dbf
-rw-r----- 1 oracle oinstall 581632 Out 11 12:32 arch1_2_667830618.dbf
-rw-r----- 1 oracle oinstall 421888 Out 11 12:32 arch1_3_667830618.dbf
-rw-r----- 1 oracle oinstall 2545152 Out 11 12:33 arch1_4_667830618.dbf
-rw-r----- 1 oracle oinstall 4648448 Out 11 12:52 arch1_5_667830618.dbf
-rw-r----- 1 oracle oinstall 1024 Out 11 12:55 arch1_6_667830618.dbf
-rw-r----- 1 oracle oinstall 4096 Out 11 12:55 arch1_7_667830618.dbf
[oracle@rac1 dbs]$ vi initdesenv1.ora
[oracle@rac1 dbs]$ ssh rac2
Last login: Sat Oct 11 15:46:57 2008 from rac1.localdomain
[oracle@rac2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 15:58:08 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.

Total System Global Area 104857600 bytes
Fixed Size 1266032 bytes
Variable Size 67112592 bytes
Database Buffers 33554432 bytes
Redo Buffers 2924544 bytes
ORA-01618: redo thread 2 is not enabled - cannot mount


SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac2 ~]$ ssh rac1
Last login: Sat Oct 11 13:15:46 2008 from rac2.localdomain
s[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 13:25:29 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> recover database;
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done


SQL> select * from v$logfile;

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---
1 ONLINE
/u01/app/oracle/oradata/desenv/redo01.log
NO

2 ONLINE
/u01/app/oracle/oradata/desenv/redo02.log
NO

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---

3 STALE ONLINE
/u01/app/oracle/oradata/desenv/redo03.log
NO

4 STANDBY
/u01/app/oracle/oradata/desenv/redo04.log

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---
NO

5 STANDBY
/u01/app/oracle/oradata/desenv/redo05.log
NO

6 STANDBY

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---
/u01/app/oracle/oradata/desenv/redo06.log
NO


6 rows selected.

SQL> set linesize 1000
SQL> /

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---
1 ONLINE /u01/app/oracle/oradata/desenv/redo01.log NO
2 ONLINE /u01/app/oracle/oradata/desenv/redo02.log NO
3 STALE ONLINE /u01/app/oracle/oradata/desenv/redo03.log NO
4 STANDBY /u01/app/oracle/oradata/desenv/redo04.log NO
5 STANDBY /u01/app/oracle/oradata/desenv/redo05.log NO
6 STANDBY /u01/app/oracle/oradata/desenv/redo06.log NO

6 rows selected.

SQL> alter database drop logfile group 6;

Database altered.

SQL> alter database drop logfile group 5;

Database altered.

SQL> alter database drop logfile group 4;;
alter database drop logfile group 4;
*
ERROR at line 1:
ORA-00911: invalid character


SQL> alter database drop logfile group 4;

Database altered.

SQL> alter database drop logfile group 3;

Database altered.

SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---
1 ONLINE /u01/app/oracle/oradata/desenv/redo01.log NO
2 ONLINE /u01/app/oracle/oradata/desenv/redo02.log NO

SQL> ALTER DATABASE ADD LOGFILE GROUP 3 ('+DADOS/DESENV/ONLINELOG/redo03.log') SIZE 50M;
ALTER DATABASE ADD LOGFILE GROUP 3 ('+DADOS/DESENV/ONLINELOG/redo03.log') SIZE 50M
*
ERROR at line 1:
ORA-00301: error in adding log file '+DADOS/DESENV/ONLINELOG/redo03.log' - file cannot be created
ORA-17502: ksfdcre:4 Failed to create file +DADOS/DESENV/ONLINELOG/redo03.log
ORA-15005: name "DESENV/ONLINELOG/redo03.log" is already used by an existing alias


SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 13:28:13 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> ALTER DATABASE ADD LOGFILE GROUP 3 ('+DADOS/DESENV/ONLINELOG/redo03.log') SIZE 50M;

Database altered.

SQL> alter database drop logfile group 2;
alter database drop logfile group 2
*
ERROR at line 1:
ORA-01623: log 2 is current log for instance desenv1 (thread 1) - cannot drop
ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/desenv/redo02.log'


SQL> alter database drop logfile group 1;

Database altered.

SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '+DADOS/desenv/system01.dbf'


SQL> recover automatic database using backup controlfile until cancel;
ORA-00279: change 384509 generated at 10/09/2008 15:25:16 needed for thread 1
ORA-00289: suggestion :
/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_93_667156257.dbf
ORA-00280: change 384509 for thread 1 is in sequence #93
ORA-00278: log file
'/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_93_667156257.dbf' no longer
needed for this recovery
ORA-00308: cannot open archived log
'/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_93_667156257.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3


Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
SQL> alter database open resetlogs;

Database altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system checkpoint;

System altered.

SQL> alter database drop logfile group 2;
alter database drop logfile group 2
*
ERROR at line 1:
ORA-01567: dropping log 2 would leave less than 2 log files for instance
desenv1 (thread 1)
ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/desenv/redo02.log'


SQL> select * from v$logfile;

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---
2 ONLINE
/u01/app/oracle/oradata/desenv/redo02.log
NO

3 ONLINE
+DADOS/desenv/onlinelog/redo03.log
NO

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---


SQL> set linesize 1000
SQL> /

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---
2 ONLINE /u01/app/oracle/oradata/desenv/redo02.log NO
3 ONLINE +DADOS/desenv/onlinelog/redo03.log NO

SQL> ALTER DATABASE ADD LOGFILE GROUP 3 ('+DADOS/DESENV/ONLINELOG/redo03.log') SIZE 50M;
ALTER DATABASE ADD LOGFILE GROUP 3 ('+DADOS/DESENV/ONLINELOG/redo03.log') SIZE 50M
*
ERROR at line 1:
ORA-01184: logfile group 3 already exists


SQL> ALTER DATABASE ADD LOGFILE GROUP 2 ('+DADOS/DESENV/ONLINELOG/redo02.log') SIZE 50M;
ALTER DATABASE ADD LOGFILE GROUP 2 ('+DADOS/DESENV/ONLINELOG/redo02.log') SIZE 50M
*
ERROR at line 1:
ORA-01184: logfile group 2 already exists


SQL> ALTER DATABASE ADD LOGFILE GROUP 4 ('+DADOS/DESENV/ONLINELOG/redo04.log') SIZE 50M;

Database altered.

SQL>
SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---
2 ONLINE /u01/app/oracle/oradata/desenv/redo02.log NO
3 ONLINE +DADOS/desenv/onlinelog/redo03.log NO
4 ONLINE +DADOS/desenv/onlinelog/redo04.log NO

SQL> alter database drop logfile group 2;

Database altered.

SQL> ALTER DATABASE ADD LOGFILE GROUP 1 ('+DADOS/DESENV/ONLINELOG/redo01.log') SIZE 50M;


Database altered.

SQL> SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---
1 ONLINE +DADOS/desenv/onlinelog/redo01.log NO
3 ONLINE +DADOS/desenv/onlinelog/redo03.log NO
4 ONLINE +DADOS/desenv/onlinelog/redo04.log NO

SQL> alter database drop logfile group 4;

Database altered.

SQL> ALTER DATABASE ADD LOGFILE GROUP 2 ('+DADOS/DESENV/ONLINELOG/redo02.log') SIZE 50M;


Database altered.

SQL> SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---
1 ONLINE +DADOS/desenv/onlinelog/redo01.log NO
3 ONLINE +DADOS/desenv/onlinelog/redo03.log NO
2 ONLINE +DADOS/desenv/onlinelog/redo02.log NO

SQL> quit
cDisconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
le[oracle@rac1 ~]$ ssh rac2
Last login: Sat Oct 11 15:58:04 2008 from rac1.localdomain
[oracle@rac2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 16:09:01 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac2 ~]$ ps -ef | grep smon
oracle 2368 2299 0 16:09 pts/2 00:00:00 grep smon
oracle 6249 1 0 14:21 ? 00:00:01 asm_smon_+ASM2
oracle 30610 1 0 15:58 ? 00:00:00 ora_smon_desenv2
[oracle@rac2 ~]$ çsqlplus / as sysdba
-bash: çsqlplus: command not found
[oracle@rac2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 16:09:13 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> select * from v$logfile;
select * from v$logfile
*
ERROR at line 1:
ORA-01507: database not mounted


SQL> shutdown abort
ORACLE instance shut down.
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac2 ~]$ ssh rac1
Last login: Sat Oct 11 13:28:29 2008 from 192.168.2.1
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 13:37:59 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> select count(*) from marlon;

COUNT(*)
----------
294912

SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 ~]$ ssh rac2
Last login: Sat Oct 11 16:08:58 2008 from rac1.localdomain
[oracle@rac2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 16:09:48 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> quit
Disconnected
[oracle@rac2 ~]$ ssh rac2
Last login: Sat Oct 11 16:09:43 2008 from rac1.localdomain
[oracle@rac2 ~]$ ssh rac1
Last login: Sat Oct 11 13:37:55 2008 from rac2.localdomain
[oracle@rac1 ~]$ cd /u01/app/oracle/product/10.2.0/db_1/rdbms/admin/
[oracle@rac1 admin]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 13:38:52 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> @catclust.sql

Package created.


Package body created.


PL/SQL procedure successfully completed.


View created.


Synonym created.


Grant succeeded.


View created.


Grant succeeded.


Synonym created.


View created.


Grant succeeded.


Synonym created.


View created.


Grant succeeded.


Synonym created.


View created.


Grant succeeded.


Synonym created.


View created.


Grant succeeded.


Synonym created.


View created.


Grant succeeded.


Synonym created.


View created.


Grant succeeded.


Synonym created.


View created.


Grant succeeded.


View created.


Grant succeeded.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


Synonym created.


View created.


Grant succeeded.


Synonym created.


View created.


Grant succeeded.


Synonym created.


PL/SQL procedure successfully completed.

SQL>
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 admin]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 13:39:53 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+DADOS/desenv/system01.dbf
+DADOS/desenv/undotbs01.dbf
+DADOS/desenv/sysaux01.dbf
+DADOS/desenv/users01.dbf
+DADOS/desenv/users02.dbf

SQL> select * from v$logfile;

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---
1 ONLINE
+DADOS/desenv/onlinelog/redo01.log
NO

3 ONLINE
+DADOS/desenv/onlinelog/redo03.log
NO

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---

2 ONLINE
+DADOS/desenv/onlinelog/redo02.log
NO


SQL> set linesize 1000
SQL> /

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---
1 ONLINE +DADOS/desenv/onlinelog/redo01.log NO
3 ONLINE +DADOS/desenv/onlinelog/redo03.log NO
2 ONLINE +DADOS/desenv/onlinelog/redo02.log NO

SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 1 ('+DADOS/DESENV/ONLINELOG/redo01b.log');
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 1 ('+DADOS/DESENV/ONLINELOG/redo01b.log')
*
ERROR at line 1:
ORA-01184: logfile group 1 already exists


SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 4 ('+DADOS/DESENV/ONLINELOG/redo04.log');

Database altered.

SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 ('+DADOS/DESENV/ONLINELOG/redo05.log');
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 ('+DADOS/DESENV/ONLINELOG/redo05.log')
*
ERROR at line 1:
ORA-00301: error in adding log file '+DADOS/DESENV/ONLINELOG/redo05.log' - file cannot be created
ORA-17502: ksfdcre:3 Failed to create file +DADOS/DESENV/ONLINELOG/redo05.log
ORA-15173: entry 'redo05.log' does not exist in directory 'ONLINELOG'


SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---
1 ONLINE +DADOS/desenv/onlinelog/redo01.log NO
3 ONLINE +DADOS/desenv/onlinelog/redo03.log NO
2 ONLINE +DADOS/desenv/onlinelog/redo02.log NO
4 ONLINE +DADOS/desenv/onlinelog/redo04.log NO

SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 6 ('+DADOS/DESENV/ONLINELOG/redo06.log');
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 6 ('+DADOS/DESENV/ONLINELOG/redo06.log')
*
ERROR at line 1:
ORA-00301: error in adding log file '+DADOS/DESENV/ONLINELOG/redo06.log' - file cannot be created
ORA-17502: ksfdcre:3 Failed to create file +DADOS/DESENV/ONLINELOG/redo06.log
ORA-15173: entry 'redo06.log' does not exist in directory 'ONLINELOG'


SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 2 ('+DADOS/DESENV/ONLINELOG/redo05.log');
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 2 ('+DADOS/DESENV/ONLINELOG/redo05.log')
*
ERROR at line 1:
ORA-01184: logfile group 2 already exists


SQL> SELECT * FROM V$LOG ;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 0 52428800 1 YES UNUSED 0
2 1 0 52428800 1 YES UNUSED 0
3 1 2 52428800 1 NO CURRENT 384980 11-OCT-08
4 2 0 52428800 1 YES UNUSED 0

SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 ('+DADOS/DESENV/ONLINELOG/redo05.log');
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 ('+DADOS/DESENV/ONLINELOG/redo05.log')
*
ERROR at line 1:
ORA-00301: error in adding log file '+DADOS/DESENV/ONLINELOG/redo05.log' - file cannot be created
ORA-17502: ksfdcre:3 Failed to create file +DADOS/DESENV/ONLINELOG/redo05.log
ORA-15173: entry 'redo05.log' does not exist in directory 'ONLINELOG'


SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 4 ('+DADOS/DESENV/ONLINELOG/redo04.log');
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 4 ('+DADOS/DESENV/ONLINELOG/redo04.log')
*
ERROR at line 1:
ORA-01184: logfile group 4 already exists


SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 ('+DADOS/DESENV/ONLINELOG/redo05.log');
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 ('+DADOS/DESENV/ONLINELOG/redo05.log')
*
ERROR at line 1:
ORA-00301: error in adding log file '+DADOS/DESENV/ONLINELOG/redo05.log' - file cannot be created
ORA-17502: ksfdcre:3 Failed to create file +DADOS/DESENV/ONLINELOG/redo05.log
ORA-15173: entry 'redo05.log' does not exist in directory 'ONLINELOG'


SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 admin]$ export ORACLE_SID=+ASM1
[oracle@rac1 admin]$ asmcmd
ASMCMD> cd DADOS
ASMCMD> cd DESENV
ASMCMD> cd ONLINELOG
ASMCMD> ls
group_1.262.664744065
group_1.276.667834565
group_2.256.664744071
group_2.266.667834609
group_3.265.667834165
group_3.272.664745953
group_4.267.667834515
group_4.271.664745963
redo01.log
redo02.log
redo03.log
redo04.log
ASMCMD> pwd
+DADOS/DESENV/ONLINELOG
ASMCMD> quit
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
ASMCMD> exit
[oracle@rac1 admin]$ export ORACLE_SID=desenv1
[oracle@rac1 admin]$ ssh rac2
Last login: Sat Oct 11 16:09:55 2008 from rac2.localdomain
[oracle@rac2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 16:16:14 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.

Total System Global Area 104857600 bytes
Fixed Size 1266032 bytes
Variable Size 67112592 bytes
Database Buffers 33554432 bytes
Redo Buffers 2924544 bytes
ORA-01618: redo thread 2 is not enabled - cannot mount


SQL> shutdown immediate;
ORA-01507: database not mounted


ORACLE instance shut down.
SQL> qit
SP2-0042: unknown command "qit" - rest of line ignored.
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac2 ~]$ ssh rac1
Last login: Sat Oct 11 13:38:37 2008 from rac2.localdomain
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 13:47:21 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> set linesize 1000
SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---
1 ONLINE +DADOS/desenv/onlinelog/redo01.log NO
3 ONLINE +DADOS/desenv/onlinelog/redo03.log NO
2 ONLINE +DADOS/desenv/onlinelog/redo02.log NO
4 ONLINE +DADOS/desenv/onlinelog/redo04.log NO

SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 ('+DADOS/DESENV/ONLINELOG/redo07.log');
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 ('+DADOS/DESENV/ONLINELOG/redo07.log')
*
ERROR at line 1:
ORA-00301: error in adding log file '+DADOS/DESENV/ONLINELOG/redo07.log' - file cannot be created
ORA-17502: ksfdcre:3 Failed to create file +DADOS/DESENV/ONLINELOG/redo07.log
ORA-15173: entry 'redo07.log' does not exist in directory 'ONLINELOG'


SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 ~]$ export ORACLE_SID=+ASM1
[oracle@rac1 ~]$ asmcmd
ASMCMD> lsg
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
ASMCMD> lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED EXTERN N N 512 4096 1048576 12284 9784 0 9784 0 DADOS/
ASMCMD> cd DADOS
ASMCMD> ls
DESENV/
ASMCMD> cd DESENV
ASMCMD> LS
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfiledesenv.ora
sysaux01.dbf
system01.dbf
undotbs01.dbf
users01.dbf
users02.dbf
ASMCMD> cd ONLINELOG
ASMCMD> ls
group_1.262.664744065
group_1.276.667834565
group_2.256.664744071
group_2.266.667834609
group_3.265.667834165
group_3.272.664745953
group_4.267.667834515
group_4.271.664745963
redo01.log
redo02.log
redo03.log
redo04.log
ASMCMD> ls
group_1.262.664744065
group_1.276.667834565
group_2.256.664744071
group_2.266.667834609
group_3.265.667834165
group_3.272.664745953
group_4.267.667834515
group_4.271.664745963
redo01.log
redo02.log
redo03.log
redo04.log
ASMCMD> quit
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
ASMCMD> exit
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 13:51:28 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> select *

SQL>
SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 ~]$ export ORACLE_SID=desenv1
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 13:51:50 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> select * from v$logfile;

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---
1 ONLINE
+DADOS/desenv/onlinelog/redo01.log
NO

3 ONLINE
+DADOS/desenv/onlinelog/redo03.log
NO

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---

2 ONLINE
+DADOS/desenv/onlinelog/redo02.log
NO

4 ONLINE
+DADOS/desenv/onlinelog/redo04.log

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---
NO


SQL> set linesize 1000
SQL> /

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---
1 ONLINE +DADOS/desenv/onlinelog/redo01.log NO
3 ONLINE +DADOS/desenv/onlinelog/redo03.log NO
2 ONLINE +DADOS/desenv/onlinelog/redo02.log NO
4 ONLINE +DADOS/desenv/onlinelog/redo04.log NO

SQL> alter database drop logfile group 3;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01623: log 3 is current log for instance desenv1 (thread 1) - cannot drop
ORA-00312: online log 3 thread 1: '+DADOS/desenv/onlinelog/redo03.log'


SQL> alter system switch logfile;

System altered.

SQL> /

System altered.

SQL> alter database drop logfile group 3;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01624: log 3 needed for crash recovery of instance desenv1 (thread 1)
ORA-00312: online log 3 thread 1: '+DADOS/desenv/onlinelog/redo03.log'


SQL> select * from v$log;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 3 52428800 1 YES ACTIVE 390500 11-OCT-08
2 1 4 52428800 1 NO CURRENT 390502 11-OCT-08
3 1 2 52428800 1 YES ACTIVE 384980 11-OCT-08
4 2 0 52428800 1 YES UNUSED 0

SQL> alter database drop logfile group 2;
alter database drop logfile group 2
*
ERROR at line 1:
ORA-01623: log 2 is current log for instance desenv1 (thread 1) - cannot drop
ORA-00312: online log 2 thread 1: '+DADOS/desenv/onlinelog/redo02.log'


SQL>
alter system checkpoint;SQL>

System altered.

SQL> alter system switch logfile;

System altered.

SQL> alter database drop logfile group 3;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01623: log 3 is current log for instance desenv1 (thread 1) - cannot drop
ORA-00312: online log 3 thread 1: '+DADOS/desenv/onlinelog/redo03.log'


SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---
1 ONLINE +DADOS/desenv/onlinelog/redo01.log NO
3 ONLINE +DADOS/desenv/onlinelog/redo03.log NO
2 ONLINE +DADOS/desenv/onlinelog/redo02.log NO
4 ONLINE +DADOS/desenv/onlinelog/redo04.log NO

SQL> alteer database drop logfile group 4;
SP2-0734: unknown command beginning "alteer dat..." - rest of line ignored.
SQL> alter database drop logfile group 4;

Database altered.

SQL> alter database drop logfile group 3;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01623: log 3 is current log for instance desenv1 (thread 1) - cannot drop
ORA-00312: online log 3 thread 1: '+DADOS/desenv/onlinelog/redo03.log'


SQL> select * from v$log;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 3 52428800 1 YES INACTIVE 390500 11-OCT-08
2 1 4 52428800 1 YES INACTIVE 390502 11-OCT-08
3 1 5 52428800 1 NO CURRENT 390534 11-OCT-08

SQL> alter system checkpoint;

System altered.

SQL> alter database drop logfile group 3;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01623: log 3 is current log for instance desenv1 (thread 1) - cannot drop
ORA-00312: online log 3 thread 1: '+DADOS/desenv/onlinelog/redo03.log'


SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 ~]$ export ORACLE_SID=+ASM1
[oracle@rac1 ~]$ asmcmd
lASMCMD> ls
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
ASMCMD> lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED EXTERN N N 512 4096 1048576 12284 9784 0 9784 0 DADOS/
ASMCMD> cd DADOS
ASMCMD> LS
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
ASMCMD> ls
DESENV/
ASMCMD> cd DESENV
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfiledesenv.ora
sysaux01.dbf
system01.dbf
undotbs01.dbf
users01.dbf
users02.dbf
ASMCMD> cd ONLINELOG
ASMCMD> ls
group_1.262.664744065
group_1.276.667834565
group_2.256.664744071
group_2.266.667834609
group_3.265.667834165
group_3.272.664745953
group_4.267.667834515
group_4.271.664745963
redo01.log
redo02.log
redo03.log
redo04.log
ASMCMD> rm redo04.log
ASMCMD> lsdg
State Type Rebal Unbal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Name
MOUNTED EXTERN N N 512 4096 1048576 12284 9840 0 9840 0 DADOS/
ASMCMD> quit
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
ASMCMD> exit
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 13:56:13 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> alter database close;
alter database close
*
ERROR at line 1:
ORA-15000: command disallowed by current instance type


SQL> alter database close;
alter database close
*
ERROR at line 1:
ORA-15000: command disallowed by current instance type


SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 ~]$ export ORACLE_SID=desenv1
[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 13:56:34 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> alter database close;
alter database close
*
ERROR at line 1:
ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected


SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 104857600 bytes
Fixed Size 1266032 bytes
Variable Size 67112592 bytes
Database Buffers 33554432 bytes
Redo Buffers 2924544 bytes
Database mounted.
SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 4 ('+DADOS/DESENV/ONLINELOG/redo04.log') SIZE 50M;

Database altered.

SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 ('+DADOS/DESENV/ONLINELOG/redo07.log') SIZE 50M;

Database altered.

SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 ('+DADOS/DESENV/ONLINELOG/redo05.log') SIZE 50M;
ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 ('+DADOS/DESENV/ONLINELOG/redo05.log') SIZE 50M
*
ERROR at line 1:
ORA-01184: logfile group 5 already exists


SQL> select * from v$Logfile;

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---
1 ONLINE
+DADOS/desenv/onlinelog/redo01.log
NO

3 ONLINE
+DADOS/desenv/onlinelog/redo03.log
NO

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---

2 ONLINE
+DADOS/desenv/onlinelog/redo02.log
NO

4 ONLINE
+DADOS/desenv/onlinelog/redo04.log

GROUP# STATUS TYPE
---------- ------- -------
MEMBER
--------------------------------------------------------------------------------
IS_
---
NO

5 ONLINE
+DADOS/desenv/onlinelog/redo07.log
NO


SQL> set linesize 1000
SQL> /

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---
1 ONLINE +DADOS/desenv/onlinelog/redo01.log NO
3 ONLINE +DADOS/desenv/onlinelog/redo03.log NO
2 ONLINE +DADOS/desenv/onlinelog/redo02.log NO
4 ONLINE +DADOS/desenv/onlinelog/redo04.log NO
5 ONLINE +DADOS/desenv/onlinelog/redo07.log NO

SQL> alter database drop logfile group 5;

Database altered.

SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5 ('+DADOS/DESENV/ONLINELOG/redo05.log') SIZE 50M;

Database altered.

SQL> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 6 ('+DADOS/DESENV/ONLINELOG/redo06.log') SIZE 50M;

Database altered.

SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---
1 ONLINE +DADOS/desenv/onlinelog/redo01.log NO
3 ONLINE +DADOS/desenv/onlinelog/redo03.log NO
2 ONLINE +DADOS/desenv/onlinelog/redo02.log NO
4 ONLINE +DADOS/desenv/onlinelog/redo04.log NO
5 ONLINE +DADOS/desenv/onlinelog/redo05.log NO
6 ONLINE +DADOS/desenv/onlinelog/redo06.log NO

6 rows selected.

SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 ~]$ export ORACLE_SID=+ASM1
[oracle@rac1 ~]$ asmcmd
ASMCMD> cd DADOS
ASMCMD> CD DESENV
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
ASMCMD> cd DESENV
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
spfiledesenv.ora
sysaux01.dbf
system01.dbf
undotbs01.dbf
users01.dbf
users02.dbf
ASMCMD> cd ONLINELOG
ASMCMD> ls
group_1.262.664744065
group_1.276.667834565
group_2.256.664744071
group_2.266.667834609
group_3.265.667834165
group_3.272.664745953
group_4.267.667835871
group_4.271.664745963
group_5.277.667835881
group_5.278.667835923
group_6.279.667835933
redo01.log
redo02.log
redo03.log
redo04.log
redo05.log
redo06.log
redo07.log
ASMCMD> rm redo07.log
ASMCMD> quit
commands:
--------
cd
du
find
help
ls
lsct
lsdg
mkalias
mkdir
pwd
rm
rmalias
ASMCMD> exit
[oracle@rac1 ~]$ ssh rac2
Last login: Sat Oct 11 16:16:12 2008 from rac1.localdomain
[oracle@rac2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 16:28:41 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.

Total System Global Area 104857600 bytes
Fixed Size 1266032 bytes
Variable Size 67112592 bytes
Database Buffers 33554432 bytes
Redo Buffers 2924544 bytes
ORA-01618: redo thread 2 is not enabled - cannot mount

[oracle@rac2 ~]$ cd $ORACLE_HOME
[oracle@rac2 db_1]$ cd dbs/
[oracle@rac2 dbs]$ ls
ab_+ASM2.dat hc_+ASM2.dat hc_desenv2.dat init+ASM2.ora initdesenv2.ora initdesenv2.ora.bkp initdw.ora init.ora orapw+ASM2 orapwdesenv2
[oracle@rac2 dbs]$ ls -ltr
itotal 56
-rw-r----- 1 oracle oinstall 8385 Set 11 1998 init.ora
-rw-r--r-- 1 oracle oinstall 12920 Mai 3 2001 initdw.ora
-rw-r----- 1 oracle oinstall 1536 Set 6 16:10 orapw+ASM2
lrwxrwxrwx 1 oracle oinstall 41 Set 6 16:11 init+ASM2.ora -> /u01/app/oracle/admin/+ASM/pfile/init.ora
-rw-rw---- 1 oracle oinstall 1544 Set 6 16:11 hc_+ASM2.dat
-rw-r----- 1 oracle oinstall 1536 Set 6 19:06 orapwdesenv2
-rw-rw---- 1 oracle oinstall 1544 Set 6 19:27 hc_desenv2.dat
-rw-r----- 1 oracle oinstall 40 Set 6 19:40 initdesenv2.ora.bkp
-rw-r--r-- 1 oracle oinstall 1220 Set 6 22:26 initdesenv2.ora
-rw-rw---- 1 oracle oinstall 1591 Out 11 14:21 ab_+ASM2.dat
[oracle@rac2 dbs]$ vi initdesenv2.ora
[oracle@rac2 dbs]$ exit
logout
Connection to rac2 closed.
[oracle@rac1 ~]$ cd $ORACLE_HOME
[oracle@rac1 db_1]$ ls
assistants cfgtoollogs css diagnostics install.platform jdk lib mgw odbc oracore owm racg root.sh.old sqlplus wwg
bin clone ctx has inventory jlib log network olap oraInst.loc perl rdbms root.sh.old.1 srvm xdk
ccr config dbs hs javavm jre md nls OPatch ord plsql relnotes slax sysman
cdata crs demo install jdbc ldap mesg oc4j opmn oui precomp root.sh sqlj uix
[oracle@rac1 db_1]$ cd dbs/
[oracle@rac1 dbs]$ ls
ab_+ASM1.dat arch1_2_667830618.dbf arch1_3_667834297.dbf arch1_5_667830618.dbf hc_+ASM1.dat initdesenv1.ora init.ora
arch1_1_667830618.dbf arch1_2_667834297.dbf arch1_4_667830618.dbf arch1_6_667830618.dbf hc_desenv1.dat initdesenv1.ora.bkp orapw+ASM1
arch1_1_667834297.dbf arch1_3_667830618.dbf arch1_4_667834297.dbf arch1_7_667830618.dbf init+ASM1.ora initdw.ora orapwdesenv1
[oracle@rac1 dbs]$ ls -ltr
total 21148
-rw-r----- 1 oracle oinstall 8385 Set 11 1998 init.ora
-rw-r--r-- 1 oracle oinstall 12920 Mai 3 2001 initdw.ora
-rw-r----- 1 oracle oinstall 1536 Set 6 16:10 orapw+ASM1
lrwxrwxrwx 1 oracle oinstall 41 Set 6 16:10 init+ASM1.ora -> /u01/app/oracle/admin/+ASM/pfile/init.ora
-rw-rw---- 1 oracle oinstall 1544 Set 6 16:11 hc_+ASM1.dat
-rw-rw---- 1 oracle oinstall 1544 Set 6 16:20 hc_desenv1.dat
-rw-r----- 1 oracle oinstall 1536 Set 6 19:06 orapwdesenv1
-rw-r----- 1 oracle oinstall 40 Set 6 19:40 initdesenv1.ora.bkp
-rw-r--r-- 1 oracle oinstall 1220 Set 6 22:14 initdesenv1.ora
-rw-rw---- 1 oracle oinstall 1591 Out 11 09:29 ab_+ASM1.dat
-rw-r----- 1 oracle oinstall 72704 Out 11 12:31 arch1_1_667830618.dbf
-rw-r----- 1 oracle oinstall 581632 Out 11 12:32 arch1_2_667830618.dbf
-rw-r----- 1 oracle oinstall 421888 Out 11 12:32 arch1_3_667830618.dbf
-rw-r----- 1 oracle oinstall 2545152 Out 11 12:33 arch1_4_667830618.dbf
-rw-r----- 1 oracle oinstall 4648448 Out 11 12:52 arch1_5_667830618.dbf
-rw-r----- 1 oracle oinstall 1024 Out 11 12:55 arch1_6_667830618.dbf
-rw-r----- 1 oracle oinstall 4096 Out 11 12:55 arch1_7_667830618.dbf
-rw-r----- 1 oracle oinstall 257536 Out 11 13:33 arch1_1_667834297.dbf
-rw-r----- 1 oracle oinstall 12995584 Out 11 13:52 arch1_2_667834297.dbf
-rw-r----- 1 oracle oinstall 2048 Out 11 13:52 arch1_3_667834297.dbf
-rw-r----- 1 oracle oinstall 3072 Out 11 13:54 arch1_4_667834297.dbf
[oracle@rac1 dbs]$ vi initdesenv1.ora
[oracle@rac1 dbs]$ ssh rac2
Last login: Sat Oct 11 16:28:39 2008 from rac1.localdomain
[oracle@rac2 ~]$ exit
logout
Connection to rac2 closed.
[oracle@rac1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 14:01:41 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-15000: command disallowed by current instance type


SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 dbs]$ export
declare -x CLASSPATH="/u01/app/oracle/product/10.2.0/db_1/JRE:/u01/app/oracle/product/10.2.0/db_1/jlib:/u01/app/oracle/product/10.2.0/db_1/rdbms/jlib"
declare -x G_BROKEN_FILENAMES="1"
declare -x HISTSIZE="1000"
declare -x HOME="/home/oracle"
declare -x HOSTNAME="rac1.localdomain"
declare -x INPUTRC="/etc/inputrc"
declare -x KDEDIR="/usr"
declare -x LANG="pt_BR.UTF-8"
declare -x LD_LIBRARY_PATH="/u01/app/oracle/product/10.2.0/db_1/lib:/lib:/usr/lib"
declare -x LESSOPEN="|/usr/bin/lesspipe.sh %s"
declare -x LOGNAME="oracle"
declare -x LS_COLORS="no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:"
declare -x MAIL="/var/spool/mail/oracle"
declare -x OLDPWD="/u01/app/oracle/product/10.2.0/db_1"
declare -x ORACLE_BASE="/u01/app/oracle"
declare -x ORACLE_HOME="/u01/app/oracle/product/10.2.0/db_1"
declare -x ORACLE_SID="+ASM1"
declare -x ORACLE_TERM="xterm"
declare -x PATH="/u01/app/oracle/product/10.2.0/db_1/bin:/usr/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/u01/crs/oracle/product/10.2.0/crs/bin"
declare -x PWD="/u01/app/oracle/product/10.2.0/db_1/dbs"
declare -x SHELL="/bin/bash"
declare -x SHLVL="1"
declare -x SSH_ASKPASS="/usr/libexec/openssh/gnome-ssh-askpass"
declare -x SSH_CLIENT="::ffff:192.168.2.102 32895 22"
declare -x SSH_CONNECTION="::ffff:192.168.2.102 32895 ::ffff:192.168.2.101 22"
declare -x SSH_TTY="/dev/pts/6"
declare -x TERM="xterm"
declare -x TMP="/tmp"
declare -x TMPDIR="/tmp"
declare -x USER="oracle"
[oracle@rac1 dbs]$ export ORACLE_SID=desenv1
[oracle@rac1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 14:01:56 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> alter database open;

Database altered.

SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac1 dbs]$ ssh rac2
Last login: Sat Oct 11 16:30:31 2008 from rac1.localdomain
[oracle@rac2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sat Oct 11 16:31:25 2008

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> shutdown abort
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area 104857600 bytes
Fixed Size 1266032 bytes
Variable Size 67112592 bytes
Database Buffers 33554432 bytes
Redo Buffers 2924544 bytes
ORA-01618: redo thread 2 is not enabled - cannot mount


SQL> select * from v$logfile;
select * from v$logfile
*
ERROR at line 1:
ORA-01507: database not mounted


SQL> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@rac2 ~]$ ssh rac1
Last login: Sat Oct 11 13:47:19 2008 from rac2.localdomain
s[oracle@rac1 ~]$ sqlplus / a sysdba

SQL*Plus: Release 10.2.0.4.0 - Production

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Usage 1: sqlplus -H | -V

-H Displays the SQL*Plus version and the
usage help.
-V Displays the SQL*Plus version.

Usage 2: sqlplus [ [

Nenhum comentário:

Postar um comentário

 
Locations of visitors to this page