Database Blog

Oracle Database 19c Patch Release Update – Jan 2021(Patch Id – 32218454)

DESCRIPTION This article we are going to see steps to apply the latest Oracle 19c Database Release Update Patch 32218454 DOWNLOAD THE PATCH FROM ORACLE SUPPORT  CHECK THE CURRENT OPTACH…

Read More

DROP AND RECREATE UNDO

INTRODUCTION: The below steps shows how to drop and recreate undo tablespace, by doing this activity we can gain more space in mount points and the database size will be reduced.   STEP 1: Check the DB size using the below query,   col “Database Size” format a20 col “Free space” format a20 col “Used space” format a20 select round(sum(used.bytes) / 1024 / 1024 / 1024 ) || ‘ GB’ “Database Size” , round(sum(used.bytes) / 1024 / 1024 / 1024 ) – round(free.p / 1024 / 1024 / 1024) || ‘ GB’ “Used space” , round(free.p / 1024 / 1024 / 1024) || ‘ GB’ “Free space” from (select bytes from v$datafile union all select bytes from v$tempfile union all select bytes from v$log) used , (select sum(bytes) as p from dba_free_space) free group by free.p /   STEP 2: Check the list of undo tablespaces using the below query,   column tablespace format a20…

Read More

RMAN Scratch

INTRODUCTION   The below steps will describe how to perform Rman Scratch.   STEP 1: Take a RMAN full backup of the database [oracle@Clone oradata]$ export ORACLE_SID=Product [oracle@Clone oradata]$ sqlplus…

Read More

MOVING DATA FILES AND REDO LOGS

INTRODUCTION:   The activity of moving redo logs online can gain us more space in mount points.   STEPS: STEP 1: Check the size of the mount points using df -h STEP 2: Moving the datafiles without bringing down the database, Issue the following command, ALTER DATABASE MOVE DATAFILE ‘/prdadata01/oracle/PRODA/db/apps_st/sample/sample.dbf’ TO ‘/prdadata01/oracle/PRODA/db/apps_st/data/sample.dbf’;   STEP 3: Moving the redo logs from one mount point to another mount point, Bring down the application node, sh $ADMIN_SCRIPTS_HOME/adstpall.sh apps/<appspassword> Bring down the listener and database lsnrctl stop shut immediate   STEP 4: Issue the following OS command   mv /prdadata02/oracle/PRODA/db/apps_st/data/log01a.dbf to /prdadata01/oracle/PRODA/db/apps_st/data/log01a.dbf mv /prdadata02/oracle/PRODA/db/apps_st/data/log01b.dbf to /prdadata01/oracle/PRODA/db/apps_st/data/log01b.dbf mv /prdadata03/oracle/PRODA/db/apps_st/data/log02b.dbf to /prdadata01/oracle/PRODA/db/apps_st/data/log02b.dbf mv /prdadata03/oracle/PRODA/db/apps_st/data/log02a.dbf to /prdadata01/oracle/PRODA/db/apps_st/data/log02a.dbf…

Read More

DATABASE INCARNATION

In this tutorial we are going to learn about Database incarnation. I have mentioned below about incarnation and its different types of incarnation falls. Then follow below example for how…

Read More

EXPORT DP AND IMPORT DP IN SCHEMAS PARAMETER USING PARFILE 

EXPORT DP AND IMPORT DP IN SCHEMAS PARAMETER USING PARFILE  In this tutorial we are going to learn about how to do export and import datapump using schemas parameter DESCRIPTION: A schema export is specified using the schemas parameter. This is the default export mode. If you have the DATAPUMP_EXP_FULL_DATABASE role, then you can specify a list of schemas, optionally including the schema definitions themselves and also system privilege grants to those schemas. If you do not have the DATAPUMP_EXP_FULL_DATABASE role, then you can export only your own schema. The sys schema cannot be used as a source schema for export jobs. [oracle@oracle ~]$ expdp directory=parexp dumpfile=schema.dmp logfile=schema.log schemas=lockdown Export: Release 12.2.0.1.0 – Production on Tue Sep 22 08:08:55 2020 Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved. Username: lockdown/dba1 Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 – 64bit Production Starting “LOCKDOWN”.”SYS_EXPORT_SCHEMA_04″:  lockdown/******** directory=parexp dumpfile=schema.dmp logfile=schema.log schemas=lockdown Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA…

Read More

EXPORT AND IMPORT DATAPUMP IN DATABASE_LINK PARAMETER

In this blog we are going to learn about the export and import in datapump using database link. DESCRIPTION: A database link , is a schema object in one database that…

Read More

ORACLE DATABSE CLONING USING COLD BACKUP

ORACLE DATABSE CLONING USING COLD BACKUP DESCRIPTION: The Cold database backup is, while taking backup or doing cloning, we need to shutdown the source database. This method is usually used for test server when database is in no archive log mode. First we want to take a backup of control file, note down the data file location, and finally shut down the database in source database side. Second. Transfer the data file, temp file to target database, create a pfile(init.ora) for target database. Then start the target database in no mount stage, then in there recreate a control file, then open the database in reset logs. Send the datafile,log files and control files to target destination: [oracle@oracle trainee]$ scp -r *.log oracle@192.168.1.122:/u01/shan The authenticity of host ‘192.168.1.122 (192.168.1.122)’ can’t be established. RSA key fingerprint is 9b:35:ae:ab:bf:6b:33:b4:43:86:f5:98:8b:bb:11:1c. Are you sure you want to continue connecting (yes/no)? oracle Please type ‘yes’ or ‘no’: yes oracle@192.168.1.122’s password: redo01.log                     100%  200MB   3.1MB/s   01:05 redo02.log                     100%  200MB   4.0MB/s   00:50 redo03.log                     100%  200MB   3.5MB/s   00:58 [oracle@oracle trainee]$ scp -r users01.dbf oracle@192.168.1.122:/u01/shan oracle@192.168.1.122’s password: users01.dbf                  100% 5128KB   5.0MB/s   00:01 [oracle@oracle trainee]$ scp -r undotbs01.dbf oracle@192.168.1.122:/u01/shan oracle@192.168.1.122’s password: undotbs01.dbf               100%   70MB   3.7MB/s   00:19 [oracle@oracle trainee]$ scp -r temp01.dbf oracle@192.168.1.122:/u01/shan oracle@192.168.1.122’s password: temp01.dbf                100%   32MB   2.9MB/s   00:11…

Read More

APEX INSTALLATION(5.1) in ORACLE12c

APEX INSTALLATION(5.1) in ORACLE12c In this blog we are going install the apex 5.1. Here, i have a database with 12c. So here i explained about this install steps at database directly. If we have a database then, follow below steps.…

Read More

MIGARATION FROM WINDOWS TO LINUX(12.1.0.1 TO 19.0.0)

INTRODUCTION Migration of a windows database 12.1.0.1 to linux database of version 19.0.0, below are the steps to perform the migration.   INSTALLED A DATABASE IN WINDOWS AND CHECKED THE…

Read More