Skip to content

Posts from the ‘Administration’ Category

can’t spawn cmd.exe no such file or directory Database upgrade to 19c

When i am trying to upgrade database from 12.2.0.1.0 to 19.3.0.0.0 using dbua which is running on window server 2016. I am facing the below issue during upgrade.

the database upgrade component failed during 28% of the upgrade process. So i looked the upgrade log file, the below errors occured

Can’t spawn “cmd.exe”: No such file or directory at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catctl.pl line 11024.

DERIVED ORACLE HOME catctl = [E:\app\WINDOWS.X64_193000_db_home]
Can’t spawn “cmd.exe”: No such file or directory at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catctl.pl line 11024.
Can’t spawn “cmd.exe”: No such file or directory at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catctl.pl line 11024.
catctlGetOraBaseLogDir = [C:\Users\mazar\AppData\Local\Temp\5]

Analyzing file E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catupgrd.sql

Log file directory = [E:\app\oracle\cfgtoollogs\dbua\upgrade2020-10-07_04-54-01PM\SIEBUATDB]

catcon::set_log_file_base_path: ALL catcon-related output will be written to [E:\app\oracle\cfgtoollogs\dbua\upgrade2020-10-07_04-54-01PM\SIEBUATDB\catupgrd3R_catcon_26224.lst]

catcon::set_log_file_base_path: catcon: See [E:\app\oracle\cfgtoollogs\dbua\upgrade2020-10-07_04-54-01PM\SIEBUATDB\catupgrd3R*.log] files for output generated by scripts

catcon::set_log_file_base_path: catcon: See [E:\app\oracle\cfgtoollogs\dbua\upgrade2020-10-07_04-54-01PM\SIEBUATDB\catupgrd3R_*.lst] files for spool files, if any

Unexpected error encountered in catctlMain; Error Stack Below; exiting
open2: IO::Pipe: Can’t spawn-NOWAIT: No such file or directory at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin/catcon.pm line 1137.
at E:/app/WINDOWS.X64_193000_db_home/perl/lib/IPC/Open3.pm line 336, line 1.
eval {…} called at E:/app/WINDOWS.X64_193000_db_home/perl/lib/IPC/Open3.pm line 335
IPC::Open3::_open3(“open2”, GLOB(0x171befc2c88), GLOB(0x171befc2c70), “>&STDERR”, “E:\app\WINDOWS.X64_193000_db_home\bin\sqlplus.EXE /nolog”) called at E:/app/WINDOWS.X64_193000_db_home/perl/lib/IPC/Open2.pm line 117
IPC::Open2::open2(GLOB(0x171befc2c70), GLOB(0x171befc2c88), “E:\app\WINDOWS.X64_193000_db_home\bin\sqlplus.EXE /nolog”) called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin/catcon.pm line 1137
catcon::exec_DB_script(ARRAY(0x171befc3bc0), “C:A:T:C:O:N”, “\x{a}host sqlplus/nolog -v >”, “E:\app\oracle\cfgtoollogs\dbua\upgrade2020-10-07_04-54-01PM\S”…, “E:\app\WINDOWS.X64_193000_db_home\bin\sqlplus.EXE”) called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin/catcon.pm line 1408
catcon::get_instance_status_and_name(ARRAY(0x171bf4b9e78), “\x{a}host sqlplus/nolog -v >”, “E:\app\oracle\cfgtoollogs\dbua\upgrade2020-10-07_04-54-01PM\S”…, “E:\app\WINDOWS.X64_193000_db_home\bin\sqlplus.EXE”) called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin/catcon.pm line 13012
catcon::catconInit2(HASH(0x171bf91a8f0)) called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin/catcon.pm line 12249
catcon::catconInit(“sys”, undef, “E:\app\WINDOWS.X64_193000_db_home\rdbms\admin”, “E:\app\oracle\cfgtoollogs\dbua\upgrade2020-10-07_04-54-01PM\S”…, “catupgrd3R”, 0, 0, 4, …) called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catctl.pl line 3696
main::catctlDBLogon(“E:\app\WINDOWS.X64_193000_db_home\rdbms\admin”, “E:\app\oracle\cfgtoollogs\dbua\upgrade2020-10-07_04-54-01PM\S”…, “catupgrd3R”, 0, 0, 4) called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catctl.pl line 3774
main::catctlLogon() called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catctl.pl line 1414
main::catctlMain() called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catctl.pl line 1362
eval {…} called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catctl.pl line 1360
at E:/app/WINDOWS.X64_193000_db_home/perl/lib/IPC/Open2.pm line 117, line 1.
IPC::Open2::open2(GLOB(0x171befc2c70), GLOB(0x171befc2c88), “E:\app\WINDOWS.X64_193000_db_home\bin\sqlplus.EXE /nolog”) called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin/catcon.pm line 1137
catcon::exec_DB_script(ARRAY(0x171befc3bc0), “C:A:T:C:O:N”, “\x{a}host sqlplus/nolog -v >”, “E:\app\oracle\cfgtoollogs\dbua\upgrade2020-10-07_04-54-01PM\S”…, “E:\app\WINDOWS.X64_193000_db_home\bin\sqlplus.EXE”) called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin/catcon.pm line 1408
catcon::get_instance_status_and_name(ARRAY(0x171bf4b9e78), “\x{a}host sqlplus/nolog -v >”, “E:\app\oracle\cfgtoollogs\dbua\upgrade2020-10-07_04-54-01PM\S”…, “E:\app\WINDOWS.X64_193000_db_home\bin\sqlplus.EXE”) called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin/catcon.pm line 13012
catcon::catconInit2(HASH(0x171bf91a8f0)) called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin/catcon.pm line 12249
catcon::catconInit(“sys”, undef, “E:\app\WINDOWS.X64_193000_db_home\rdbms\admin”, “E:\app\oracle\cfgtoollogs\dbua\upgrade2020-10-07_04-54-01PM\S”…, “catupgrd3R”, 0, 0, 4, …) called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catctl.pl line 3696
main::catctlDBLogon(“E:\app\WINDOWS.X64_193000_db_home\rdbms\admin”, “E:\app\oracle\cfgtoollogs\dbua\upgrade2020-10-07_04-54-01PM\S”…, “catupgrd3R”, 0, 0, 4) called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catctl.pl line 3774
main::catctlLogon() called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catctl.pl line 1414
main::catctlMain() called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catctl.pl line 1362
eval {…} called at E:\app\WINDOWS.X64_193000_db_home\rdbms\admin\catctl.pl line 1360

Solution :

system32 path variable not set properly. Even If i tried to run as administrator in command prompt from explorer, its not work. usually if we’re open run as administrator from explorer, it will go to C:\Windows\System32> path. but my system, its gone to default path my user.

go to

C:\Windows\System32\cmd as run as administrator, now its working.

Upgrade Oracle Application Express (APEX) manually before the database upgrade

While doing upgrade database from 12c to 19c

Upgrade Oracle Application Express (APEX) manually before the database upgrade.

The database contains APEX version 5.0.4.00.12. Upgrade APEX to at least version 18.2.0.00.12.

Starting with Oracle Database Release 18, APEX is not upgraded automatically as part of the database upgrade. Refer to My Oracle Support Note 1088970.1 for information about APEX installation and upgrades.

 

Solution :

Download APEX  18.2

https://www.oracle.com/tools/downloads/apex-v182-archive-downloads.html

 

Install & Upgrade’

move the OLD apex to different location or renam apex to apex_old

Extract the apex and copy to oracle home path.

as administrator

@apexins.sql SYSAUX SYSAUX TEMP /i/

 

ORA-28056: Writing audit records to Windows Event Log failed

I am trying to recover a table using by RMAN but I am getting the below issue

Database version : 12.2.0.1.0

OS : Windows 10

Error :

RMAN> RECOVER TABLE TBSPIR.’TEST’
2> UNTIL time “to_date(’14-JUL-2019 14:20:10′,’DD-MON-YYYY HH24:MI:SS’)”
3> AUXILIARY DESTINATION ‘C:\app\tbspir’
4> REMAP TABLE ‘TBSPIR’.’TEST’:’TEST_PREV’;

 

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 07/16/2019 11:16:42
RMAN-04006: error from auxiliary database: ORA-28056: Writing audit records to Windows Event Log failed
OSD-32762: Message 32762 not found; product=RDBMS; facility=SOSD
ORA-28056: Writing audit records to Windows Event Log failed
OSD-32762: Message 32762 not found; product=RDBMS; facility=SOSD

O/S-Error: (OS 2) The system cannot find the file specified.

 

Solution :

I tried to clear the Event log also from Event viewer but still I am getting the error.

I checked the Administrative events logs, it says

“RegOpenKeyExW(-2147483646,SYSTEM\CurrentControlSet\Services\VSS\Diag,…)
0x80070005, Access is denied.
Operation: Initializing Writer Context: Writer Class Id: {26d02976-b909-43ad-af7e-62a4f625e372} Writer Name: Oracle VSS Writer – AUDITDB Writer Instance Name: AUDITDB Writer Instance ID: {14455cba-5261-40a8-ac65-523b293f70a3}
2D20436F64653A20524547524547534330303030303135342D2043616C6C3A20524547524547534330303030303132372D205049443A202030303030383338382D205449443A202030303031333033322D20434D443A2020633A5C6170705C6F7261636C655C70726F647563745C31322E322E305C6462686F6D655F315C62696E5C4F7261565353572E65786520415544495444422020202D20557365723A204E616D653A204C542D30312D30392D3939354538355C6F7261636C652C205349443A532D312D352D32312D343130383139383137352D323935333532383932312D323739333936353832302D31303032 ”

 

The Oracle services are running by Oracle os user. this user doesn’t have administrative privilege So I decided to run the Oracle Services by Local Account.

Shutdown the database

Start the services as below

After I started the database service, Now I can able to recover the table

 

RMAN> RECOVER TABLE TBSPIR.’TEST’
2> UNTIL time “to_date(’14-JUL-2019 14:20:10′,’DD-MON-YYYY HH24:MI:SS’)”
3> AUXILIARY DESTINATION ‘C:\app\tbspir’
4> REMAP TABLE ‘TBSPIR’.’TEST’:’TEST_PREV’;

Starting recover at 16-JUL-19
using channel ORA_DISK_1
RMAN-05026: warning: presuming following set of tablespaces applies to specified point-in-time

List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1

Creating automatic instance, with SID=’atch’

initialization parameters used for automatic instance:
db_name=AUDITDB
db_unique_name=atch_pitr_AUDITDB
compatible=12.2.0
db_block_size=8192
db_files=200
diagnostic_dest=C:\APP\ORACLE
_system_trig_enabled=FALSE
sga_target=4880M
processes=200
db_create_file_dest=C:\app\tbspir
log_archive_dest_1=’location=C:\app\tbspir’
#No auxiliary parameter file used

starting up automatic instance AUDITDB

Oracle instance started

Total System Global Area 5117050880 bytes

Fixed Size 8757424 bytes
Variable Size 989859664 bytes
Database Buffers 4110417920 bytes
Redo Buffers 8015872 bytes
Automatic instance created

contents of Memory Script:
{
# set requested point in time
set until time “to_date(’14-JUL-2019 14:20:10′,’DD-MON-YYYY HH24:MI:SS’)”;
# restore the controlfile
restore clone controlfile;

# mount the controlfile
sql clone ‘alter database mount clone database’;

# archive current online log
sql ‘alter system archive log current’;
}
executing Memory Script

executing command: SET until clause

Starting restore at 16-JUL-19
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=5 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\AUTOBACKUP\2019_07_14\O1_MF_S_1013609684_GLP3O4QD_.BKP
channel ORA_AUX_DISK_1: piece handle=C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\AUTOBACKUP\2019_07_14\O1_MF_S_1013609684_GLP3O4QD_.BKP tag=TAG20190714T141444
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=C:\APP\TBSPIR\AUDITDB\CONTROLFILE\O1_MF_GLVBVD9W_.CTL
Finished restore at 16-JUL-19

sql statement: alter database mount clone database

sql statement: alter system archive log current

contents of Memory Script:
{
# set requested point in time
set until time “to_date(’14-JUL-2019 14:20:10′,’DD-MON-YYYY HH24:MI:SS’)”;
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile 1 to new;
set newname for clone datafile 5 to new;
set newname for clone datafile 3 to new;
set newname for clone tempfile 1 to new;
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 5, 3;

switch clone datafile all;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

renamed tempfile 1 to C:\APP\TBSPIR\AUDITDB\DATAFILE\O1_MF_TEMP_%U_.TMP in control file

Starting restore at 16-JUL-19
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to C:\APP\TBSPIR\AUDITDB\DATAFILE\O1_MF_SYSTEM_%U_.DBF
channel ORA_AUX_DISK_1: restoring datafile 00005 to C:\APP\TBSPIR\AUDITDB\DATAFILE\O1_MF_UNDOTBS1_%U_.DBF
channel ORA_AUX_DISK_1: restoring datafile 00003 to C:\APP\TBSPIR\AUDITDB\DATAFILE\O1_MF_SYSAUX_%U_.DBF
channel ORA_AUX_DISK_1: reading from backup piece C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\BACKUPSET\2019_07_14\O1_MF_NNNDF_TAG20190714T141427_GLP3NMT4_.BKP
channel ORA_AUX_DISK_1: piece handle=C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\BACKUPSET\2019_07_14\O1_MF_NNNDF_TAG20190714T141427_GLP3NMT4_.BKP tag=TAG20190714T141427
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15
Finished restore at 16-JUL-19

datafile 1 switched to datafile copy
input datafile copy RECID=4 STAMP=1013780914 file name=C:\APP\TBSPIR\AUDITDB\DATAFILE\O1_MF_SYSTEM_GLVBVLX5_.DBF
datafile 5 switched to datafile copy
input datafile copy RECID=5 STAMP=1013780914 file name=C:\APP\TBSPIR\AUDITDB\DATAFILE\O1_MF_UNDOTBS1_GLVBVLXR_.DBF
datafile 3 switched to datafile copy
input datafile copy RECID=6 STAMP=1013780914 file name=C:\APP\TBSPIR\AUDITDB\DATAFILE\O1_MF_SYSAUX_GLVBVLXJ_.DBF

contents of Memory Script:
{
# set requested point in time
set until time “to_date(’14-JUL-2019 14:20:10′,’DD-MON-YYYY HH24:MI:SS’)”;
# online the datafiles restored or switched
sql clone “alter database datafile 1 online”;
sql clone “alter database datafile 5 online”;
sql clone “alter database datafile 3 online”;
# recover and open database read only
recover clone database tablespace “SYSTEM”, “UNDOTBS1”, “SYSAUX”;
sql clone ‘alter database open read only’;
}
executing Memory Script

executing command: SET until clause

sql statement: alter database datafile 1 online

sql statement: alter database datafile 5 online

sql statement: alter database datafile 3 online

Starting recover at 16-JUL-19
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 84 is already on disk as file C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\ARCHIVELOG\2019_07_14\O1_MF_1_84_GLP3O30R_.ARC
archived log for thread 1 with sequence 85 is already on disk as file C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\ARCHIVELOG\2019_07_14\O1_MF_1_85_GLP4HM4Y_.ARC
archived log file name=C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\ARCHIVELOG\2019_07_14\O1_MF_1_84_GLP3O30R_.ARC thread=1 sequence=84
archived log file name=C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\ARCHIVELOG\2019_07_14\O1_MF_1_85_GLP4HM4Y_.ARC thread=1 sequence=85
media recovery complete, elapsed time: 00:00:00
Finished recover at 16-JUL-19

sql statement: alter database open read only

contents of Memory Script:
{
sql clone “create spfile from memory”;
shutdown clone immediate;
startup clone nomount;
sql clone “alter system set control_files =
”C:\APP\TBSPIR\AUDITDB\CONTROLFILE\O1_MF_GLVBVD9W_.CTL” comment=
”RMAN set” scope=spfile”;
shutdown clone immediate;
startup clone nomount;
# mount database
sql clone ‘alter database mount clone database’;
}
executing Memory Script

sql statement: create spfile from memory

database closed
database dismounted
Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area 5117050880 bytes

Fixed Size 8757424 bytes
Variable Size 989859664 bytes
Database Buffers 4110417920 bytes
Redo Buffers 8015872 bytes

sql statement: alter system set control_files = ”C:\APP\TBSPIR\AUDITDB\CONTROLFILE\O1_MF_GLVBVD9W_.CTL” comment= ”RMAN set” scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area 5117050880 bytes

Fixed Size 8757424 bytes
Variable Size 989859664 bytes
Database Buffers 4110417920 bytes
Redo Buffers 8015872 bytes

sql statement: alter database mount clone database

contents of Memory Script:
{
# set requested point in time
set until time “to_date(’14-JUL-2019 14:20:10′,’DD-MON-YYYY HH24:MI:SS’)”;
# set destinations for recovery set and auxiliary set datafiles
set newname for datafile 7 to new;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 7;

switch clone datafile all;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

Starting restore at 16-JUL-19
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=5 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00007 to C:\APP\TBSPIR\ATCH_PITR_AUDITDB\DATAFILE\O1_MF_USERS_%U_.DBF
channel ORA_AUX_DISK_1: reading from backup piece C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\BACKUPSET\2019_07_14\O1_MF_NNNDF_TAG20190714T141427_GLP3NMT4_.BKP
channel ORA_AUX_DISK_1: piece handle=C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\BACKUPSET\2019_07_14\O1_MF_NNNDF_TAG20190714T141427_GLP3NMT4_.BKP tag=TAG20190714T141427
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 16-JUL-19

datafile 7 switched to datafile copy
input datafile copy RECID=8 STAMP=1013781058 file name=C:\APP\TBSPIR\ATCH_PITR_AUDITDB\DATAFILE\O1_MF_USERS_GLVC0KJR_.DBF

contents of Memory Script:
{
# set requested point in time
set until time “to_date(’14-JUL-2019 14:20:10′,’DD-MON-YYYY HH24:MI:SS’)”;
# online the datafiles restored or switched
sql clone “alter database datafile 7 online”;
# recover and open resetlogs
recover clone database tablespace “USERS”, “SYSTEM”, “UNDOTBS1”, “SYSAUX” delete archivelog;
alter clone database open resetlogs;
}
executing Memory Script

executing command: SET until clause

sql statement: alter database datafile 7 online

Starting recover at 16-JUL-19
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 84 is already on disk as file C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\ARCHIVELOG\2019_07_14\O1_MF_1_84_GLP3O30R_.ARC
archived log for thread 1 with sequence 85 is already on disk as file C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\ARCHIVELOG\2019_07_14\O1_MF_1_85_GLP4HM4Y_.ARC
archived log file name=C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\ARCHIVELOG\2019_07_14\O1_MF_1_84_GLP3O30R_.ARC thread=1 sequence=84
archived log file name=C:\APP\ORACLE\FAST_RECOVERY_AREA\AUDITDB\AUDITDB\ARCHIVELOG\2019_07_14\O1_MF_1_85_GLP4HM4Y_.ARC thread=1 sequence=85
media recovery complete, elapsed time: 00:00:00
Finished recover at 16-JUL-19

database opened

contents of Memory Script:
{
# create directory for datapump import
sql “create or replace directory TSPITR_DIROBJ_DPDIR as ”
C:\app\tbspir””;
# create directory for datapump export
sql clone “create or replace directory TSPITR_DIROBJ_DPDIR as ”
C:\app\tbspir””;
}
executing Memory Script

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ”C:\app\tbspir”

sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ”C:\app\tbspir”

Performing export of tables…
EXPDP> Starting “SYS”.”TSPITR_EXP_atch_pkgA”:
EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
EXPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
EXPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
EXPDP> . . exported “TBSPIR”.”TEST” 5.148 KB 10 rows
EXPDP> Master table “SYS”.”TSPITR_EXP_atch_pkgA” successfully loaded/unloaded
EXPDP> ******************************************************************************
EXPDP> Dump file set for SYS.TSPITR_EXP_atch_pkgA is:
EXPDP> C:\APP\TBSPIR\TSPITR_ATCH_90840.DMP
EXPDP> Job “SYS”.”TSPITR_EXP_atch_pkgA” successfully completed at Tue Jul 16 13:51:38 2019 elapsed 0 00:00:22
Export completed

contents of Memory Script:
{
# shutdown clone before import
shutdown clone abort
}
executing Memory Script

Oracle instance shut down

Performing import of tables…
IMPDP> Master table “SYS”.”TSPITR_IMP_atch_ygqm” successfully loaded/unloaded
IMPDP> Starting “SYS”.”TSPITR_IMP_atch_ygqm”:
IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE
IMPDP> Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
IMPDP> . . imported “TBSPIR”.”TEST_PREV” 5.148 KB 10 rows
IMPDP> Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
IMPDP> Job “SYS”.”TSPITR_IMP_atch_ygqm” successfully completed at Tue Jul 16 13:51:55 2019 elapsed 0 00:00:02
Import completed

Removing automatic instance
Automatic instance removed
auxiliary instance file C:\APP\TBSPIR\AUDITDB\DATAFILE\O1_MF_TEMP_GLVBW55J_.TMP deleted
auxiliary instance file C:\APP\TBSPIR\ATCH_PITR_AUDITDB\ONLINELOG\O1_MF_3_GLVC0OC4_.LOG deleted
auxiliary instance file C:\APP\TBSPIR\ATCH_PITR_AUDITDB\ONLINELOG\O1_MF_2_GLVC0O8G_.LOG deleted
auxiliary instance file C:\APP\TBSPIR\ATCH_PITR_AUDITDB\ONLINELOG\O1_MF_1_GLVC0O6O_.LOG deleted
auxiliary instance file C:\APP\TBSPIR\ATCH_PITR_AUDITDB\DATAFILE\O1_MF_USERS_GLVC0KJR_.DBF deleted
auxiliary instance file C:\APP\TBSPIR\AUDITDB\DATAFILE\O1_MF_SYSAUX_GLVBVLXJ_.DBF deleted
auxiliary instance file C:\APP\TBSPIR\AUDITDB\DATAFILE\O1_MF_UNDOTBS1_GLVBVLXR_.DBF deleted
auxiliary instance file C:\APP\TBSPIR\AUDITDB\DATAFILE\O1_MF_SYSTEM_GLVBVLX5_.DBF deleted
auxiliary instance file C:\APP\TBSPIR\AUDITDB\CONTROLFILE\O1_MF_GLVBVD9W_.CTL deleted
auxiliary instance file tspitr_atch_90840.dmp deleted
Finished recover at 16-JUL-19

RMAN>

 

SQL> select * from tbspir.test_prev;

EMPLOYEE
——————–
xxxx
yyyy
zzzz
wwww
vvvvv
u
ttttt
sssss
rrrr
qqqqq

10 rows selected.

Oracle database 19c step by step installation guide on oracle linux 7.6

Oracle database 19c installation document

Oracle Database 19c step by step installation guide on Oracle Linux 7.6

How to calculate archivelog growth per day

archivelog size each day

select trunc(COMPLETION_TIME) TIME, SUM(BLOCKS * BLOCK_SIZE)/1024/1024 SIZE_MB from V$ARCHIVED_LOG group by trunc(COMPLETION_TIME) order by 1;

archivelog size each hour

alter session set nls_date_format = ‘YYYY-MM-DD HH24′;

select trunc(COMPLETION_TIME,’HH24′) TIME, SUM(BLOCKS * BLOCK_SIZE)/1024/1024 SIZE_MB from V$ARCHIVED_LOG group by trunc (COMPLETION_TIME,’HH24’) order by 1;

Drop all synonym from owner

Drop all synonym from owner

set head off
set newpage none
set pagesize 9999

spool drop_synonym.sql

select ‘drop synonym ‘|| OWNER ||’.’ ||OBJECT_NAME || ‘;’ from dba_objects where OWNER =’OWNER’ and OBJECT_TYPE =’SYNONYM’;

spool off

Databaselink extract

Database link extract

 

SELECT DBMS_METADATA.GET_DDL(‘DB_LINK’,a.db_link,a.owner) FROM dba_db_links a;

 

 

Oracle database 18c yum installation on Oracle linux 7.6

I have downloaded the oracle database 18c rpm package from oracle and have plan to install manually without ULN support.

Installing Oracle Database RPM Manually

 

[root@dbhost1 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.1.9.88 dbhost1.localdomain dbhost1

Download software :

https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle18c-linux-180000-5022980.html

[root@dbhost1 ~]# yum -y install oracle-database-preinstall-18c
BDB2053 Freeing read locks for locker 0xbb: 12147/139929030764352
BDB2053 Freeing read locks for locker 0xbd: 12147/139929030764352
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
–> Running transaction check
—> Package oracle-database-preinstall-18c.x86_64 0:1.0-1.el7 will be installed

–> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
oracle-database-preinstall-18c x86_64 1.0-1.el7 ol7_latest 18 k

Transaction Summary
========================================================================================================================================================================
Install 1 Package

Total download size: 18 k
Installed size: 55 k
Downloading packages:
oracle-database-preinstall-18c-1.0-1.el7.x86_64.rpm | 18 kB 00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : oracle-database-preinstall-18c-1.0-1.el7.x86_64 1/1
Verifying : oracle-database-preinstall-18c-1.0-1.el7.x86_64 1/1

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

Complete!

[root@dbhost1 install]# ls -ltr
total 6874960
drwxr-xr-x 7 oracle oinstall 117 Jan 26 2017 database
-rw-r–r– 1 root root 3586257564 Oct 24 2018 oracle-database-ee-18c-1.0-1.x86_64.rpm
-rwxrwxr-x. 1 oracle oinstall 3453696911 Jun 13 11:45 linuxx64_12201_database.zip

Install database software

[root@dbhost1 install]# yum -y localinstall oracle-database-ee-18c-1.0-1.x86_64.rpm
Loaded plugins: langpacks, ulninfo
Examining oracle-database-ee-18c-1.0-1.x86_64.rpm: oracle-database-ee-18c-1.0-1.x86_64
Marking oracle-database-ee-18c-1.0-1.x86_64.rpm to be installed
Resolving Dependencies
–> Running transaction check
—> Package oracle-database-ee-18c.x86_64 0:1.0-1 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
oracle-database-ee-18c x86_64 1.0-1 /oracle-database-ee-18c-1.0-1.x86_64 7.8 G

Transaction Summary
========================================================================================================================================================================
Install 1 Package

Total size: 7.8 G
Installed size: 7.8 G
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : oracle-database-ee-18c-1.0-1.x86_64 1/1
[INFO] Executing post installation scripts…
[INFO] Oracle home installed successfully and ready to be configured.
To configure a sample Oracle Database you can execute the following service configuration script as root: /etc/init.d/oracledb_ORCLCDB-18c configure
Verifying : oracle-database-ee-18c-1.0-1.x86_64 1/1

Installed:
oracle-database-ee-18c.x86_64 0:1.0-1

Complete!

Oracle Database software created at /opt/oracle/product/18c/dbhome_1

Creating and Configuring an Oracle Database

there is a location to find the details for creating the database,

/etc/init.d/oracledb_ORCLCDB-18c

you can manually edit the db creation configuration. I modified the database name is UATCDB, Pluggable database is UATPDB1
As a root user, create the database.

[root@dbhost1 ~]# /etc/init.d/oracledb_UATCDB-18c configure
Configuring Oracle Database UATCDB.
Prepare for db operation
8% complete
Copying database files
31% complete
Creating and starting Oracle instance
32% complete
36% complete

40% complete
43% complete
46% complete
Completing Database Creation
51% complete
54% complete
Creating Pluggable Databases
58% complete
77% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/opt/oracle/cfgtoollogs/dbca/UATCDB.
Database Information:
Global Database Name:UATCDB
System Identifier(SID):UATCDB
Look at the log file “/opt/oracle/cfgtoollogs/dbca/UATCDB/UATCDB.log” for further details.

Database configuration completed successfully. The passwords were auto generated, you must change them by connecting to the database using ‘sqlplus / as sysdba’ as the oracle user.

Verify database Creation as oracle user

[oracle@dbhost1 ~]$ export ORACLE_HOME=/opt/oracle/product/18c/dbhome_1
[oracle@dbhost1 ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@dbhost1 ~]$ export ORACLE_SID=UATDB
[oracle@dbhost1 ~]$ export ORACLE_SID=UATCDB
[oracle@dbhost1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 – Production on Sun Jun 30 16:03:19 2019
Version 18.3.0.0.0

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

Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 – Production
Version 18.3.0.0.0

SQL> select name from v$database;

NAME
———
UATCDB

SQL> show user con_name
USER is “SYS”

CON_NAME
——————————
CDB$ROOT
SQL> select con_id, name from v$containers;

CON_ID
———-
NAME
——————————————————————————–
1
CDB$ROOT

2
PDB$SEED

3
UATPDB1

SQL>

Oracle database 12c (12.2.0.1.0) step by step installation guide on windows server 2016

Oracle Database 12cR2 installation documentation on Windows Server 2016

Oracle database 12c (12.2.0.1.0) step by step installation guide on windows server 2016

Oracle database 12c (12.2.0.1.0) step by step installation guide on oracle linux 7.6

Installation document :

Oracle Database 12.2.0.1.0 step by step installation guide on oracle linux 7.6

 

Issue faced:

 

[root@dbhost1 ~]# xhost +
access control disabled, clients can connect from any host
[root@dbhost1 ~]# su – oracle
Last login: Mon Jun 17 14:36:55 +03 2019 on pts/1
[oracle@dbhost1 ~]$ cd /u01/install/database/
[oracle@dbhost1 database]$ ./runInstaller
Starting Oracle Universal Installer…

Checking Temp space: must be greater than 500 MB. Actual 35971 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2047 MB Passed
Checking monitor: must be configured to display at least 256 colors
>>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation,

Continue? (y/n) [n] n

User Selected: No

Exiting Oracle Universal Installer, log for this session can be found at /tmp/OraInstall2019-06-17_02-39-33PM/installActions2019-06-17_02-39-33PM.log

solution :

[oracle@dbhost1 database]$ export DISPLAY=:0
[oracle@dbhost1 database]$ ./runInstaller