Posts

Showing posts from September, 2022

How to Rename PDB Database in 19c Database

Image
Summary    Here I will rename JIOPDB to AIRTELPDB   Connect to the CDB and check the information about the PDB first Open PDB in restricted mode. Rename the PDB. You must be connected to the PDB to rename it. Close and open the PDB.     Connect to the CDB and check the information about the PDB first   SQL> select name, open_mode, restricted from v$pdbs; SQL> select name, con_id, dbid,con_uid,guid from v$containers order by con_id; SQL> select service_id,name,network_name,creation_date,pdb,con_id from cdb_services;   Open PDB in restricted mode   SQL> select name, open_mode, restricted from v$pdbs;   NAME                  OPEN_MODE   RES -------------------- ---------- --- PDB$SEED              READ ONLY   NO TESTPDB               READ WRITE NO JIOPDB                 READ WRITE NO   SQL> alter pluggable database JIOPDB close;   Pluggable database altered.   SQL> alter pluggable database JIOPDB open restricted;  

How to DROP PDB Database in 19c

Image
We can Use the  DROP PLUGGABLE DATABASE  statement to drop a pluggable database (PDB). When you drop a PDB, the control file of the multitenant container database (CDB) is modified to remove all references to the dropped PDB and its data files. Archived logs and backups associated with the dropped PDB are not deleted. You can delete them using Oracle Recovery Manager (RMAN), or you can retain them in case you subsequently want to perform point-in-time recovery of the PDB. We can't rollback the  DROP PLUGGABLE DATABASE  statement. Drop pluggable Database include database: SYNTAX:-   DROP PLUGGABLE DATABASE <PDB_NAME> INCLUDING DATAFILES;   SQL> show pdbs       CON_ID CON_NAME          OPEN MODE   RESTRICTED ---------- ------------------------------ ---------- ----------          2 PDB$SEED                      READ ONLY   NO          3 TESTPDB                         READ WRITE NO          4 DEVPDB                          READ WRITE NO SQL>

How to create PDB Database in 19c

Image
Summary   Create a PDB from the seed PDB Verify the status, open mode, and service names of the PDBs List the PDB data files.   Create a PDB from the seed PDB   Syntax:-   create pluggable database <PDB_NMAE> admin user <Admin_Username> identified by <Password>;   [oracle@oraclelab1 ~]$ sqlplus / as sysdba   SQL*Plus: Release 19.0.0.0.0 - Production on Sat Sep 24 08:56:57 2022 Version 19.3.0.0.0   Copyright (c) 1982, 2019, Oracle.   All rights reserved.   Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0   SQL> show pdbs       CON_ID CON_NAME                        OPEN MODE   RESTRICTED ---------- ------------------------------ ---------- ----------          2 PDB$SEED                        READ ONLY   NO          3 TESTPDB                         READ WRITE NO   SQL> create pluggable database DEVPDB admin user sanjeev identified by dba;   Plugga

How to create ASM Disk group in Oracle 19C Database

Image
  In this post will see types of disk groups and how to create disk group, altering & delating disk group   Types of Disk groups   Normal: Uses two-way mirroring. A normal redundancy disk group requires a minimum of two disk devices (or two failure groups).   External: Choosing not to use ASM mirroring of files   High: Uses three-way mirroring of Oracle ASM metadata and user data. A high redundancy disk group requires a minimum of three disk devices (or three failure groups). The effective disk space in a high redundancy disk group is one-third the sum of the disk space in all of its devices. A high redundancy disk group can tolerate two failures.   SYNTAX:-   CREATE DISKGROUP <DISKGROUP_NAME> REDUNDANCY DISK<'OSDISK_LOCATION'> NAME <FAILGROUP_NAME>;   What is mirroring & stripping?   Mirroring: Redundant copies of the data over multiple disks.     Stripping : Spreading the data over multiple disks. EXTERNAL REDUNDA

Creating Oracle 19c ASM Disks on Linux Server

Image
Here I already created few disks I will create sdj,sdk,sdl only   List Disks [root@oraclelab1 dev]# pwd /dev [root@oraclelab1 dev]# ls -ls sd* [root@oraclelab1 dev]# fdisk /dev/sdj Welcome to fdisk (util-linux 2.23.2).   Changes will remain in memory only, until you decide to write them. Be careful before using the write command.   Device does not contain a recognized partition table Building a new DOS disklabel with disk identifier 0x5d47ecd8.   Command (m for help): n Partition type:    p   primary (0 primary, 0 extended, 4 free)    e   extended Select (default p): Using default response p Partition number (1-4, default 1): First sector (2048-2097151, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-2097151, default 2097151): Using default value 2097151 Partition 1 of type Linux and of size 1023 MiB is set   Command (m for help): w The partition table has been altered!   Calling ioctl() to re-read pa

Starting and Stopping Oracle ASM instance 19c

Image
Here will see the ASM start and shutdown steps in different methods ASM Command-Line Utility (ASMCMD) Sqlplus using sysasm utlity Server control utility (Srvctl) Clusterware Control (CRSCTL) Utility Stop start ASM suing systemctl Start & Stop using ASM Command-Line Utility (ASMCMD) Utility   [oracle@oraclelab1 ~]$ asmcmd ASMCMD> shutdown ASM diskgroups dismounted ASM instance shutdown Connected to an idle instance. ASMCMD>   ASMCMD> startup ASM instance started Total System Global Area 1137173320 bytes Fixed Size                  8905544 bytes Variable Size            1103101952 bytes ASM Cache                  25165824 bytes ASM diskgroups mounted ASMCMD> Start & Stop using sqlplus Utlity [oracle@oraclelab1 ~]$ sqlplus / as sysasm SQL*Plus: Release 19.0.0.0.0 - Production on Mon Aug 29 13:57:46 2022 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle.  All rights reserved.  Connec