Oracle 12CR2: Creating PDB from the Seed

• Create a PDB using SQL*Plus

• Delete a PDB using the DBCA

• Add the created Pluggable Database net service name in the tnsnames.ora file

Advertisements
Posted in Oracle | Tagged , , | Leave a comment

Creating a CDB database on Oracle 12CR2 (Create an empty Container database)

 

Posted in Oracle, Oracle RAC | Tagged , | Leave a comment

DBCA error while creating CDB database.

Attempt to create a database in Oracle Restart environment fails and the following error

dbca_error_1.JPG

ORA-01017: invalid username/password; logon denied
. For details refer to "(:CLSN00107:)" in "/u01/app/grid/diag/crs/multisrv1/crs/trace/ohasd_oraagent_grid.trc".

CRS-2674: Start of 'ora.cdb1.db' on 'multisrv1' failed
ORA-01017: invalid username/password; logon denied
oracle.cluster.impl.crs.cops.CRSNativeResult.createException(CRSNativeResult.java:617)
oracle.cluster.impl.crs.cops.CRSNative.doStartResource(Native Method)
oracle.cluster.impl.crs.cops.CRSNative.genericStartResource(CRSNative.java:567)
oracle.cluster.impl.crs.cops.EntityOperations.startResource(EntityOperations.java:678)
oracle.cluster.impl.crs.CRSResourceImpl.start(CRSResourceImpl.java:883)
oracle.cluster.impl.crs.CRSResourceImpl.start(CRSResourceImpl.java:858)
oracle.cluster.impl.crs.CRSResourceImpl.start(CRSResourceImpl.java:846)
oracle.cluster.impl.common.SoftwareModuleImpl.start(SoftwareModuleImpl.java:525)
oracle.sysman.assistants.util.hasi.HADatabaseUtils.start(HADatabaseUtils.java:1476)
oracle.sysman.assistants.dbca.backend.PostDBCreationStep.executeImpl(PostDBCreationStep.java:1145)
oracle.sysman.assistants.util.step.BasicStep.execute(BasicStep.java:278)
oracle.sysman.assistants.util.step.Step.execute(Step.java:135)
oracle.sysman.assistants.util.step.StepContext$ModeRunner.run(StepContext.java:2941)
java.lang.Thread.run(Thread.java:745)
[Thread-291] [ 2018-05-01 10:46:38.078 GST ] [PostDBCreationStep.executeImpl:1156] Exception while Starting with HA Database Resource PRCR-1079 : Failed to start resource ora.cdb1.db
CRS-5017: The resource action "ora.cdb1.db start" encountered the following error:
ORA-01017: invalid username/password; logon denied
. For details refer to "(:CLSN00107:)" in "/u01/app/grid/diag/crs/multisrv1/crs/trace/ohasd_oraagent_grid.trc".

CRS-2674: Start of 'ora.cdb1.db' on 'multisrv1' failed
ORA-01017: invalid username/password; logon denied

 

Cause:

grid user is not under dba group.

[root@multisrv1 ~]# id grid
uid=54323(grid) gid=54321(oinstall) groups=54321(oinstall),492(vboxsf),54323(asmadmin),54324(asmdba)

Solution:

Add grid user to dba group and relink the oracle binary

 
[root@multisrv1 ~]# usermod -a -G dba grid
[root@multisrv1 ~]# id grid
uid=54323(grid) gid=54321(oinstall) groups=54321(oinstall),54322(dba),492(vboxsf),54323(asmadmin),54324(asmdba)

[oracle@multisrv1 bin]$ ./relink all
writing relink log to: /u01/app/oracle/product/12.2.0.1/db_1/install/relink.log
[oracle@multisrv1 bin]$

 

 

 

Posted in Oracle, Oracle RAC | Tagged , | Leave a comment

Upgrade the Oracle RAC Grid Infrastructure from release 12.1.0.2 to release 12.2.0.1.

Upgrade Oracle Grid Infrastructure:

Note: Oracle Grid Infrastructure 12.2 has added new features that require plenty of disk space in the CRS disk group. Therefore, you must expand the size of the CRS disk group before you can upgrade Oracle Grid to the new release.

Expand the CRS disk group in ASM.
## Shut down srv1 and srv2.
## Add a new fixed-size sharable disk to srv1. Give it the name DISK4 and set its size to 40 GB.

up21.JPG
In Oracle VirtualBox, click on srv1 >> click on Settings >> click on Storage in the right pane >> click on Controller: SATA >> click on Add Hardisk >> click on Add a New Disk >> select VDI option >> make it fixed-size >> enter the full-path filename of the disk >> set its size to 40 GB

up22.JPG
## Once the disk is created, make it sharable.
File menu item >> Virtual Media Manager >> select the created disk DISK4 >> click on the Modify button >> choose the option to make this file shareable >> press Ok >> press Close
## Link the new disk to srv2.
click on srv2 >> click on Settings >> click on Storage in the right pane >> click on Controller: SATA >> click on Add Hardisk >> click on an Existing Disk button>> navigate to the new disk file and press OK

 ## Create the directory of the new Oracle Grid home. Make grid the owner of the home directory.

Start srv1 and wait for its OS to load.
## Start Putty and login to srv1 as root user. Format the added disk.
## display all the available disks:
ls -l /dev/sd*
# format the disk:
# answer "n", "p","1", default, default, "w" when prompted
fdisk /dev/sde

## Add the partitioned disk to the ASM recognized disk list.
oracleasm listdisks
oracleasm createdisk DISK4 /dev/sde1
oracleasm listdisks

Start srv2 and wait for its OS to load.
## Start Putty and login to srv2 as root user.
## Scan the ASM disks and make sure DISK4 is seen by srv2.

oracleasm scandisks
oracleasm listdisks

## Login to the VirtualBox window of srv1 as grid.

## Start asmca utility and add DISK4 to the CRS disk group.
Right-click on the CRS disk group >> select Add Disks >> select DISK4 then click on OK button
You should see the CRS disk group size increased to nearly 50GB, as shown in the following screenshot:

up20.JPG

## Make sure you have Putty sessions connected to srv1 and srv2 as root.
## Create the directory of the new Oracle Grid home. Make grid the owner of the home directory.

##srv1
mkdir -p /u01/app/12.2.0/grid
chown grid:oinstall /u01/app/12.2.0/grid

##Create the same directory in srv2.

ssh srv2
mkdir -p /u01/app/12.2.0/grid
chown grid:oinstall /u01/app/12.2.0/grid
exit

##In the VirtualBox window of srv1, login as grid user

##Unzip the linuxx64_12201_grid_home.zip file to the new Grid home directory.

unzip linuxx64_12201_grid_home.zip -d /u01/app/12.2.0/grid

##In the terminal windows, change the current directory to the new Oracle Grid directory.

cd /u01/app/12.2.0/grid
export ORACLE_HOME=/u01/app/12.2.0/grid
./gridSetup.sh
up1

up2.JPG

up3.JPG

up4

 

Click on SSH Connectivity button

Enter the OS grid user password.

Click on Test button. If it reports that the SSH connectivity is not configured, click on Setup button.

up5.JPG

up6.JPG

up7

 

Make sure asmadmin and asmdba are selected.

up8

Make sure /u01/app/grid is selected.

up9Mark the check box “Automatically run configuration scripts

Enter the root password

up10

Set the upgrade on srv2 to Batch 2.

If you keep it in Batch 1, the system will not be available while the upgrade is going on.

up11

up12

up13.JPG

If you receive error: “cvuqdisk-1.0.10-1” being unavailable on the system, click on “Fix and Check Again” button.

The following warning can be ignored (for a production system they must be addressed):

– Memory is less than 8 GB

– resolv.conf Integrity

– (Linux)resolv.conf Integrity

Select Ignore All check box then click on Next button

Note: You could have run the Cluster Verification Utility (CVU) before running the installer. Running it from within the installer gives the same results.

up14.JPG

up15.JPG

click on Install button

up16.JPG

up17.JPG

up18.JPG

up19.JPG

In the Putty window, verify the upgrade has been successfully concluded:

/u01/app/12.2.0/grid/bin/crsctl check cluster -all
/u01/app/12.2.0/grid/bin/crsctl query crs activeversion
Posted in Oracle, Oracle RAC | Tagged , , , , , , , , , , , , | Leave a comment

OGG-00446 No valid log files for current redo sequence:

ERROR: OGG-00446 No valid log files for current redo sequence 33, thread 1, error retrieving redo file name for sequence 33, archived = 0, use_alternate = 0Not able to establish initial position for begin time 2018-03-18 17:44:15.000000.

Cause:

As the redo log file was stored under ASM, the process was unable to connect to ASM leading to the error.

workaround:

Extract process to run successfully, specify a user that can connect to the ASM instance using the below in Extract Parameter file

TRANLOGOPTIONS ASMUSER {user}@{ASM_TNS_ALIAS} ASMPASSWORD {password}

Example:

GGSCI (ggsrv1.localdomain as ogg@db1) 73> view params ESRV1

Extract esrv1
USERID ogg, PASSWORD oracle
TRANLOGOPTIONS ASMUSER sys@asm ASMPASSWORD oracle
ExtTrail ./dirdat/es
Table HR.JOB_HISTORY;
Table HR.EMPLOYEES;
Table HR.JOBS;
Table HR.DEPARTMENTS;
Table HR.LOCATIONS;
Table HR.REGIONS;

To ensure that the Oracle GoldenGate Extract process can connect to an ASM instance, list the ASM instance in the listener.ora and tnsnames.ora file.

--->listener.ora
SID_LIST_LISTENER_ASM =
 (SID_LIST =
 (SID_DESC =
 (GLOBAL_DBNAME = ASM)
 (ORACLE_HOME = /u01/app/grid/product/12.1.0/grid)
 (SID_NAME = +ASM)
 )
)
--->tnsnames.ora
ASM =
 (DESCRIPTION =
 (ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = TCP)(HOST = ggsrv1.localdomain)(PORT = 1521))
 )
 (CONNECT_DATA =
 (SID = +ASM)
 )
 )

 

Posted in GoldenGate | Tagged , | Leave a comment

Step-by-step guide for Install, Configure and Maintain Oracle Database 12C in AWS Cloud

Creating an Account with AWS
Creating a VPC
Creating a Security Group & SSH Key Pair
Building an EC2 instance in AWS Cloud
Connecting to an EC2 Instance
Downloading Oracle Database 12c Software
Preparing EC2 instance for Oracle Database 12c installation
Changing Hostname of an EC2 Instance.
Adding Secondary IP (for oracle installation we need static IP)
Creating Private DNS Hosted Zone
Configuring SELinux and Firewall
Adding a Volume to an EC2 Instance
Taking a snapshot of an EC2 Instance
Adding a Swap Volume
Oracle Database 12c Installation

All the above details are demonstrated in this document :

oracle12c_on_aws.docx

Posted in Cloud | Tagged , , | 3 Comments

Installing and Using Swingbench 2.5

Swingbench is a free easy-to-use stress testing utility on Oracle databases.download

Click the link above to download the full document.

 

Posted in Oracle RAC | Tagged , | Leave a comment