On standby side, you may encountered the Error “ORA-19527: physical standby redo log must be renamed” in the alert log.
ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 10 thread 1: '/u01/oradata/dev12c/std_redo03.log'
Though this didn’t stop the data guard replication, we need to get rid of this error message. It seems to be false alarm in DR alert log.
Solution: If there is no difference in the directory structure in Primary and standby, you can get rid of this message by modifying the log_file_name_convert parameter to a dummy Value
ALTER SYSTEM SET log_file_name_convert='dummy','dummy';
After the parameter was set, the ORA message was no longer seen in the alert.log
Reference: ORA-19527: Physical Standby Redo Log Must Be Renamed…during switchover (Doc ID 2194825.1)
While starting a container database or mounting a standby container database you may encountered Error: ORA-65093: multitenant container database not set up properly
RMAN-11003: failure during parse/execution of SQL statement: alter database mount standby database
ORA-65093: multitenant container database not set up properly
Solution is add the parameter enable_pluggable_database=true and restart the instance,
In this article we will describe the step by step instructions on how to enable flashback on Oracle 12c database
Enable ARCHIVELOG mode:
SQL> select log_mode from v$database;
LOG_MODE
------------
NOARCHIVELOG
If the database is in NOARCHIVELOG mode, Enable it
alter system set log_archive_dest_1='LOCATION=/u01/app/oracle/arch';
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
Check the Database ARCHIVELOG status
SQL> select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG
2. Set the DB_RECOVERY_FILE_DEST_SIZE and DB_RECOVERY_FILE_DEST
alter system set DB_RECOVERY_FILE_DEST_SIZE=10G;
alter system set DB_RECOVERY_FILE_DEST='/u01/app/oracle/fra';
3. Enable FLASHBACK database
ALTER DATABASE FLASHBACK ON;
4. Check the FLASHBACK database status
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
YES
You might encounter ORA-19802 error while setting DB_RECOVERY_FILE_DEST
Error:
SQL> alter system set db_recovery_file_dest='/u01/app/oracle/fra';
alter system set db_recovery_file_dest='/u01/app/oracle/fra'
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-19802: cannot use DB_RECOVERY_FILE_DEST without DB_RECOVERY_FILE_DEST_SIZE
Solution:
First set the DB_RECOVERY_FILE_DEST_SIZE parameter, then set the DB_RECOVERY_FILE_DEST
SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE=10G;
System altered.
SQL> alter system set DB_RECOVERY_FILE_DEST='/u01/app/oracle/fra';
System altered.
You might encounter ORA-16179 error during updating the archive log destination.
Error Details:
SQL> alter system set log_archive_dest_1='/u01/app/oracle/arch';
alter system set log_archive_dest_1='/u01/app/oracle/arch'
*
ERROR at line 1:
ORA-32017: failure in updating SPFILE
ORA-16179: incremental changes to "log_archive_dest_1" not allowed with SPFILE
Solution:
SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/oracle/arch';
System altered.
In this post I will describe in step by step how to Migrate Oracle ASM Diskgroups to another Storage in Online mode without downtime.
In my Case here I am migrating all 3 data disks (DISK01, DISK02, DISK03) to new storage:
NAME PATH TOTAL_MB
------------------------------ -------------------- ----------
DISK01 ORCL:DISK01 20000 --> OLD
DISK02 ORCL:DISK02 20001 --> OLD
DISK03 ORCL:DISK03 10001 --> OLD
DISKNEW01 ORCL:DISKNEW01 20479 --> NEW
DISKNEW02 ORCL:DISKNEW02 20479 --> NEW
DISKNEW03 ORCL:DISKNEW03 10239 --> NEW
1. Backup the database using RMAN and validate the Backups
Take an RMAN backups and validate the backups
2. Add storage luns to database nodes and Partition the disks
In my case 3 disks are added.
/dev/sdc - 20G
/dev/sdd - 20G
/dev/sde- 10G
Partition the disks
fdisk /dev/sdc
fdisk /dev/sdd
fdisk /dev/sde
Sample output:
[root@oracle01 tmp]# fdisk /dev/sdd1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x28cbe8a9.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-51200, default 1): 1
Last cylinder, +cylinders or +size{K,M,G} (1-51200, default 51200): +20000M
Connect to grid user and connect sqlplus as /as sysasm
su - grid
sqlplus / as sysasm
Alter the diskgroup to add new disks and wait until the rebalace operation is completed
alter diskgroup DATA add disk
'ORCL:DISKNEW01',
'ORCL:DISKNEW02',
'ORCL:DISKNEW03' rebalance power 11;
Output:
SQL> alter diskgroup DATA add disk
'ORCL:DISKNEW01',
'ORCL:DISKNEW02',
'ORCL:DISKNEW03' rebalance power 11; 2 3 4
Diskgroup altered.
Query to check the rebalance operation:
select * from v$asm_operation;
select * from gv$asm_operation;
verify the newly added disks
SQL> select name,path, total_mb, state, mount_status, header_status from v$asm_disk;
NAME PATH TOTAL_MB STATE MOUNT_S HEADER_STATU
------------------------------ -------------------- ---------- -------- ------- ------------
DISK01 ORCL:DISK01 20000 NORMAL CACHED MEMBER
DISK02 ORCL:DISK02 20001 NORMAL CACHED MEMBER
DISK03 ORCL:DISK03 10001 NORMAL CACHED MEMBER
DISKNEW01 ORCL:DISKNEW01 20479 NORMAL CACHED MEMBER
DISKNEW02 ORCL:DISKNEW02 20479 NORMAL CACHED MEMBER
DISKNEW03 ORCL:DISKNEW03 10239 NORMAL CACHED MEMBER
6 rows selected.
SQL> select name, total_mb, state, type from v$asm_diskgroup;
NAME TOTAL_MB STATE TYPE
------------------------------ ---------- ----------- ------
DATA 101199 MOUNTED EXTERN
5. Remove the old disks from the diskgroup
alter diskgroup DATA drop disk
'DISK01',
'DISK02',
'DISK03' rebalance power 11;
Then wait until the rebalance operation completed,
select * from v$asm_operation;
select * from gv$asm_operation;
output:
SQL> select * from gv$asm_operation;
INST_ID GROUP_NUMBER OPERA STAT POWER ACTUAL SOFAR EST_WORK EST_RATE EST_MINUTES ERROR_CODE
---------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------- --------------------------------------------
2 1 REBAL WAIT 11
1 1 REBAL RUN 11 11 1070 1155 5798 0
Verify the disk status after the operation completes:
SQL> select name,path, total_mb, state, mount_status, header_status from v$asm_disk;
SQL> set linesize 200
SQL> set pagesize 200
SQL> col path for a30
NAME PATH TOTAL_MB STATE MOUNT_S HEADER_STATU
------------------------------ ------------------------------ ---------- -------- ------- ------------
ORCL:DISK01 0 NORMAL CLOSED FORMER
ORCL:DISK02 0 NORMAL CLOSED FORMER
ORCL:DISK03 0 NORMAL CLOSED FORMER
DISKNEW01 ORCL:DISKNEW01 20479 NORMAL CACHED MEMBER
DISKNEW02 ORCL:DISKNEW02 20479 NORMAL CACHED MEMBER
DISKNEW03 ORCL:DISKNEW03 10239 NORMAL CACHED MEMBER
SQL> select name, total_mb, state, type from v$asm_diskgroup;
NAME TOTAL_MB STATE TYPE
------------------------------ ---------- ----------- ------
DATA 51197 MOUNTED EXTERN
6. Now delete the disk from ASM and release the storage
Oracle has introduced new Multitenant Option from Oracle 12cR1 and this option allows a single container database (CDB) to host multiple pluggable databases.
In this post I will describe the step by step installation of Oracle database 19c 64-bit on Oracle Linux 7 64-bit and creation of a single instance 19c database.
3. Creation of single instance database using DBCA
Login to oracle user run dbca. The dbca utility is typically located in ORACLE_HOME/bin directory.
Choose Create a database
Select Advance configuration, In Advanced configuration, you can customize storage locations, management database options, and different passwords for Admin user accounts.
Choose Database type: Oracle single instance database and General Purpose or Transaction Processing template
Provide the Global database name & SID Enable Create as Container database and provide the PDB name
Choose File System and Provide the Database files location details
Enable Specify Fast Recovery Area and provide the location and size
If no listener is available, create a new one
Data Vault Option,
Choose Automatic Memory Management (if your physical memory is less than 4 GB) and Provide the Memory Target.
Note: If the total physical memory of your database instance is greater than 4 GB, then you cannot select the Use Automatic Memory Management option. Instead, use automatic shared memory management.
Specify the Processes count, This will be the maximum number of processes that can simultaneously connect to the database.
Use Unicode (AL32UTF8) Select this option to support multiple languages for your database users and database applications
Management Option
specify the passwords for the administrative accounts such as SYS, SYSTEM, and PDBADMIN.
Choose Create database and and click on Next
Review the summary information and click on Finish
Database created successfully..
[oracle@ol7-dev software]$ export ORACLE_SID=db19c
[oracle@ol7-dev software]$ sqlplus
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Nov 10 23:45:18 2020
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> select name, open_mode from v$database;
NAME OPEN_MODE
--------- --------------------
DB19C READ WRITE
This is my first blog post and I hope you will ignore mistakes. Thank you in advance.
Description:
In this blog post I will describe the step by step creation of Oracle cloud always free account and creating a Linux Virtual Machine.
Oracle Cloud Free Tier will allows you to sign up for an Oracle Cloud account which provides a number of Always Free services and a free credit of 300$ which can be use on all eligible Oracle cloud Infrastructure services for up to 30 days. The Always Free services are available for an unlimited period of time. Kindly click here to know more in detail.
Choose your country and enter your name and email address Once provided the details, check your email. You will see an account validation email from Oracle.
Enter the account information. Note: Home Region cannot be changed once you sign-up.
Enter the address information, mobile details & Payment details and verify the same Note: You need to provide the credit card details and 1$ will be charged for the verification and the same will be reserved. You will not be charged unless you elect to upgrade the account.
Enter you cloud account name and click next. This is the name we choose during the account creation
Enter the cloud account credentials and click next. Username is your email address.
You are now login to your cloud account
3. Network Configuration
Create Virtual Cloud Network (VCN)
Open the navigation menu. Under Core Infrastructure, go to Networking and click Virtual Cloud Networks
Select the compartment you want to create the network. Then click on Create VCN
Enter a name for the VCN For CIDR Block, I choose IP 192.168.10.0/24, so that I can use the private IP range b/w 192.168.10.1 to 192.168.10.254.
Now the VCN status is available
Click on VCN Name (ocvcn) and you will be redirected to VCN Details page. Under Resource select Subnets and then click Create Subnet
Enter the information as per the below screenshot and click on Create Subnet. Note: Public subnet has selected to access the instance in public n/w.
The subnet is now created
Configure Internet Gateway
From VCN Details page under Resources, click on Internet Gateways
Give it a name and choose the compartment, then click on Create Internet Gateway
Your internet gateway is created. but you still need to add a route rule that allows traffic to flow to the gateway.
Adding Route table
From VNC Details page, Under Resources –> Route Tables, click on the route table associated with your public subnet.
Click on Add Route Rules
This is for the public subnet. select Target Type as Internet gateway Destination CIDR Block: 0.0.0.0/0 (This means all the internet) Once ready, click on Add Route Rules
Now you can see the Internet gateway route has been successfully added
Adding Security lists
Check your public IP using the URL and whitelist it to access the cloud VM which you will be creating in the next steps
From Subnet Details page, Under Resources, select Security Lists and click on the Default Security List as shown below
Click on Add Ingress Rules
Source Type: CIDR Source CIDR: <Your Public IP>/32 IP Protocol: TCP; Source Port Range: All; Destination Port Range: All Once ready, Click on Add Ingress Rules
Now you can see your my Public IP is whitelisted
Creation of Oracle Linux Virtual Machine Instance
Open the navigation menu. Under Core Infrastructure, go to Compute and click Instances.
Click on create instance
Name: Enter the name for the instance Create in Compartment: Select the compartment to create the instance in Availablilty Zone: Select the Availability domain that you want to create the instance Image: Select the image, by default Oracle Linux 7.x is used to boot the instance Shape: Select VM.Standard.E2.1.Micro, which is eligible for always free Add SSH keys: select Generate SSH Key pair; Click Save Private Key and Save Public key on your computer.
In Management section leave the setting as default
In Networking section enter the private IP and Hostname of the VM. Then click on Create
Wait for the instance creation to complete
After a couple of minutes you can see your Instance is in running state