How to change the NoArchivelog mode to Archivelog mode in Oracle Database in standalone servers

   The contents are of my own testing and deployments. Not guaranteed that these might work in your environment. Please test before usage.


Summary: in this tutorial, you will learn how to change the Noarchivelog mode to archive log      mode,

Steps:

1)how to check the  archive log mode or not

2)how to perform this activity

3)switch the log manually


1)how to check the archive log mode or not?

Once All the online redo logs are filled it's transferred to the archive destination.


2)how to perform this activity?

SQL > select name,log_mode from v$database;

NAME LOG_MODE

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

LTITEST1 NOARCHIVELOG

SQL > archive log list

Database log mode No Archive Mode

Automatic archival Disbled

Archive destination /u01/backup

Oldest online log sequence 105586

Next log sequence to archive 66666

Current log sequence 66666


SQL> alter system set log_archive_dest_1='LOCATION=/u01/backup' scope=both;

System altered.

SQL>

SQL> shut immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.


SQL> startup mount;

ORACLE instance started.

Total System Global Area  713031680 bytes

Fixed Size                  2928488 bytes

Variable Size             570425496 bytes

Database Buffers          134217728 bytes

Redo Buffers                5459968 bytes

Database mounted.


SQL>  alter database archivelog;

Database altered.


SQL> alter database open;

Database altered.


3)switch the log manually:

SQL> alter system switch logfile;

System altered.


SQL> /

System altered.


SQL> archive log list

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            /u01/backup

Oldest online log sequence     20

Next log sequence to archive   22

Current log sequence           22


[oracle@ltitest ~]$ cd /u01/backup
[oracle@ltitest backup]$ ll
total 90508
-rw-r-----. 1 oracle oinstall 47579136 Mar  3 15:25 1_18_1129639064.dbf
-rw-r-----. 1 oracle oinstall 40493056 Mar  3 17:30 1_19_1129639064.dbf
-rw-r-----. 1 oracle oinstall  4602368 Mar  3 20:03 1_20_1129639064.dbf
-rw-r-----. 1 oracle oinstall     1024 Mar  3 20:03 1_21_1129639064.dbf
drwxr-xr-x. 2 oracle oinstall        6 Mar  3 14:26 arch
[oracle@ltitest backup]$ date
Fri Mar  3 20:04:10 IST 2023
[oracle@ltitest backup]$ pwd
/u01/backup
[oracle@ltitest backup]$

                                                    Thanks for your time!!

0 Comments

DELETE Statement in ORACLE DB— Step by Step Internal Flow with classroom example.

Imagine your Oracle database like a school, and you’re Teacher decides to remove a student (row) from the classroom(table). Let’s see how the journey works step by step: 1)Classroom = Oracle Table 2)Students = Rows (Records) 3)Class Teacher = Oracle Server Process 4)Attendance Register = Data Dictionary User fires DELETE statement: DELETE FROM students WHERE grade = 'D'; Internal Processing Steps: Client Process Sends DELETE Statement to Server Process The teacher receives a request to remove a student from the classroom. Syntax Check (Parsing) The teacher checks if the request is grammatically correct — proper command, keywords, and a semicolon. Semantic Check Teacher verifies if the classroom exists and whether the condition (like grade = 'D') makes sense. Object Resolution Teacher confirms that the ‘students’ classroom (table) exists in the school records (data dictionary). Optimization Decides the fastest way to find those students — by roll number, grade, or al...