Skip to main content

Step By Step How to Install Oracle 18c Grid Infrastructure for a Standalone Server in Silent Mode


<<Back to DB Administration Main Page

Installing Oracle 18c Grid Infrastructure for a Standalone Server in Silent Mode

The Installation of oracle database is little complicated as compare to other database systems therefore for better understanding I will divide the post in 3 sections
Section1: Preparing OS for Oracle GI Installation
Section2: Preparing Storage for Oracle DB Installation
Section3: Installing Oracle and Configuring Oracle grid Infrastructure for Standalone Environment

Section1: Preparing OS for Oracle GI Installation
Steps to Install OEL7 is provided in post Installing Oracle Enterprise Linux 7 for Oracle RAC Installation
  • create required OS group and OS user
login as root and create following OS groups and user. This OS user will be the owner of oracle grid infrastructure binaries and ASM instance  
#groupadd asmadmin

#groupadd oinstall
#useradd -g oinstall -G asmadmin oragrid

  • Create required directories and assign the ownership to oragrid:oinstall 

#chown -R oragrid:oinstall /u01/oragrid
#mkdir -p /u01/oragrid/18c/grid
#chmod -R 755 /u01/oragrid
  • Modify Kernel Parameters
Edit /etc/sysctl.conf and modify following parameters as shown
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500


Run following command to bring the changes in effect
#/sbin/sysctl -p
  • Configure limit for oragrid User
Add the following lines to the "/etc/security/limits.conf" file.
oragrid soft    nofile  2048
oragrid hard    nofile  65536
oragrid soft    nproc   4096
oragrid hard    nproc   16384
oragrid soft    stack   10240
oragrid hard    stack   32768

  • Install OS Packages for Oracle
Install the following packages if they are not already Installed using rpm or yum utility. Install the possible latest version
binutils
compat-libcap1
compat-libstdc++-33
gcc
gcc-c++
glibc
glibc-devel
ksh
libgcc
libstdc++
libstdc++-devel
libaio
libaio-devel
libXext
libXtst
libX11
libXau
libxcb
libXi
make
sysstat
unixODBC
unixODBC-devel

  • Disable SELINUX
Set secure Linux to disabled by editing the "/etc/selinux/config
"SELINUX=disabled
  • Disable Linux Firewall
# service iptables stop
# chkconfig iptables off


Section2: Preparing Storage for Oracle GI Installation
  • Prepare the Disks for ASM
To Configure and provision the shared disks for use with Oracle ASM using oracleasmlib I have already prepared the disks partitions.
Refer Step11: Prepare ASM Disks for Shared Storage from post Step by Step Oracle RAC 12c Release 2 (12c R2) installation on Oracle VirtualBox with OEL7 in case you want the steps to partition a disk. I am using disk partitions xvdc[11-15] in this example

In this post I will prepare the disks using asmlib packages. You can also use AFD if it is supported on your OS.
  • Download oracleASMLib packages
You can download the packages from here for RHEL7

  • copy the packages on  the server
copy both the packages on  the server using scp or winscp
oracleasmlib-2.0.12-1.el7.x86_64.rpm
oracleasm-support-2.1.11-2.el7.x86_64.rpm
  • Install the oracleasmlib packages
login as root user 
$sudo su - root
# rpm -ivh oracleasmlib-2.0.12-1.el7.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:oracleasmlib-2.0.12-1.el7        ################################# [100%]
# rpm -ivh oracleasm-support-2.1.11-2.el7.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:oracleasm-support-2.1.11-2.el7   ################################# [100%]
Note: Forwarding request to 'systemctl enable oracleasm.service'.
Created symlink from /etc/systemd/system/multi-user.target.wants/oracleasm.service to /usr/lib/systemd/system/oracleasm.service
  • Configure oracleasm
# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting <ENTER> without typing an
answer will keep that current value.  Ctrl-C will abort.


Default user to own the driver interface []: oragrid
Default group to own the driver interface []: oinstall
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
  • load oracleasm module
# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
  • Verify oracleasmlib configuration
# df -ha |grep -i oracleasm
oracleasmfs                     0     0     0    - /dev/oracleasm

# lsmod | grep oracleasm
oracleasm              61440  1
  • Create the disk for ASM diskgroup
# oracleasm createdisk DATA1 /dev/xvdc11
Writing disk header: done
Instantiating disk: done
# oracleasm createdisk DATA2 /dev/xvdc12
Writing disk header: done
Instantiating disk: done

Section3: Installing Oracle and Configuring Oracle grid Infrastructure for Standalone Environment
  • Download GI Binary
Download oracle database clusterware binaries from here
  • Transfer the GI Software
Transfer the binaries to the server where you want to install it, using winscp or tool you prefer
  • Unzip the GI Software in GRID_HOME

unzip the file LINUX.X64_180000_grid_home.zip in GRID_HOME,  you need minimum 20G space to complete the installation.
$unzip /u01/oragrid/18c/grid/LINUX.X64_180000_grid_home.zip
  • Perform Installation PreCheck
Login as grid user and run runcluvfy.sh to perform the pre installation check.
$/u01/oragrid/18c/grid/runcluvfy.sh stage -pre hacfg
==================================================================
Verifying Physical Memory ...FAILED (PRVF-7530) <==Minimum 8GB required
Verifying Available Physical Memory ...PASSED
Verifying Swap Size ...FAILED (PRVF-7573) <==Minimum 8GB required
Verifying Free Space: test:/usr,test:/var,test:/etc,test:/sbin,test:/tmp ...PASSED
Verifying User Existence: oragrid ...
  Verifying Users With Same UID: 1001 ...PASSED
Verifying User Existence: oragrid ...PASSED
Verifying Group Existence: dba ...FAILED (PRVG-10461) <== I am not using default dba group
Verifying Group Membership: dba ...FAILED (PRVG-10460)<== I am not using default dba group
Verifying Run Level ...PASSED
Verifying Architecture ...PASSED
Verifying OS Kernel Version ...PASSED
Verifying OS Kernel Parameter: semmsl ...PASSED
Verifying OS Kernel Parameter: semmns ...PASSED
Verifying OS Kernel Parameter: semopm ...PASSED
Verifying OS Kernel Parameter: semmni ...PASSED
Verifying OS Kernel Parameter: shmmax ...PASSED
Verifying OS Kernel Parameter: shmmni ...PASSED
Verifying OS Kernel Parameter: shmall ...PASSED
Verifying OS Kernel Parameter: file-max ...PASSED
Verifying OS Kernel Parameter: ip_local_port_range ...PASSED
Verifying OS Kernel Parameter: rmem_default ...PASSED
Verifying OS Kernel Parameter: rmem_max ...PASSED
Verifying OS Kernel Parameter: wmem_default ...PASSED
Verifying OS Kernel Parameter: wmem_max ...PASSED
Verifying OS Kernel Parameter: aio-max-nr ...PASSED
Verifying OS Kernel Parameter: panic_on_oops ...PASSED
Verifying Package: binutils-2.23.52.0.1 ...PASSED
Verifying Package: compat-libcap1-1.10 ...PASSED
Verifying Package: libgcc-4.8.2 (x86_64) ...PASSED
Verifying Package: libstdc++-4.8.2 (x86_64) ...PASSED
Verifying Package: libstdc++-devel-4.8.2 (x86_64) ...PASSED
Verifying Package: sysstat-10.1.5 ...PASSED
Verifying Package: ksh ...PASSED
Verifying Package: make-3.82 ...PASSED
Verifying Package: glibc-2.17 (x86_64) ...PASSED
Verifying Package: glibc-devel-2.17 (x86_64) ...PASSED
Verifying Package: libaio-0.3.109 (x86_64) ...PASSED
Verifying Package: libaio-devel-0.3.109 (x86_64) ...PASSED
Verifying Package: nfs-utils-1.2.3-15 ...PASSED
Verifying Package: smartmontools-6.2-4 ...PASSED
Verifying Package: net-tools-2.0-0.17 ...PASSED
Verifying Users With Same UID: 0 ...PASSED
Verifying Current Group ID ...PASSED
Verifying Root user consistency ...PASSED
Pre-check for Oracle Restart configuration was unsuccessful.

Failures were encountered during execution of CVU verification request "stage -pre hacfg".
Verifying Physical Memory ...FAILED
test: PRVF-7530 : Sufficient physical memory is not available on node
          "test" [Required physical memory = 8GB (8388608.0KB)]
Verifying Swap Size ...FAILED
test: PRVF-7573 : Sufficient swap size is not available on node "test"
          [Required = 7.0505GB (7392968.0KB) ; Found = 4GB (4194300.0KB)]
Verifying Group Existence: dba ...FAILED
test: PRVG-10461 : Group "dba" selected for privileges "OSDBA" does not
          exist on node "test".
Verifying Group Membership: dba ...FAILED
test: PRVG-10460 : User "oragrid" does not belong to group "dba" selected
          for privileges "OSDBA" on node "test".

CVU operation performed:      stage -pre hacfg
Date:                         Feb 12, 2019 1:12:26 PM
CVU home:                     /u01/oragrid/18c/grid/
User:                         oragrid
==================================================================


NOTE:-Although I can safely ignore the above known failures. It is recommended that you must verify and fix the failures reported by runcluvfy prechek before you proceed ahead
  • Prepare Response File for Silent Installation
Oracle provides response file templates for each product and installation type, and for each configuration tool.
Edit the response file templates located in the Grid_home/install/response directory. Change the following parameters according to your environment. Backup the responsefile before modifying it
$ cp /u01/oragrid/18c/grid/install/response/gridsetup.rsp /u01/oragrid/18c/grid/install/response/gridsetup.rsp.orig
INVENTORY_LOCATION=/u01/oraInventory
oracle.install.option=HA_CONFIG
ORACLE_BASE=/u01/oragrid/oraBase
oracle.install.asm.OSDBA=oinstall
oracle.install.asm.OSASM=asmadmin
oracle.install.asm.storageOption=ASM
oracle.install.asm.SYSASMPassword=******
oracle.install.asm.diskGroup.name=DATA
oracle.install.asm.diskGroup.redundancy=NORMAL
oracle.install.asm.diskGroup.disks=/dev/oracleasm/disks/DATA1,/dev/oracleasm/disks/DATA2
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/oracleasm/disks/*
oracle.install.asm.monitorPassword=*******
oracle.install.asm.configureAFD=false
Caution:When you modify a response file template and save a file for use, the response file may contain plain text passwords. Ownership of the response file should be given to the Oracle software installation owner only, and permissions on the response file should be changed to 600.
NOTE:- The installer or configuration assistant fails if you do not correctly configure the response file. Also, ensure that your response file name has the .rsp suffix
  • Change response file permission
chmod 600 /u01/oragrid/18c/grid/install/response/gridsetup.rsp
  • Perform the Installation in Silent Mode using response file
$  /u01/oragrid/18c/grid/gridSetup.sh -silent -ignorePrereqFailure  -responseFile /u01/oragrid/18c/grid/install/response/gridsetup.rsp
Launching Oracle Grid Infrastructure Setup Wizard...
[WARNING] [INS-13014] Target environment does not meet some optional requirements.
   CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/orainventory/logs/GridSetupActions2019-02-13_03-00-44PM/gridSetupActions2019-02-13_03-00-44PM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /u01/orainventory/logs/GridSetupActions2019-02-13_03-00-44PM/gridSetupActions2019-02-13_03-00-44PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
 /u01/oragrid/18c/grid/install/response/grid_2019-02-13_03-00-44PM.rsp
You can find the log of this install session at:
 /u01/orainventory/logs/GridSetupActions2019-02-13_03-00-44PM/gridSetupActions2019-02-13_03-00-44PM.log
As a root user, execute the following script(s):
        1. /u01/oragrid/18c/grid/root.sh
Execute /u01/oragrid/18c/grid/root.sh on the following nodes:
[test]

Successfully Setup Software with warning(s).As install user, execute the following command to complete the configuration.
        /u01/oragrid/18c/grid/gridSetup.sh -executeConfigTools -responseFile /u01/oragrid/18c/grid/install/response/gridsetup.rsp [-silent]
  • As root use execute root.sh
# /u01/oragrid/18c/grid/root.sh
Check /u01/oragrid/18c/grid/install/root_wdtest16_2019-02-13_15-02-14-091873818.log for the output of root script
  • As Grid Owner execute ConfigTools script
$ /u01/oragrid/18c/grid/gridSetup.sh -executeConfigTools -responseFile /u01/oragrid/18c/grid/install/response/gridsetup.rsp -silent

Launching Oracle Grid Infrastructure Setup Wizard...
You can find the logs of this session at:
/u01/orainventory/logs/GridSetupActions2019-02-13_03-03-58PM
Successfully Configured Software.
  • Verify the Installation
$ /u01/oragrid/18c/grid/bin/cluvfy stage -post hacfg
Verifying Oracle Restart Integrity ...PASSED
Verifying OLR Integrity ...PASSED
Post-check for Oracle Restart configuration was successful.

CVU operation performed:      stage -post hacfg
Date:                         Feb 13, 2019 3:21:14 PM
CVU home:                     /u01/oragrid/18c/grid/
User:                         oragrid
$ crsctl check  has
CRS-4638: Oracle High Availability Services is online
$ crsctl status res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       test                 STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       test                 STABLE
ora.asm
               ONLINE  ONLINE       test                 Started,STABLE
ora.ons
               OFFLINE OFFLINE      test                 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       test                 STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.evmd
      1        ONLINE  ONLINE       test                 STABLE
--------------------------------------------------------------------------------
$ asmcmd
ASMCMD> lsdg

State    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  NORMAL  N         512             512   4096  1048576    102400   102266                0           51133              0             N  DATA/

Comments

  1. why are we not using AFD feature here

    ReplyDelete
    Replies
    1. Hi,

      The demonstration is based on ASMLib intentionally to provide the steps for ASMLib configuration, however you can of course choose AFD over ASMLib and enjoy its advantages.
      To use AFD instead of ASMLib after unzipping the grid binaries set ORACLE_HOME and ORACLE_BASE and then initialize the disks using AFD as below
      $ORACLE_HOME/bin/asmcmd afd_label DG_DATA /dev/xvdc11 --init
      $ORACLE_HOME/bin/asmcmd afd_label DG_FRA /dev/xvdc12 --init
      …………………
      …………………
      Hopes this answers your question.

      Delete
  2. Hi, i read your blog from time to time and i own a similar one and i was just curious if you get a lot of spam feedback? If so how do you stop it, any plugin or anything you can recommend? I get so much lately it's driving me crazy so any support is very much appreciated. Sea cans for sale near me

    ReplyDelete

Post a Comment

Popular posts from this blog

How to Power On/off Oracle Exadata Machine

<<Back to Exadata Main Page How to Power On/off Oracle Exadata Machine Oracle Exadata machines can be powered on/off either by pressing the power button on front of the server or by logging in to the ILOM interface. Powering on servers using  button on front of the server The power on sequence is as follows. 1. Start Rack, including switches  Note:- Ensure the switches have had power applied for a few minutes to complete power on  configuration before starting Exadata Storage Servers 2.Start Exadata Storage Servers  Note:- Ensure all Exadata Storage Servers complete the boot process before starting the   database servers 3. Start Database Servers Powering On Servers Remotely using ILOM The ILOM can be accessed using the Web console, the command-line interface (CLI), IPMI, or SNMP. For example, to apply power to server dm01cel01 using IPMI, where dm01cel01-ilom is the host name of the ILOM for the serve...

ORA-28374: typed master key not found in wallet

<<Back to Oracle DB Security Main Page ORA-46665: master keys not activated for all PDBs during REKEY SQL> ADMINISTER KEY MANAGEMENT SET KEY FORCE KEYSTORE IDENTIFIED BY xxxx WITH BACKUP CONTAINER = ALL ; ADMINISTER KEY MANAGEMENT SET KEY FORCE KEYSTORE IDENTIFIED BY xxxx WITH BACKUP CONTAINER = ALL * ERROR at line 1: ORA-46665: master keys not activated for all PDBs during REKEY I found following in the trace file REKEY: Create Key in PDB 3 resulted in error 46658 *** 2019-02-06T15:27:04.667485+01:00 (CDB$ROOT(1)) REKEY: Activation of Key AdnU5OzNP08Qv1mIyXhP/64AAAAAAAAAAAAAAAAAAAAAAAAAAAAA in PDB 3 resulted in error 28374 REKEY: Keystore needs to be restored from the REKEY backup.Aborting REKEY! Cause: All this hassle started because I accidently deleted the wallet and all wallet backup files too and also forgot the keystore password. There was no way to restore the wallet back. Fortunately in my case the PDB which had encrypted data was supposed to be deco...

How to Find VIP of an Oracle RAC Cluster

<<Back to Oracle RAC Main Page How to Find Out VIP of an Oracle RAC Cluster Login clusterware owner (oracle) and execute the below command to find out the VIP hostname used in Oracle RAC $ olsnodes -i node1     node1-vip node2     node2-vip OR $ srvctl config nodeapps -viponly Network 1 exists Subnet IPv4: 10.0.0.0/255.255.0.0/bondeth0, static Subnet IPv6: Ping Targets: Network is enabled Network is individually enabled on nodes: Network is individually disabled on nodes: VIP exists: network number 1, hosting node node1 VIP Name: node1-vip VIP IPv4 Address: 10.0.0.1 VIP IPv6 Address: VIP is enabled. VIP is individually enabled on nodes: VIP is individually disabled on nodes: VIP exists: network number 1, hosting node node2 VIP Name: node2-vip VIP IPv4 Address: 10.0.0.2 VIP IPv6 Address: VIP is enabled. VIP is individually enabled on nodes: VIP is individually disabled on nodes:

ORA-46630: keystore cannot be created at the specified location

<<Back to DB Administration Main Page ORA-46630: keystore cannot be created at the specified location CDB011> ADMINISTER KEY MANAGEMENT CREATE KEYSTORE '+DATAC4/CDB01/wallet/' IDENTIFIED BY "xxxxxxx"; ADMINISTER KEY MANAGEMENT CREATE KEYSTORE '+DATAC4/CDB01/wallet/' IDENTIFIED BY "EncTest123" * ERROR at line 1: ORA-46630: keystore cannot be created at the specified location Cause  Creating a keystore at a location where there is already a keystore exists Solution To solve the problem, use a different location to create a keystore (use ENCRYPTION_WALLET_LOCATION in sqlnet.ora file to specify the keystore location), or move this ewallet.p12 file to some other location. Note: Oracle does not recommend deleting keystore file (ewallet.p12) that belongs to a database. If you have multiple keystores, you can choose to merge them rather than deleting either of them.

ORA-65104: operation not allowed on an inactive pluggable database alter pluggable database open

<<Back to DB Administration Main Page ORA-65104: operation not allowed on an inactive pluggable database SQL> alter pluggable database TEST_CLON open; alter pluggable database TEST_CLON open * ERROR at line 1: ORA-65104: operation not allowed on an inactive pluggable database Cause The pluggable database status was UNUSABLE. It was still being created or there was an error during the create operation. A PDB can only be opened if it is successfully created and its status is marked as NEW in cdb_pdbs.status column SQL> select PDB_NAME,STATUS from cdb_pdbs; PDB_NAME             STATUS -------------------- --------------------------- PDB$SEED             NORMAL TEST_CLON            UNUSABLE Solution:  Drop the PDB and create it again. Related Posts How to Clone Oracle PDB (Pluggable Database) with in the Same Container

ORA-16905: The member was not enabled yet

<<Back to Oracle DataGuard Main Page ORA-16905 Physical Standby Database is disabled DGMGRL> show configuration; Configuration - DG_ORCL1P   Protection Mode: MaxPerformance   Members:   ORCL1PP - Primary database     ORCL1PS - Physical standby database (disabled)       ORA-16905: The member was not enabled yet. Fast-Start Failover:  Disabled Configuration Status: SUCCESS   (status updated 58 seconds ago) DGMGRL> DGMGRL> enable database 'ORCL1PS'; Enabled. DGMGRL>  show configuration; Configuration - DG_ORCL1P   Protection Mode: MaxPerformance   Members:   ORCL1PP - Primary database     ORCL1PS - Physical standby database Fast-Start Failover:  Disabled Configuration Status: SUCCESS   (status updated 38 seconds ago)

How to Switch Log File from All Instances in RAC

<<Back to Oracle RAC Main Page Switch The Log File of All Instances in Oracle RAC. In many cases you need to switch the logfile of the database. You can switch logfile using alter system switch logfile command but if you want to switch the logfile from all the instances you need to execute the command on all the instances individually and therefore you must login on all the instances. You can avoid this and switch logfile of all instances by just running the below command from any of the instance in RAC database SQL> ALTER SYSTEM SWITCH ALL LOGFILE;   System altered.

Starting RMAN and connecting to Database

  <<Back to Oracle Backup & Recovery Main Page Starting RMAN and connecting to Database Starting RMAN and connecting to Database To start RMAN you need to set the environment and type rman and press enter. You can connect to database either using connect command or using command line option. using command line option localhost:$ export ORACLE_HOME=/ora_app/product/18c/dbd2 localhost:$ export PATH=$ORACLE_HOME/bin:$PATH localhost:$ export ORACLE_SID=ORCL1P localhost:$ rman target / Recovery Manager: Release 18.0.0.0.0 - Production on Sun Apr 4 08:11:01 2021 Version 18.11.0.0.0 Copyright (c) 1982, 2018, Oracle and/or its affiliates.  All rights reserved. connected to target database: ORCL1P (DBID=4215484517) RMAN> using connect option localhost:$ rman RMAN> connect target sys@ORCL1P  target database Password:******** connected to target database: ORCL1P (DBID=4215484517) NOTE: To use connect command you need to ensure that  you have proper TNS sentry...

How to Attach to a Datapump Job and Check Status of Export or Import

<<Back to Oracle DATAPUMP Main Page How to check the progress of  export or import Jobs You can attach to the export/import  job using ATTACH parameter of oracle datapump utility. Once you are attached to the job you check its status by typing STATUS command. Let us see how Step1>  Find the Export/Import Job Name You can find the datapump job information from  DBA_DATAPUMP_JOBS or  USER_DATAPUMP_JOBS view. SQL> SELECT OWNER_NAME,JOB_NAME,OPERATION,JOB_MODE,STATE from DBA_DATAPUMP_JOBS; OWNER_NAME JOB_NAME                       OPERATION            JOB_MODE   STATE ---------- ------------------------------ -------------------- ---------- ---------- SYSTEM     SYS_EXPORT_FULL_02          ...

ORA-46655: no valid keys in the file from which keys are to be imported

<<Back to DB Administration Main Page SQL> administer key management import encryption keys with secret "xxxx" from '/tmp/pdb02_tde_key.exp' force keystore identified by "xxxx" with backup; administer key management import encryption keys with secret "xxxxxx" from '/tmp/pdb02_tde_key.exp' force keystore identified by "xxxxxx" with backup * ERROR at line 1: ORA-46655: no valid keys in the file from which keys are to be imported Cause: Either the keys to be imported already present in the target database or correct container (PDB) is not set. Solution: In my case I got the error because I attempted to import the keys for newly plugged database PDB02 from CDB$ROOT container. To Solve the issue just switched to the correct container and re run the import. SQL> show con_name CON_NAME ------------------------------ CDB$ROOT <===Wrong Container selected  SQL> alter session set container=PDB02; Session alt...