ORACLE 12C

How to create a pluggable database in oracle 12c

We can create a pluggable database in an existing multitenant database either using dbca or manually. Here we will show how to do it manually.   STEPS: Connect to the container database:(ROOT)   [oracle@localhost ~]$ sqlplus sys/oracle@cdb1 as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Sun Aug 23 10:27:08 2015 Copyright (c) 1982, 2014, Oracle. All […]

How to install oracle 12c on Linux

Download the 12c software from edelivery :  EDELIVERY LINK   You can refer below oracle doc for installing required rpm packages and setting kernel parameters depending upon os platform ( RHEL 5/6/7) https://docs.oracle.com/database/121/LTDQI/toc.htm Once prerequisites are completed , start runInstaller.     Now you can proceed with multitenant database creation :

How to create a multi tenant database in oracle 12c

If you haven’t installed 12C ORACLE_HOME, then below the below link. Install oracle database 12c software Once installation is done, Let’s create one container database(CDB) with 2 pluggable database (PDBs). $ORACLE_HOME/bin/dbca         Here we will create one container database with 2 Pluggeble databases.         Configure Enterprise manager     […]

truncate table with cascade feature1 in oracle 12c

In oracle 12c TRUNCATE TABLE CASCADE will truncate its child tables, if ON DELETE CASCADE relationship is present on child table. Create one parent and child table with some data SQL> CREATE TABLE DBATEST ( EMPNO number, NAME varchar2(10) , empid number); Table created. SQL> alter table dbatest add constraint emp_pk primary key ( empid); […]

Invisible column in oracle 12c

We have invisible indexes in oracle 11g. But in oracle 12c we invisible column was introuduced.   DEMO:   Lets create a normal table: SQL> create table dbatest ( empno number, name varchar2(10)); Table created. SQL> insert into dbatest values ( 1,’SERY’); 1 row created. SQL> insert into dbatest values ( 2,’MORY’); 1 row created. […]

LOGTIME=ALL parameter in datapump of oracle 12c

LOGTIME :Specifies that messages displayed during export operations be timestamped. It has been introduced in oracle 12c. Valid keyword values are: ALL, [NONE], LOGFILE and STATUS.   EXAMPLE: [oracle@localhost ~]$ expdp dumpfile=logdump.dmp logfile=viewlog.log directory=DUMP schemas=TEST logtime=ALL Export: Release 12.1.0.2.0 – Production on Sat Aug 22 07:19:41 2015 Copyright (c) 1982, 2014, Oracle and/or its affiliates. […]

views_as_tables parameter in datapump of oracle 12c

 VIEWS_AS_TABLES parameter has been introduced in datapump of 12c. With this we can export a view at source database and import as table in target database. Create a view: SQL> create view dba_view( emp_number) as select emp from dbatool; View created. SQL> select owner,object_name,object_type from dba_objects where object_name=’DBA_VIEW’; OWNER OBJECT_NAM OBJECT_TYPE —————— ———- ———————– SYS […]

How to Import data with nologgin option in oracle 12c

A new feature has been added in datapump of oracle 12c. We can import data with nologgin option i.e without generating logs. We sometimes face issue while importing big tables, as it generates lot of archive logs. TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y – This parameter can be used to make the impdp nologging.   check the archive status before […]

How to archive table rows in oracle 12c

In oracle 12c a new feature called In-Database Archiving has been introduced. With this we can archive specific rows of a table as per our requirement. This is very helpful,when table contains lot of historical data and for full scan it is taking a lot of time.Using this we can archive the historical data. We […]

how to use DBMS_PRIVILEGE_CAPTURE to capture privs in oracle 12c

DBMS_PRIVILEGE_CAPTURE: ————————- Oracle 12c introduced the DBMS_PRIVILEGE_CAPTURE package, which helps us in doing privilege analyze and find report on used and unused privileges. In order to use the DBMS_PRIVILEGE_CAPTURE package you must be granted the CAPTURE_ADMIN role. steps involve: —————- CREATE_CAPTURE ENABLE_CAPTURE DISABLE_CAPTURE( after waiting for necessary time) GENERATE_RESULT DROP_CAPTURE Though there are 4 options […]