Bu Blogda Ara

6 Aralık 2011 Salı

Unknow user password is changed to open from expire - dbms_metadata.get_ddl

If application user profile has PASSWORD_LIFE_TIME, application user password could be expired. If you don't know old password, you can reopen account like that:


SQL> set linesize 1000
SQL> create user user_pass identified by "password" ;
User created.
SQL> alter user user_pass PASSWORD  expire;
User altered.
SQL> select username,ACCOUNT_STATUS from dba_users where username='USER_PASS';
USERNAME                       ACCOUNT_STATUS
------------------------------ --------------------------------
USER_PASS                      EXPIRED
SQL> select dbms_metadata.get_ddl('USER', username) || ';' usercreate from dba_users where username='USER_PASS';
USERCREATE
--------------------------------------------------------------------------------
   CREATE USER "USER_PASS" IDENTIFIED BY VALUES 'S:1E268627E76ACBE2A0C750D4FF86C6685514BEE0656BABDA251615E2E9BD;FDFAC641632E49E9'
      DEFAULT TABLESPACE "USERS"
      TEMPORARY TABLESPACE "TEMP"
      PASSWORD EXPIRE;
SQL> ALTER USER "USER_PASS" IDENTIFIED BY VALUES 'S:1E268627E76ACBE2A0C750D4FF86C6685514BEE0656BABDA251615E2E9BD;FDFAC641632E49E9';
User altered.
SQL> select username,ACCOUNT_STATUS from dba_users where username='USER_PASS';
USERNAME                       ACCOUNT_STATUS
------------------------------ --------------------------------
USER_PASS                      OPEN

5 Aralık 2011 Pazartesi

Truncate table drop all storage - New feature 11.2

Truncate process reduce to initial value from table size before 11.2 versiyon.
New feature of truncate is drop all storage. This sytax reduce to zero from size table.


#Only truncate process:

-------------------------------------------------------------------------------------------------------------------
SQL*Plus: Release 11.2.0.2.0 Production on Mon Dec 5 16:17:19 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> set linesize 1000
SQL> create table muratk_dba.truncate_table as select * from scott.emp;
Table created.
SQL> select sum(bytes)/1024/1024 from dba_segments where segment_name ='TRUNCATE_TABLE';
SUM(BYTES)/1024/1024
--------------------
               .0625
SQL> truncate table muratk_dba.truncate_table;
Table truncated.
SQL> select sum(bytes)/1024/1024 from dba_segments where segment_name ='TRUNCATE_TABLE';
SUM(BYTES)/1024/1024
--------------------
               .0625

# Truncate process with drop all storage feature
-------------------------------------------------------------------------------------------------------------------------------
SQL> drop table muratk_dba.truncate_table purge;
Table dropped.
SQL> create table muratk_dba.truncate_table as select * from scott.emp;
Table created.
SQL> select sum(bytes)/1024/1024 from dba_segments where segment_name ='TRUNCATE_TABLE';
SUM(BYTES)/1024/1024
--------------------
               .0625
SQL> truncate table muratk_dba.truncate_table  drop all storage;
Table truncated.
SQL> select sum(bytes)/1024/1024 from dba_segments where segment_name ='TRUNCATE_TABLE';
SUM(BYTES)/1024/1024
--------------------

SQL> drop table muratk_dba.truncate_table purge;
Table dropped.

2 Aralık 2011 Cuma

Privileges of deployment user

If you have deployment user, after this user creates new table, you have DML procesess in new table. Create role for deployment user, grant privileges to this role because deployment user may not grant/revoke  to/from yourself.

For Example:
oracle@dbatest> sqlplus / as sysdba
SQL> create user kapsul identified by kapsul;
User created.
SQL> grant connect,resource to kapsul;
Grant succeeded.
SQL> GRANT GRANT ANY OBJECT PRIVILEGE TO KAPSUL;
Grant succeeded.
SQL> grant CREATE ANY TABLE to kapsul;
Grant succeeded.
SQL> create role role_kapsul;
Role created.
SQL> grant role_kapsul to kapsul;
Grant succeeded.

----------------------------

oracle@dbatest> sqlplus kapsul/kapsul
SQL> create table scott.kapsul_table (sayi number);
Table created.

SQL> insert into scott.kapsul_table sayi values (3);
insert into scott.kapsul_table sayi values (3)
ERROR at line 1:
ORA-01031: insufficient privileges

SQL> grant insert,update,select,delete on scott.kapsul_table to kapsul;
grant insert,update,select,delete on scott.kapsul_table to kapsul
ERROR at line 1:
ORA-01749: you may not GRANT/REVOKE privileges to/from yourself

SQL> grant insert,update,select,delete on scott.kapsul_table to role_kapsul;
Grant succeeded.
SQL> insert into scott.kapsul_table sayi values (3);
1 row created.
SQL> commit;
Commit complete.

23 Kasım 2011 Çarşamba

no-decrypt oracle user

If you don't want to lock user account in oracle database and nobody knows, gets, cracked password of user, you can use this command
SQL> alter user <username>identified by values 'no-decrypt';

For example:
#sqlplus / as sysdba
SQL>  create user passtest identified by passtest;
User created.
SQL> grant connect to passtest;
Grant succeeded.
#sqlplus passtest/passtest
SQL*Plus: Release 11.2.0.2.0 Production on Wed Nov 23 13:55:10 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.


#sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Wed Nov 23 13:58:06 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter user passtest identified by values 'no-decrypt';
User altered.


#sqlplus passtest/passtest
SQL*Plus: Release 11.2.0.2.0 Production on Wed Nov 23 13:59:08 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
ERROR:
ORA-01017: geçersiz kullanıcı adı/parolası; oturum açma reddedildi

21 Kasım 2011 Pazartesi

Avoiding ORA-01555 errors in Oracle Active Dataguard

Queries on the standby database rely on undo generated on the primary to rollback uncommitted changes. The undo_retention period set at the primary will determine how soon undo can be overwritten and thus will also determine the length of the timing window that a standby query may avoid running into an ORA-01555 error. The occurrence of ORA-01555 is rare when the active standby is operating in realtime apply mode, because the standby recovery will keep pace with the primary.

An ORA-01555 is more likely to be encountered if real-time apply is not enabled, or in situations where a network disconnect or standby outage has resulted an archive log gap. In these cases the elapsed time to complete a redo log file at the primary database can be longer than the time spent by recovery to apply it to the standby database. Lets use as an example the case where it takes the primary 10
minutes to generate 1000MB of redo and takes a standby only 30 seconds to apply (33MB/sec apply rate). If the undo_retention on the primary is set to 10 minutes, the standby has effectively reduced the retention period to 30 seconds for the standby query workload.  If a standby query runs for more than 30 seconds, it is
likely to run into the ORA-01555 error because recovery has already applied more redo that overwrites the rollback segment. If active standby queries experience ORA-01555 errors, first make sure the standby is in real-time apply mode, and if so, also increase the undo_retention period on the primary database

Resetting/Unsetting parameters in oracle database

You can reset  parameter to default. For example, you set parameter sid wrongly when you config db. Then you can reset it with this command.

SQL> alter system set fast_start_mttr_target=1200 scope=spfile sid='wrong_sid';
System altered.
-- You will see "wrong_sid.fast_start_mttr_target=1200" in pfile.

SQL> alter system reset fast_start_mttr_target scope=spfile sid='wrong_sid';
System altered.
-- Cleaned wrong parameter in parameter file.

17 Kasım 2011 Perşembe

Output of sql is different about cursor_sharing between exact and force

DB Version: Oracle 11.2.0.2.0
OS: Linux
Problem:
If cursor_sharing parameter is FORCE and there are function based index, you would get wrong output your SQL. For example:

SQL>CREATE INDEX owner.index_name ("sdate" DESC);
SQL>@script.sql


 Process   sdate
--------- -----------
  9630571 


SQL>Drop INDEX owner.index_name;
SQL>@script.sql


 Process   sdate
--------- -----------
  9630571 11/2/2011


Solutions:
--You can set  cursor_sharing to EXACT. But you should test in test db about all problem. This parameter is so effective in database.
SQL> show parameter cursor_sharing
NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
cursor_sharing string FORCE


SQL> alter system set cursor_sharing=EXACT scope=both sid='*';

-- You couldn't set cursor_sharing to EXACT. download and apply patch for Bug 10259620 and test

15 Kasım 2011 Salı

ORA-01008: not all variables bound- RMAN-03014

RMAN tool'unda ORA-01008 hatasını alarak denk geldiğim bug'ı paylaşmak istedim.

I got  ORA-01008 error with RMAN tool. It is oracle bug. I want to share.
DB version 11.2.0.2, cursor_sharing=FORCE

DBGSQL: TARGET> select nvl(max(al.recid), '0'),nvl(max(al.recid), 0) into :txtparmvalue, :parmvalue from v$archived_log al where al.status in ('X', 'A') and al.is_recovery_dest_file = 'YES' and al.creator = 'RMAN'
DBGSQL: sqlcode = 1008
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 11/02/2011 23:52:15
RMAN-03014: implicit resync of recovery catalog failed
ORA-01008: not all variables bound

For Solution:

  • Flush shared pool  . It is temporary solution.         -- alter system flush shared_pool;
  • Set cursor_sharing to EXACT                              -- alter system set cursor_sharing=EXACT scope=both sid='*';
  • Apply patch. (Patch 9877980)

6 Ekim 2011 Perşembe

Oracle - ASM disklerinin Head Bilgisini Okumak

kfed, ASM disk head'lerini okumak için kullanılan tool'dur. Tool'un kullanıma uygun olup olmadığı aşağıdaki gibi kontrol edilebilir. root ile bağlanılıp, ORACLE_HOME ve PATH değerleri ayarlanır.
$ ls -l $ORACLE_HOME/bin/kfed
-rwxr-x--x 1 oracle dba 2374262 Jul  4 18:12 /oracle/product/11.2.0/db/bin/kfed

Eğer Executable yoksa, aşağıdaki gibi relink edilerek kullanıma uygun hale getirilir.
1)  $ORACLE_HOME/rdbms/lib klasörüne gidilir:
$ cd $ORACLE_HOME/rdbms/lib
2) Executable yaratılır:
$ make -f ins_rdbms.mk ikfed
3) kfed, $ORACLE_HOME/bin altında yaratıldığı kontrol edilir.
$ ls -l $ORACLE_HOME/bin/kfed

kfed tool'unu kullanarak, disk head bilgileri elde edilir.
kfbh.type, parametresinin KFBTYP_DISKHEAD olmasından ASM disk olduğunu anlıyoruz. ASM diski olmasaydı KFBTYP_INVALID değerini verecektir. kfdhdb.dskname ve kfdhdb.grpname parametreleri ile disk ve group ismine ulaşarabiliriz.
$ kfed read /dev/sdb1
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                            1 ; 0x002: KFBTYP_DISKHEAD
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       0 ; 0x004: T=0 NUMB=0x0
kfbh.block.obj:              2147483648 ; 0x008: TYPE=0x8 NUMB=0x0
kfbh.check:                  2028481114 ; 0x00c: 0x78e82a5a
kfbh.fcn.base:                        0 ; 0x010: 0x00000000
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kfdhdb.driver.provstr:         ORCLDISK ; 0x000: length=8
kfdhdb.driver.reserved[0]:            0 ; 0x008: 0x00000000
kfdhdb.driver.reserved[1]:            0 ; 0x00c: 0x00000000
kfdhdb.driver.reserved[2]:            0 ; 0x010: 0x00000000
kfdhdb.driver.reserved[3]:            0 ; 0x014: 0x00000000
kfdhdb.driver.reserved[4]:            0 ; 0x018: 0x00000000
kfdhdb.driver.reserved[5]:            0 ; 0x01c: 0x00000000
kfdhdb.compat:                186646528 ; 0x020: 0x0b200000
kfdhdb.dsknum:                        0 ; 0x024: 0x0000
kfdhdb.grptyp:                        1 ; 0x026: KFDGTP_EXTERNAL
kfdhdb.hdrsts:                        3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname:                   DISK1 ; 0x028: length=5
kfdhdb.grpname:                    DATA ; 0x048: length=4
kfdhdb.fgname:                    DISK1 ; 0x068: length=5
kfdhdb.capname:                         ; 0x088: length=0
kfdhdb.crestmp.hi:             32957265 ; 0x0a8: HOUR=0x11 DAYS=0x1a MNTH=0x8 YEAR=0x7db
kfdhdb.crestmp.lo:           2866168832 ; 0x0ac: USEC=0x0 MSEC=0x191 SECS=0x2d MINS=0x2a
kfdhdb.mntstmp.hi:             32957265 ; 0x0b0: HOUR=0x11 DAYS=0x1a MNTH=0x8 YEAR=0x7db
kfdhdb.mntstmp.lo:           2893556736 ; 0x0b4: USEC=0x0 MSEC=0x20b SECS=0x7 MINS=0x2b
kfdhdb.secsize:                     512 ; 0x0b8: 0x0200
kfdhdb.blksize:                    4096 ; 0x0ba: 0x1000
kfdhdb.ausize:                  1048576 ; 0x0bc: 0x00100000
kfdhdb.mfact:                    113792 ; 0x0c0: 0x0001bc80
kfdhdb.dsksize:                  409594 ; 0x0c4: 0x00063ffa
kfdhdb.pmcnt:                         5 ; 0x0c8: 0x00000005
kfdhdb.fstlocn:                       1 ; 0x0cc: 0x00000001
kfdhdb.altlocn:                       2 ; 0x0d0: 0x00000002
kfdhdb.f1b1locn:                      2 ; 0x0d4: 0x00000002
kfdhdb.redomirrors[0]:                0 ; 0x0d8: 0x0000
kfdhdb.redomirrors[1]:                0 ; 0x0da: 0x0000
kfdhdb.redomirrors[2]:                0 ; 0x0dc: 0x0000
kfdhdb.redomirrors[3]:                0 ; 0x0de: 0x0000
kfdhdb.dbcompat:              168820736 ; 0x0e0: 0x0a100000
kfdhdb.grpstmp.hi:             32957265 ; 0x0e4: HOUR=0x11 DAYS=0x1a MNTH=0x8 YEAR=0x7db
kfdhdb.grpstmp.lo:           2866018304 ; 0x0e8: USEC=0x0 MSEC=0xfe SECS=0x2d MINS=0x2a
kfdhdb.vfstart:                       0 ; 0x0ec: 0x00000000
kfdhdb.vfend:                         0 ; 0x0f0: 0x00000000
kfdhdb.spfile:                       58 ; 0x0f4: 0x0000003a
kfdhdb.spfflg:                        1 ; 0x0f8: 0x00000001
kfdhdb.ub4spare[0]:                   0 ; 0x0fc: 0x00000000
kfdhdb.ub4spare[1]:                   0 ; 0x100: 0x00000000
kfdhdb.ub4spare[2]:                   0 ; 0x104: 0x00000000
kfdhdb.ub4spare[3]:                   0 ; 0x108: 0x00000000
kfdhdb.ub4spare[4]:                   0 ; 0x10c: 0x00000000
kfdhdb.ub4spare[5]:                   0 ; 0x110: 0x00000000
kfdhdb.ub4spare[6]:                   0 ; 0x114: 0x00000000
kfdhdb.ub4spare[7]:                   0 ; 0x118: 0x00000000
kfdhdb.ub4spare[8]:                   0 ; 0x11c: 0x00000000
kfdhdb.ub4spare[9]:                   0 ; 0x120: 0x00000000
kfdhdb.ub4spare[10]:                  0 ; 0x124: 0x00000000
kfdhdb.ub4spare[11]:                  0 ; 0x128: 0x00000000
kfdhdb.ub4spare[12]:                  0 ; 0x12c: 0x00000000
kfdhdb.ub4spare[13]:                  0 ; 0x130: 0x00000000
kfdhdb.ub4spare[14]:                  0 ; 0x134: 0x00000000
kfdhdb.ub4spare[15]:                  0 ; 0x138: 0x00000000
kfdhdb.ub4spare[16]:                  0 ; 0x13c: 0x00000000
kfdhdb.ub4spare[17]:                  0 ; 0x140: 0x00000000
kfdhdb.ub4spare[18]:                  0 ; 0x144: 0x00000000
kfdhdb.ub4spare[19]:                  0 ; 0x148: 0x00000000
kfdhdb.ub4spare[20]:                  0 ; 0x14c: 0x00000000
kfdhdb.ub4spare[21]:                  0 ; 0x150: 0x00000000
kfdhdb.ub4spare[22]:                  0 ; 0x154: 0x00000000
kfdhdb.ub4spare[23]:                  0 ; 0x158: 0x00000000
kfdhdb.ub4spare[24]:                  0 ; 0x15c: 0x00000000
kfdhdb.ub4spare[25]:                  0 ; 0x160: 0x00000000
kfdhdb.ub4spare[26]:                  0 ; 0x164: 0x00000000
kfdhdb.ub4spare[27]:                  0 ; 0x168: 0x00000000
kfdhdb.ub4spare[28]:                  0 ; 0x16c: 0x00000000
kfdhdb.ub4spare[29]:                  0 ; 0x170: 0x00000000
kfdhdb.ub4spare[30]:                  0 ; 0x174: 0x00000000
kfdhdb.ub4spare[31]:                  0 ; 0x178: 0x00000000
kfdhdb.ub4spare[32]:                  0 ; 0x17c: 0x00000000
kfdhdb.ub4spare[33]:                  0 ; 0x180: 0x00000000
kfdhdb.ub4spare[34]:                  0 ; 0x184: 0x00000000
kfdhdb.ub4spare[35]:                  0 ; 0x188: 0x00000000
kfdhdb.ub4spare[36]:                  0 ; 0x18c: 0x00000000
kfdhdb.ub4spare[37]:                  0 ; 0x190: 0x00000000
kfdhdb.ub4spare[38]:                  0 ; 0x194: 0x00000000
kfdhdb.ub4spare[39]:                  0 ; 0x198: 0x00000000
kfdhdb.ub4spare[40]:                  0 ; 0x19c: 0x00000000
kfdhdb.ub4spare[41]:                  0 ; 0x1a0: 0x00000000
kfdhdb.ub4spare[42]:                  0 ; 0x1a4: 0x00000000
kfdhdb.ub4spare[43]:                  0 ; 0x1a8: 0x00000000
kfdhdb.ub4spare[44]:                  0 ; 0x1ac: 0x00000000
kfdhdb.ub4spare[45]:                  0 ; 0x1b0: 0x00000000
kfdhdb.ub4spare[46]:                  0 ; 0x1b4: 0x00000000
kfdhdb.ub4spare[47]:                  0 ; 0x1b8: 0x00000000
kfdhdb.ub4spare[48]:                  0 ; 0x1bc: 0x00000000
kfdhdb.ub4spare[49]:                  0 ; 0x1c0: 0x00000000
kfdhdb.ub4spare[50]:                  0 ; 0x1c4: 0x00000000
kfdhdb.ub4spare[51]:                  0 ; 0x1c8: 0x00000000
kfdhdb.ub4spare[52]:                  0 ; 0x1cc: 0x00000000
kfdhdb.ub4spare[53]:                  0 ; 0x1d0: 0x00000000
kfdhdb.acdb.aba.seq:                  0 ; 0x1d4: 0x00000000
kfdhdb.acdb.aba.blk:                  0 ; 0x1d8: 0x00000000
kfdhdb.acdb.ents:                     0 ; 0x1dc: 0x0000
kfdhdb.acdb.ub2spare:                 0 ; 0x1de: 0x0000

4 Ekim 2011 Salı

Oracle - Tablonun başlangıç boyutunun değiştirilmesi (INITIAL RESIZE)

Bazen tablo truncate edilmesine rağmen boyutu hala yüksektir. Tablonun boyutu, truncate işlemi ile tablonun initial değerine dönecektir. Tablonun initial değerini değiştirmek için aşağıdaki yöntem kullanılabilir.
  • Tablo Alter edilerek başka tablespace’e taşınır.
ALTER TABLE MY_TABLE MOVE TABLESPACE ANOTHER_TABLESPLACE STORAGE (INITIAL 2M NEXT 2M PCTINCREASE 0);
  • INITIAL parametresi değiştirilerek tekrar orjinal tablespace’ine geri taşınır.
ALTER TABLE MY_TABLE MOVE TABLESPACE ORIGINAL_TABLESPACE STORAGE (INITIAL 256M NEXT 2M PCTINCREASE 0);
  • Böylelikle drop ve recreate etmeye gerek yoktur.

3 Ekim 2011 Pazartesi

Oracle - Oracle 11gR1 versiyonu SEC_CASE_SENSITIVE_LOGON özelliği

SEC_CASE_SENSITIVE_LOGON parametresi "true" olursa veritabanı kullanıcı şifreleri büyük, küçük harfe duyarlı olur.
alter system set sec_case_sensitive_logon=true scope=both sid='*';


SEC_CASE_SENSITIVE_LOGON parametresi "false" olursa veritabanı kullanıcı şifreleri büyük, küçük harf farketmez.
alter system set sec_case_sensitive_logon=false scope=both sid='*';


Veritabanı kurulurken; “Keep the enhanced 11g default secutiry settings” seçilirse, bu değer default olarak true gelecektir.

Insesitive password file yaratırken ignorecase=y seçeneği kullanılabilir.
$ orapwd file=orapwDB11Gb entries=5 ignorecase=y password=mypassword

Oracle - Session bazlı Temp tablespace kullanımı

  SELECT   b.tablespace,
           b.segfile#,
           b.segblk#,
           ROUND ( ( (b.blocks * p.VALUE) / 1024 / 1024), 2) size_mb,
           a.sid,
           a.serial#,
           a.username,
           a.osuser,
           a.program,
           a.status,
           b.sql_id
    FROM   v$session a,
           v$sort_usage b,
           v$process c,
           v$parameter p
   WHERE       p.name = 'db_block_size'
           AND a.saddr = b.session_addr
           AND a.paddr = c.addr
ORDER BY   size_mb DESC;

Oracle - 11gR1 versiyonu ile gelen rman özellikleri

  • Hataları listeler

rman>list failure;

  • Çözüm önerilerini gösterir.

rman>advise failure;

  • Çözüm script'ini gösterir.

rman>repair failure preview;

  • Çözüm script'ini uygular.

rman>repair failure noprompt;

Oracle - Undo Tablespace'ini kullanarak objelerin ve tablonun eski halinin elde edilmesi

  • Undo tablespace'in ilgili kayıtlar silinmediyse tablonun eski tarihli görünümüne bakılabilir. Bu özellik için flashback'in açık olmasına gerek yoktur.

select * from <tablo_ismi>  as of timestamp to_timestamp('2010-10-05 16:45:00','yyyy-mm-dd hh24:mi:ss')

  • Aşağıdaki select ile objenin eski tarihli kaynak kodu elde edilebilir. Bu özellik için flashback'in açık olmasına gerek yoktur.

select * from dba_source as of timestamp to_timestamp('2011-10-03 08:45:00','yyyy-mm-dd hh24:mi:ss') where name='<Obje_ismi>';

Oracle - Oracle RAC veritabanının archivemod'a alınması

  • Veritabanı exclusive modda çekilir.

sqlplus / as sysdba
SQL>alter system set cluster_database=false scope=spfile ;

  • Veritabanı kapatılır.

$ srvctl stop database -d <veritabanı ismi>

  • Node'lardan sadece bir tanesi açılarak archivelog modu devreye alınır. Sonra açılan node kapatılarak, exclusive modda çıkartılır.

$ sqlplus / as sysdba
SQL> startup mount
SQL> alter database archivelog;
SQL> alter system set cluster_database=true scope=spfile ;
SQL> shutdown immediate

  • Veritabanı ve servisler tekrar başlatılır.

$ srvctl start database -d <veritabanı ismi>
$ srvctl start service -d <service ismi>

  • Aşağıdaki komut ile modu kontrol edilebilir.

$ sqlplus / as sysdba
SQL> archive log list