This article presents installation of Oracle database 12C(12.1) on Fedora 22.
Read following article to install Fedora 22 Linux: Install Fedora 22(for comfort set 4G memory for your virtual machine).
This article presents installation of Oracle database 12C(12.1) on Fedora 22.
Read following article to install Fedora 22 Linux: Install Fedora 22(for comfort set 4G memory for your virtual machine).
This article presents how to install and configure Apex for version 5.0.X for Oracle 11G
Prepare software to installation
Download installation package from Oracle site and unzip.
Download apex_5.0.X.zip to directory /tmp and unzip it from
http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html
cd /tmp
unzip <downloaded software>
After unzip is completed a new directory will be created /tmp/apex so go to this directory and log into database as SYSDBA. Always use SYSDBA account for running all scripts.
cd /tmp/apex sqlplus / as sysdba
Pre-installation steps
It’s recommended to do backup of the database and disable the Oracle XMLDB HTTP server by setting the HTTP port to 0.
EXEC DBMS_XDB.SETHTTPPORT(0);
This article presents how to install Oracle 12C Release 1 in silent mode.
Silent mode installation allows to configure necessary Oracle components without using graphical interface nor any interaction with end user. It’s very useful method especially when you want to prepare standard installation using shell scripts.
Read following article to install OEL6 Linux: Install Oracle Linux 6 64 bit(for comfort set 4G memory for your virtual machine). During OEL6 installation I drop user oracle and both group dba and oinstall.
Software
Software for 12CR1 is available on OTN or edelivery
Database software
linuxamd64_12102_database_1of2.zip linuxamd64_12102_database_2of2.zip
Requirements
Be sure you fulfil following:
In Oracle 12C it’s possible to define LOB storage method during import time independent from export settings.
It gives more flexibility during importing data.
impdp .. TRANSFORM=LOB_STORAGE:SECUREFILE|BASICFILE|DEFAULT|NO_CHANGE
Example
Imports data and sets LOBs as SECUREFILE
impdp hr/hr DIRECTORY=dpdump_dir DUMPFILE=hr.dmp TRANSFORM=LOB_STORAGE:SECUREFILE
Have a fun 🙂
Tomasz
In Oracle 12C it’s possible to specify during import compressions settings for a table independent from export settings.
It gives more flexibility during importing data.
impdp .. TRANSFORM=TABLE_COMPRESSION_CLAUSE:NONE|"<compression type>"
Example
Import data with dedicated compression type
impdp hr/hr DIRECTORY=dpdump_dir DUMPFILE=hr.dmp TRANSFORM=TABLE_COMPRESSION_CLAUSE:"ROW STORE COMPRESS"
Have a fun 🙂
Tomasz
There is new option to pass in silent mode encryption password in Oracle 12C during exporting sensitive data. In new version user is asked about password during execution of export.
expdp ... ENCRYPTION_PWD_PROMPT=Y ... ... Password: <user is asked for encryption password>
In previous version encryption password was explicit passed to expdp using parameter ENCRYPTION_PASSWORD. So could be visible via ps command or in a expdp parameter script.
Features:
Have a fun 🙂
Tomasz
This feature extends functionality of Data Pump 12C. It allows to export views as tables.
expdp .. VIEWS_AS_TABLES=[schema_name.]view_name ...
Features
Examples
Export of view emp_view”as table and table departments
expdp hr/hr DIRECTORY=dpdump_dir DUMPFILE=hr.dmp VIEWS_AS_TABLES=emp_view TABLES=departments
Export of two views as tables emp_view and oe.orders_v
expdp hr/hr DIRECTORY=dpdump_dir DUMPFILE=hr.dmp VIEWS_AS_TABLES=emp_view,oe.orders_v
Import of exported view as table emp_view and rename the table as emp_new_table
impdp hr/hr DIRECTORY=dpdump_dir DUMPFILE=hr.dmp VIEWS_AS_TABLES=emp_view REMAP_TABLE=emp_view:emp_new_table
Import through data base link db_link via view emp_v and loading it directly to existing table employees
impdp hr/hr VIEWS_AS_TABLE=emp_v NETWORK_LINK=db_link REMAP_TABLE=emp_v:employees TABLE_EXISTS_ACTION=append
Have a fun 🙂
Tomasz
It’s very nice feature available in Data Pump 12C. It allows to disable generation of redo logs during import of a data into database.
impdp .. TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y|N[:TABLE|INDEX]
Features
Examples
Disable logging for whole imported file so for tables and indexes
impdp hr/hr DIRECTORY=dpdump_dir DUMPFILE=hr.dmp SCHEMAS=hr TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y
Disable logging just for indexes
impdp hr/hr DIRECTORY=dpdump_dir DUMPFILE=hr.dmp SCHEMAS=hr TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y:INDEX
Disable logging just for indexes – different way
impdp hr/hr DIRECTORY=dpdump_dir DUMPFILE=hr.dmp SCHEMAS=hr TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y TRANSFORM=DISABLE_ARCHIVE_LOGGING:N:TABLE
Have a fun 🙂
Tomasz
New privileges READ, READ ANY TABLE have appeared in Oracle Database 12c.
They are available since release 12.1.0.2.
They work almost the same as standard SELECT and SELECT ANY TABLE except SELECT and SELECT ANY TABLE can do additionally
--acquires exclusive lock on a table LOCK TABLE <TABLE_NAME> IN EXCLUSIVE MODE; --acquires row lock on a table rows SELECT … FROM <TABLE_NAME> FOR UPDATE;
So simple grant SELECT lets users to make harm(can block other users) in a database just by executing above commands. It’s time to start using READ and READ ANY TABLE to avoid it and improve security.
You can grant/revoke them to the same objects like SELECT:
GRANT READ ON test_table TO tomasz; GRANT READ ON test_view TO tomasz; GRANT READ ANY TABLE TO tomasz; REVOKE READ ON test_view FROM tomasz; REVOKE READ ANY TABLE FROM tomasz;
Have a fun 🙂
Tomasz
This article presents SWITCHOVER and FAILOVER methods available for physical standby database in Oracle Database 12C release 1.
This article is based on following article: Configure physical standby database Oracle Database 12C release 1 (12.1)
Optional step – Turn on flashback logs on standby and primary database
--primary database SYS@ORA12C> ALTER DATABASE FLASHBACK ON; SELECT flashback_on FROM v$database; FLASHBACK_ON ------------------ YES
--standby database SYS@SORA12C> --cancel recovery mode and turn on flashback log ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; ALTER DATABASE FLASHBACK ON; SELECT flashback_on FROM v$database; FLASHBACK_ON ------------------ YES --restore recovery mode ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;