Search This Blog

Total Pageviews

Wednesday, 11 October 2023

Dbca Delete database


Dbca Delete database ..





Delete database using DBCA silent mode



first!!!!

 sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Oct 11 05:25:51 2023
Version 19.16.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.16.0.0.0

SQL> shutdown immediate ;  <<<<< shutdown !
Database closed.
Database dismounted.
ORACLE instance shut down.


./dbca -silent -deleteDatabase -sourceDB ODB19C -sysDBAUserName sys -sysDBAPassword 'sys'

=======

 pwd
/u01/app/oracle/product/19.0.0/dbhome_1/bin


 ./dbca -silent -deleteDatabase -sourceDB ODB19C -sysDBAUserName sys -sysDBAPassword 'sys'

[WARNING] [DBT-11503] The instance (ODB19C) is not running on the local node. This may result in partial delete of Oracle database.
   CAUSE: A locally running instance is required for complete deletion of Oracle database instance and database files.
   ACTION: Specify a locally running database, or execute DBCA on a node where the database instance is running.
[WARNING] [DBT-19202] The Database Configuration Assistant will delete the Oracle instances and datafiles for your database. All information in the database will be destroyed.
Prepare for db operation
32% complete
Connecting to database
35% complete
39% complete
42% complete
45% complete
48% complete
52% complete
65% complete
Updating network configuration files
68% complete
Deleting instance and datafiles
84% complete
100% complete
Database deletion completed.
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/ODB19C/ODB19C0.log" for further details.

=====

Another database is running on same home !!

ps -ef|grep -i smon
oracle   3843427       1  0 Oct10 ?        00:00:01 ora_smon_test

Tuesday, 10 October 2023

duplicate Database Using Dbca Command In Oracle 19c


Duplicate Database Using Dbca Command In Oracle 19c 


syntax 
./dbca -silent -createDuplicateDB -gdbName {CLONE_DB_NAME} -primaryDBConnectionString  -sid  {CLONE_DB_SID} -databaseConfigType SINGLE -initParams db_unique_name={CLONE_DB_NAME}  -sysPassword {PRIMARY_DB_SYS_PWD} -datafileDestination {CLONE_DATAFILE_LOC}



ww                                                                           hostname=oralal                                                                                 {PRIMARY_DB_SYS_PWD}
./dbca -silent -createDuplicateDB -gdbName ODB19C -primaryDBConnectionString oralal:1521/test -sid ODB19C -databaseConfigType SINGLE -initParams db_unique_name=ODB19C -sysPassword 'sys' -datafileDestination /u02/app/oracle/DB19C


Prepare for db operation
22% complete
Listener config step
44% complete
Auxiliary instance creation

67% complete
RMAN duplicate

89% complete
Post duplicate database operations

100% complete

Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/ODB19C/ODB19C.log" for further details.


 cat /u01/app/oracle/cfgtoollogs/dbca/ODB19C/ODB19C.log|more
[ 2023-10-10 11:49:26.253 EDT ] Prepare for db operation
DBCA_PROGRESS : 22%
[ 2023-10-10 11:49:26.389 EDT ] Listener config step
DBCA_PROGRESS : 44%
[ 2023-10-10 11:49:26.556 EDT ] Auxiliary instance creation
DBCA_PROGRESS : 67%
[ 2023-10-10 11:49:46.987 EDT ] RMAN duplicate
DBCA_PROGRESS : 89%
[ 2023-10-10 11:52:27.750 EDT ] Post duplicate database operations
DBCA_PROGRESS : 100%
[ 2023-10-10 11:55:10.425 EDT ]



====



test:/u01/app/oracle/product/19.0.0/dbhome_1:Y  >>>>>>>  from 
ODB19C:/u01/app/oracle/product/19.0.0/dbhome_1:N  <<<<<< to 

 ps -ef|grep -i smon
oracle   3843427       1  0 11:35 ?        00:00:00 ora_smon_test
oracle   3850518       1  0 11:55 ?        00:00:00 ora_smon_ODB19C  <<<< database created 

Monday, 2 October 2023

Oracle Database 19c Installation Software Only




curl -o oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:01:06 --:--:--     0
100 18204  100 18204    0     0     85      0  0:03:34  0:03:33  0:00:01  4954




[root@oracent19c ~]# ls -ltr
total 2988024
-rw-------. 1 root root       1686 Aug 16 13:34 anaconda-ks.cfg
-rw-r--r--. 1 root root       1734 Aug 16 13:35 initial-setup-ks.cfg
drwxr-xr-x. 2 root root          6 Aug 16 13:36 Videos
drwxr-xr-x. 2 root root          6 Aug 16 13:36 Templates
drwxr-xr-x. 2 root root          6 Aug 16 13:36 Public
drwxr-xr-x. 2 root root          6 Aug 16 13:36 Pictures
drwxr-xr-x. 2 root root          6 Aug 16 13:36 Music
drwxr-xr-x. 2 root root          6 Aug 16 13:36 Downloads
drwxr-xr-x. 2 root root          6 Aug 16 13:36 Documents
drwxr-xr-x. 2 root root         40 Aug 16 13:41 Desktop
-rw-r--r--. 1 root root 3059705302 Aug 16 16:02 V982063-01.zip
-rw-r--r--. 1 root root      18204 Aug 16 16:13 oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm


Install rpm 

[root@oracent19c ~]# yum -y localinstall oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm


Loaded plugins: fastestmirror, langpacks
Examining oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm: oracle-database-preinstall-19c-1.0-1.el7.x86_64
Marking oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-database-preinstall-19c.x86_64 0:1.0-1.el7 will be installed
--> Processing Dependency: compat-libcap1 for package: oracle-database-preinstall-19c-1.0-1.el7.x86_64
Loading mirror speeds from cached hostfile
 * base: mirrors.coreix.net
 * extras: mirrors.coreix.net
 * updates: mirrors.coreix.net
--> Processing Dependency: compat-libstdc++-33 for package: oracle-database-preinstall-19c-1.0-1.el7.x86_64
--> Processing Dependency: glibc-devel for package: oracle-database-preinstall-19c-1.0-1.el7.x86_64
--> Processing Dependency: ksh for package: oracle-database-preinstall-19c-1.0-1.el7.x86_64
--> Processing Dependency: libaio-devel for package: oracle-database-preinstall-19c-1.0-1.el7.x86_64
--> Processing Dependency: libstdc++-devel for package: oracle-database-preinstall-19c-1.0-1.el7.x86_64
--> Running transaction check
---> Package compat-libcap1.x86_64 0:1.10-7.el7 will be installed
---> Package compat-libstdc++-33.x86_64 0:3.2.3-72.el7 will be installed
---> Package glibc-devel.x86_64 0:2.17-326.el7_9 will be installed
--> Processing Dependency: glibc-headers = 2.17-326.el7_9 for package: glibc-devel-2.17-326.el7_9.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-326.el7_9.x86_64
---> Package ksh.x86_64 0:20120801-144.el7_9 will be installed
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
---> Package libstdc++-devel.x86_64 0:4.8.5-44.el7 will be installed
--> Running transaction check
---> Package glibc-headers.x86_64 0:2.17-326.el7_9 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-326.el7_9.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-326.el7_9.x86_64
--> Running transaction check
---> Package kernel-headers.x86_64 0:3.10.0-1160.95.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================
 Package                                              Arch                         Version                                       Repository                                                              Size
==============================================================================================================================================================================================================
Installing:
 oracle-database-preinstall-19c                       x86_64                       1.0-1.el7                                     /oracle-database-preinstall-19c-1.0-1.el7.x86_64                        55 k
Installing for dependencies:
 compat-libcap1                                       x86_64                       1.10-7.el7                                    base                                                                    19 k
 compat-libstdc++-33                                  x86_64                       3.2.3-72.el7                                  base                                                                   191 k
 glibc-devel                                          x86_64                       2.17-326.el7_9                                updates                                                                1.1 M
 glibc-headers                                        x86_64                       2.17-326.el7_9                                updates                                                                691 k
 kernel-headers                                       x86_64                       3.10.0-1160.95.1.el7                          updates                                                                9.1 M
 ksh                                                  x86_64                       20120801-144.el7_9                            updates                                                                885 k
 libaio-devel                                         x86_64                       0.3.109-13.el7                                base                                                                    13 k
 libstdc++-devel                                      x86_64                       4.8.5-44.el7                                  base                                                                   1.5 M

Transaction Summary
==============================================================================================================================================================================================================
Install  1 Package (+8 Dependent packages)

Total size: 13 M
Total download size: 13 M
Installed size: 19 M
Downloading packages:
(1/8): compat-libcap1-1.10-7.el7.x86_64.rpm                                                                                                                                            |  19 kB  00:00:00
(2/8): compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm                                                                                                                                     | 191 kB  00:00:00
(3/8): libaio-devel-0.3.109-13.el7.x86_64.rpm                                                                                                                                          |  13 kB  00:00:00
(4/8): glibc-headers-2.17-326.el7_9.x86_64.rpm                                                                                                                                         | 691 kB  00:00:00
(5/8): libstdc++-devel-4.8.5-44.el7.x86_64.rpm                                                                                                                                         | 1.5 MB  00:00:00
(6/8): kernel-headers-3.10.0-1160.95.1.el7.x86_64.rpm                                                                                                                                  | 9.1 MB  00:00:02
(7/8): glibc-devel-2.17-326.el7_9.x86_64.rpm                                                                                                                                           | 1.1 MB  00:00:15
(8/8): ksh-20120801-144.el7_9.x86_64.rpm                                                                                                                                               | 885 kB  00:00:15
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                         867 kB/s |  13 MB  00:00:15
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libaio-devel-0.3.109-13.el7.x86_64                                                                                                                                                         1/9
  Installing : compat-libcap1-1.10-7.el7.x86_64                                                                                                                                                           2/9
  Installing : compat-libstdc++-33-3.2.3-72.el7.x86_64                                                                                                                                                    3/9
  Installing : ksh-20120801-144.el7_9.x86_64                                                                                                                                                              4/9
  Installing : libstdc++-devel-4.8.5-44.el7.x86_64                                                                                                                                                        5/9
  Installing : kernel-headers-3.10.0-1160.95.1.el7.x86_64                                                                                                                                                 6/9
  Installing : glibc-headers-2.17-326.el7_9.x86_64                                                                                                                                                        7/9
  Installing : glibc-devel-2.17-326.el7_9.x86_64                                                                                                                                                          8/9
  Installing : oracle-database-preinstall-19c-1.0-1.el7.x86_64                                                                                                                                            9/9
  Verifying  : kernel-headers-3.10.0-1160.95.1.el7.x86_64                                                                                                                                                 1/9
  Verifying  : libstdc++-devel-4.8.5-44.el7.x86_64                                                                                                                                                        2/9
  Verifying  : ksh-20120801-144.el7_9.x86_64                                                                                                                                                              3/9
  Verifying  : glibc-devel-2.17-326.el7_9.x86_64                                                                                                                                                          4/9
  Verifying  : compat-libstdc++-33-3.2.3-72.el7.x86_64                                                                                                                                                    5/9
  Verifying  : glibc-headers-2.17-326.el7_9.x86_64                                                                                                                                                        6/9
  Verifying  : compat-libcap1-1.10-7.el7.x86_64                                                                                                                                                           7/9
  Verifying  : libaio-devel-0.3.109-13.el7.x86_64                                                                                                                                                         8/9
  Verifying  : oracle-database-preinstall-19c-1.0-1.el7.x86_64                                                                                                                                            9/9

Installed:
  oracle-database-preinstall-19c.x86_64 0:1.0-1.el7

Dependency Installed:
  compat-libcap1.x86_64 0:1.10-7.el7  compat-libstdc++-33.x86_64 0:3.2.3-72.el7  glibc-devel.x86_64 0:2.17-326.el7_9    glibc-headers.x86_64 0:2.17-326.el7_9  kernel-headers.x86_64 0:3.10.0-1160.95.1.el7
  ksh.x86_64 0:20120801-144.el7_9     libaio-devel.x86_64 0:0.3.109-13.el7       libstdc++-devel.x86_64 0:4.8.5-44.el7

Complete!
[root@oracent19c ~]#

 yum install gcc-c++
 yum install glibc-devel.i686
 
 
 
==
mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1

chown -R oracle:oinstall /u01 
chmod -R 775 /u01 

export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOSTNAME=ora19
export ORA_INVENTORY=/u01/app/oraInventory
export TMP=/tmp
export TMPDIR=\$TMP



first 

export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOSTNAME=ora19
export ORA_INVENTORY=/u01/app/oraInventory
export TMP=/tmp
export TMPDIR=\$TMP
cd $ORACLE_HOME <<<<< unzip -oq /path_to_software/LINUX.X64_193000_db_home.zip ./runInstaller -ignorePrereq -waitforcompletion -silent \ -responseFile ${ORACLE_HOME}/install/response/db_install.rsp \ oracle.install.option=INSTALL_DB_SWONLY \ ORACLE_HOSTNAME=${ORACLE_HOSTNAME} \ UNIX_GROUP_NAME=oinstall \ INVENTORY_LOCATION=${ORA_INVENTORY} \ SELECTED_LANGUAGES=en,en_GB \ ORACLE_HOME=${ORACLE_HOME} \ ORACLE_BASE=${ORACLE_BASE} \ oracle.install.db.InstallEdition=EE \ oracle.install.db.OSDBA_GROUP=dba \ oracle.install.db.OSBACKUPDBA_GROUP=dba \ oracle.install.db.OSDGDBA_GROUP=dba \ oracle.install.db.OSKMDBA_GROUP=dba \ oracle.install.db.OSRACDBA_GROUP=dba \ SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \ DECLINE_SECURITY_UPDATES=true Launching Oracle Database 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. installActions2023-10-02_08-18-18AM.log ACTION: Identify the list of failed prerequisite checks from the log: installActions2023-10-02_08-18-18AM.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/app/oracle/product/19.1/db_1/install/response/db_2023-10-02_08-18-18AM.rsp You can find the log of this install session at: /tmp/InstallActions2023-10-02_08-18-18AM/installActions2023-10-02_08-18-18AM.log As a root user, execute the following script(s): 1. /u01/app/oraInventory/orainstRoot.sh 2. /u01/app/oracle/product/19.1/db_1/root.sh Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes: [oem2] Execute /u01/app/oracle/product/19.1/db_1/root.sh on the following nodes: [oem2] [root@oem2 oracle]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete. [root@oem2 oracle]# /u01/app/oracle/product/19.1/db_1/root.sh Check /u01/app/oracle/product/19.1/db_1/install/root_oem2_2023-10-02_08-19-29-677094342.log for the output of root script [root@oem2 oracle]#

Oracle DBA

anuj blog Archive