DBA Hub

📋Steps in this guide1/2

how to change archivelog destination in oracle database DBACLASS

Steps for changing archivelog destination in both standalone and RAC database. It doesnt need any downtime. Can be done dynamically when database is up.

oracle configurationintermediate
by OracleDba
13 views
1

FOR STANDALONE DATABASE:

1. Find the current archivelog location: create the new archive location: change the destination: Check whether archives are getting generated at new location:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /dbaclass05/ORCLSIT2/Arch
Oldest online log sequence     25626
Next log sequence to archive   25628
Current log sequence           25628


SQL>  select destination,STATUS from v$archive_dest where statuS='VALID';

DESTINATION                    			    STATUS
----------------------------------                ---------
/dbaclass05/ORCLSIT2/Arch                             VALID

mkdir -p /dbaclass06/arch

SQL> alter system set log_archive_dest_1='LOCATION=/dbaclass06/arch' scope=both;

System altered.

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /dbaclass06/arch
Oldest online log sequence     25626
Next log sequence to archive   25628
Current log sequence           25628

SQL>  select destination,STATUS from v$archive_dest where statuS='VALID';

DESTINATION                    			    STATUS
----------------------------------                ---------
/dbaclass06/arch                                    VALID

SQL> alter system switch logfile;

System altered.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

$ cd /dbaclass06/arch
$ ls -ltr
total 11768
-rw-r----- 1 oracle oinstall 12049920 Mar 22 15:17 1_25628_929882536.dbf
2

For Real application cluster(RAC):

In RAC, the archive destination is pointed to an ASM diskgroup. Change the archive destination: Before pointing the path to new ASM DG, make sure that Diskgroup exists.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
SQL> show parameter log_archive_dest_1

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1                   string      LOCATION=+CRMARCH

-- Use sid='*', so that parameter will be changed across all the instance pfiles.

alter system set log_archive_dest_1='LOCATION=+FRA' scope=both sid='*'

System altered.


SQL> select destination,STATUS from v$archive_dest where statuS='VALID';

DESTINATION        STATUS
------------------ ---------
+CRMARCH           VALID

Comments (0)

Please to add comments

No comments yet. Be the first to comment!