oracle database 12c new features for 11g dba! - · pdf filebiju thomas oneneck it solutions...
Post on 06-Feb-2018
243 Views
Preview:
TRANSCRIPT
Biju ThomasOneNeck IT Solutions
Oracle Database 12c New Features for 11g DBA!
April 2016
@biju_thomas
©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
• Oracle ACE Director
• Principal Solutions Architect with OneNeck® IT Solutions
• More than 20 years of Oracle database administration experience and over 7 years of E-Business Suite experience
• Author of Oracle12c OCA, Oracle11g OCA, co-author of Oracle10g, 9i, 8i certification books published by Sybex/Wiley.
• Presentations, Articles, Blog, Tweet
• www.oneneck.comwww.bijoos.com
Me!
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.3 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Learn features of Oracle Database 12c that are not top, but
would help you!
As a 11g DBA, what you should know when working with 12c
database (changed behavior or additional functionality)
Many features discussed at high level – once you know what to
look for, “search” always works! (have <90 seconds for each feature)
You leave this room learning at least one (new) feature or
behavior of 12c you never knew before!
Session Objectives
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.4 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Oracle Database 12c R1 (12.1.0.1.0) released June 25, 2013 – Few top features!
Multitenancy - Container and Pluggable Databases
Data Redaction
Adaptive Query Optimization
Table restore using RMAN
Identity Column & Invisible Column
In-Database Archiving, Automatic Data Optimization
Unified Auditing and Policy-based auditing
Flex ASM
Far Sync Standby and Cascaded Standby
Is Database 12c Really New?
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.5 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Released July 2014
Patchset 1 also includes few cool features, with major ones like
Oracle Database In-Memory
Oracle Big Data SQL
Oracle JSON Document Store
Improvements to Oracle Multitenant
Clone Remote PDB
Metadata only PDB clone
Rapid Home Provisioning
Full database caching
Database 12c R1 Patchset 1 (12.1.0.2)
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.6 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
READ Object Privilege, READ ANY TABLE system privilege
SELECT privilege also includes privilege to lock LOCK TABLE <table_name> IN EXCLUSIVE MODE;
SELECT ... FROM <table_name> FOR UPDATE;
READ privilege is more secure, a true READ ONLY privilege!
Grants and Revokes work similar to SELECT grants.
No, there is no READ statement to go with the privilege, you still use the SELECT statement
SQL> GRANT READ ON XX.XXLE_CUSTOMERS_T TO smith;
SQL> GRANT READ ANY TABLE TO peter;
SQL> REVOKE READ ON XX.XXLE_SUPPLIERS_VW FROM smith;
SQL> REVOKE READ ANY TABLE FROM peter;
READ Privilege (12.1.0.2)1
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.7 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
By default, undo information on global temporary-table DML operations are stored in the undo tablespace, similar to undo operations on persistent tables.
Temporary Undo2
Temp TablespaceUndo Tablespace
Tempoarary TableUndo Segment
Redo Buffer Redo Log Files
Archive Log Files
Undo
Red
o
DML
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.8 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
New parameter TEMP_UNDO_ENABLED
Undo information generated by DML operations on temporary tables stored in the temporary tablespace; therefore, no redo is generated for the undo operation.
Reduces the amount of undo data stored in
the undo tablespaces, and the amount
of redo from the undo.
Parameter is session modifiable.
Temporary Undo2
Temp Tablespace
Tempoarary Table
Undo Segment
Un
do
DML
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.9 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
File move (rename) in 11g Take tablespace offline
Use OS command to copy or move file – DBA does copy outside database
Use SQL to update the controlfile
ALTER DATABASE RENAME FILE or
ALTER TABLESPACE … RENAME DATAFILE
Bring tablespace online
To move files belonging the SYSTEM, do in MOUNT mode.
File move in 12c Just one step – no unavailability!
ALTER DATABASE MOVE DATAFILE 'x' TO 'y'
The “TO” clause is optional – if omitted, file is moved to DB_CREATE_FILE_DEST as OMF.
Online Data File Move3
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.10 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Files belonging to SYSTEM tablespace can be moved using
ALTER DATABASE MOVE DATAFILE, online!
MOVE DATAFILE syntax allows only 1 file move at a time. You
can still move multiple files with ALTER DATABASE
RENAME FILE or ALTER TABLESPACE RENAME
DATAFILE options – but offline mode.
File can be moved from file system to ASM disk group, and
vice versa.
File can be moved from one diskgroup to another in ASM.
Optional KEEP clause to keep the data file at the source.
More to File Move in 12c…3
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.11 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Security related values in the USER$ table are [as existed in 11gR2]:
CTIME: Date & Time when user was created
PTIME: Date & Time when user password was last changed
LTIME: Date & Time when the user account was locked
LCOUNT: Number of failed login attempts
SPARE4: Encrypted case sensitive password 11g version
PASSWORD: Encrypted case insensitive password 10g version
Added in Oracle Database 12c:
SPARE6: Last login time of the user.
Displayed when you invoke SQL*Plus
Last Login Time
$ sqlplus hr/hr
SQL*Plus: Release 12.1.0.1.0 Production on Tue Jul 9 23:34:32 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Last Successful login time: Tue Dec 09 2013 23:34:22 -05:00Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL>
4
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.12 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
New CASCADE clause for TRUNCATE
Truncates all child tables that reference truncated table.
Foreign key must be defined with ON DELETE CASCADE option
Foreign key must be in ENABLED status.
Children, grand children are truncated
Cascaded TRUNCATE5
In Oracle Database 11gR2 and earlier versions, the TRUNCATE statement
had the following two restrictions along with few others.
You cannot truncate the parent table of an enabled foreign key
constraint. You must disable the constraint before truncating the table.
An exception is that you can truncate the table if the integrity
constraint is self-referential.
You cannot truncate the parent table of a reference-partitioned table.
You must first drop the reference-partitioned child table.
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.13 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
More DDL statements support ONLINE Dropping an index (DROP INDEX ... ONLINE)
Marking an index as UNUSABLE (using ALTER INDEX ... UNUSABLE ONLINE)
Marking a column as UNUSED (ALTER TABLE ... SET UNUSED ... ONLINE)
Dropping a constraint (ALTER TABLE ... DROP ... ONLINE)
Moving a table partition (ALTER TABLE ... MOVE PARTITION ... ONLINE)
Moving a table subpartition (ALTER TABLE ... MOVE SUBPARTITION ... ONLINE)
Do More w/o Waiting6
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.14 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Merge Multiple Partitions
Split Multiple Partitions
Multiple Partition Management7
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.15 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Add Multiple partitions
Drop Multiple Partitions
Truncate Multiple Partitions
More Partition Management8
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.16 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
New parameter PGA_AGGREGATE_LIMIT
Specifies a limit on the aggregate PGA memory consumed by the instance
Default Value: Greater of
2 GB
200% of PGA_AGGREGATE_TARGET
3 MB times the PROCESSES parameter.
It will not exceed 120% of the physical memory size minus the total SGA size.
PGA_AGGREGATE_TARGET maintains the same behavior as 11g - specifies the target aggregate PGA memory available to all server processes attached to the instance.
Limit PGA9
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.17 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
New mandatory background process LREG
Registers information about the database instance and dispatcher processes with the Oracle Net Listener
When an instance starts, LREG polls the listener to determine whether it is running. If the listener is running, then LREG passes it relevant parameters. If it is not running, then LREG periodically attempts to contact it.
Manual listener registration using ALTER SYSTEM REGISTER – same as in 11g.
In 11g, PMON process had this responsibility.
Listener Registration10
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.18 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
There can be up to 100 Database Writer Processes (configured using DB_WRITER_PROCESSES parameter).
The names of the first 36 Database Writer Processes are DBW0-DBW9 and DBWa-DBWz.
The names of the 37th through 100th Database Writer Processes are BW36-BW99.
Useful for systems that modify data heavily.
In 11gR2, the limit was 36.
More DB Writer Processes11
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.19 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Can create B-Tree and Bitmap indexes on same set of columns
Partitioned and Non-partitioned indexes
Locally partitioned and Globally partitioned indexes
Indexes that differ in partitioning type (range vs hash)
Unique and Non-unique indexes
Only one index on the same set of columns can be visible at any point in time.
If you are creating a visible index, then any existing indexes on the set of columns must be invisible. Alternatively, you can create an invisible index on the same set of columns.
Multiple Indexes on Same Column12
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.20 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
In #DB12c statistics are automatically created as part of a bulk load operation such as
CREATE TABLE AS SELECT operation or
INSERT INTO ... SELECT operation
Operation must be on an empty table.
Basic statistics on the table gathered, but non-default statistics such as histograms are not calculated.
Automatic Stats During Bulk Load13
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.21 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
New function APPROX_COUNT_DISTINCT (<expr>)
Returns the approximate number of rows that contain distinct values of <expr>.
Alternative to the COUNT (DISTINCT <expr>) function, which returns the exact number of rows that contain distinct values of <expr>.
APPROX_COUNT_DISTINCT processes large amounts of data significantly faster than COUNT, with negligible deviation from the exact result.
SQL> SELECT APPROX_COUNT_DISTINCT (item_id) AS
"Items Ordered" FROM order_lines;
Faster (Approximate) Count – 12.1.0.214
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.22 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
VARCHAR2 [and NVARCHAR2, RAW] column width up to 32767 bytes
Parameter MAX_STRING_SIZE = EXTENDED – must change only when the database is started in UPGRADE mode
Once enabled, no going back
Invalidates views and materialized views, compile after change.
Individual PDBs in a CDB can have different setting
Bigger VARCHAR215
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.23 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
ALTER PLUGGABLE DATABASE CLOSE [IMMEDIATE]
ALTER PLUGGABLE DATABASE OPEN UPGRADE
Change the setting of MAX_STRING_SIZE to EXTENDED
Run the ?/rdbms/admin/utl32k.sql script as SYSDBA.
ALTER PLUGGABLE DATABASE CLOSE ALTER PLUGGABLE DATABASE OPEN
Changing MAX_STRING_SIZE
Shutdown database Start the database in UPGRADE
mode Change the setting of
MAX_STRING_SIZE to EXTENDED
Run the ?/rdbms/admin/utl32k.sql script as SYSDBA.
Restart the database in normal mode.
15
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.24 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
ENABLE_DDL_LOGGING
Introduced in 11g
Writes DDL statements to Alert log
What’s different in 12c?
Instead of alert log, writes to DDL log directory in ADR
<ADR Home>/log/ddl
File log.xml
The Catch:
Either Database Lifecycle Management Pack or Change Management Pack must be licensed
DDL Logging
$ cat log.xml
<msg time='2014-04-29T16:48:23.352-07:00' org_id='oracle' comp_id='rdbms'
msg_id='opiexe:4181:2946163730' type='UNKNOWN' group='diag_adl'
level='16' host_id='emcc.example.com' host_addr='10.0.2.15'
version='1'>
<txt>create table biju_test (n number)
</txt>
</msg>
16
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.25 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Use adrci : New option – SHOW LOG
Default shows all logs – ddl, debug and test
Filter ddl logs using –l. Further filter using the –p option
Try “help show log” to see all predicate string options with -p
Viewing DDL Log
adrci> show log -l ddl -p "message_text like '%biju%'"
ADR Home = /u02/app/oracle/diag/rdbms/ocadb1/ocadb1:
****************************************************************
Output the results to file: /tmp/utsout_4170_140592_1.ado
adrci>
2014-04-29 16:48:23.352000 -07:00
create table biju_test (n number)
2014-04-29 16:48:31.853000 -07:00
drop table biju_test
17
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.26 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
New Parameter: THREADED_EXECUTION (YES/NO)
Allows multiple background processes to share a single OS process on Unix, similar to Windows.
In default process models, SPID and STID columns of V$PROCESS will have the same values, whereas in multithreaded models, each SPID (process) will have multiple STID (threads) values.
The EXECUTION_TYPE column in V$PROCESS will show THREAD.
V$BGPROCESS shows the background processes.
Listener.ora should have DEDICATED_THROUGH_BROKER_<listener-name>=ON
Cannot Login ‘/ AS SYSDBA’ Must use SYS AS SYSDBA
Multi-threaded Processes18
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.27 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Columns can be invisible (ALTER TABLE, CREATE TABLE syntax – INVISIBLE)
Not supported on temporary and external tables
Specify explicitly in INSERT, SELECT clauses
SQL*Plus: SET COLINVISIBLE ON
When you make an INVISIBLE column in Oracle 12c database to VISIBLE, the COL# is assigned the highest available. Thus the column becomes the last column in the table (not storage, only display). So, if you accidentally make a column INVISIBLE and correct it by changing to VISIBLE, the column order changes. So, if the application uses "SELECT *" or "INSERT" without column names, they might break!
Invisible Columns19
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.28 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
New clause in SELECT statement
Follows the ORDER BY clause
[ OFFSET offset { ROW | ROWS } ]
[ FETCH {FIRST | NEXT} [ {rowcount | percent
PERCENT} ]
{ ROW | ROWS } { ONLY | WITH TIES } ]
OFFSET clause is used to skip the specified number of rows before the limiting begins.
FETCH clause can specify the number of rows to return or a percentage of rows to return.
ONLY specifies to return exact number or percent of rows to return.
WITH TIES specifies to return all rows that have the same sort keys as the last row of the row-limited result set.
Row Limiting Clause
http://bijoos.com/oraclenotes/2013/95
20
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.29 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Row Limiting Examples20
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.30 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
“datapatch” to run post patch scripts
Will automatically determine post scripts and actions
MOS Note “Datapatch: Database 12c Post Patch SQL Automation (Doc ID 1585822.1)”
Queryable patch inventory using DBMS_QOPATCH Package
Shows all the patch information available as part of the OPATCH LSINVENTORY -XML command.
Queryable Patch Inventory requires Oracle database instance to be open in read/write mode.
MOS Note “Oracle Database 12.1 : FAQ on Queryable Patch Inventory (Doc ID 1530108.1)”
Enhanced Patching21
GET_OPATCH_LIST
PATCH_CONFLICT_DETECTION
GET_SQLPATCH_STATUS
GET_OPATCH_PREQS
GET_OPATCH_LSINVENTORY
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.31
Security Defaults
AUDIT_SYS_OPERATIONS defaults to TRUE in #Oracle 12c
AUDIT_ADMIN and AUDIT_VIEWER Security Roles
utlpwdmg.sql script creates ora12c_verify_function and ora12c_strong_verify_function
RESOURCE Role No Longer Grants the UNLIMITED TABLESPACE Privilege
Default Unified Audit Policy Enabled. Failed logins are written to UNIFIED_AUDIT_TRAIL. The ORA_LOGON_FAILURES unified audit policy for new databases, tracks failed
logons only.
AUDSYS schema will be used solely for storage of the unified audit trail data table.
22
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.32 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Single location, single table for audit records
Unified interface
Unified audit trail records can be read using the UNIFIED_AUDIT_TRAIL view standard auditing
SYS auditing
fine grained auditing
data pump
SQL loader,
database vault
label security
recovery manager RMAN
real application security
Unified Audit Trail23
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.33 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
DBLINK_INFO
Returns the source of a database link session. Specifically, it returns a string of the form:
SOURCE_GLOBAL_NAME=dblink_src_global_name,
DBLINK_NAME=dblink_name,
SOURCE_AUDIT_SESSIONID=dblink_src_audit_sessionid
dblink_src_global_name is the unique global name of the source database
dblink_name is the name of the database link on the source database
dblink_src_audit_sessionid is the audit session ID of the session on the source database that initiated the connection to the remote database using dblink_name
Same information in UNIFIED_AUDIT_TRAIL view – DBLINK_INFO column.
New SYS_CONTEXT Namespace24
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.34
Connecting Lower Version Clients
SQLNET.ALLOWED_LOGON_VERSION_CLIENT
SQLNET.ALLOWED_LOGON_VERSION_SERVER
Replaced SQLNET.ALLOWED_LOGON_VERSION
25
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.35
Disabled Constraints
Several disabled constraints under SYS and SYSTEM
Do not drop them
Related to different database functionalities and are intentionally created in disabled state.
Automatically enabled later when the functionality is used
TSDP_SENSITIVE_DATA$UK - Transparent Sensitive Data Protection
DAM_CONFIG_PARAM_FK1 – Oracle Audit Vault
26
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.36 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Database Control is history…
Requires XDB. EM Express is a servlet built on top of Oracle XML DB.
Deafult port is 5500, can be changed using DBMS_XDB_CONFIG.setHTTPsPort (<port>) procedure
URL is https://<hostname>:5500/em
Available only when the database is open
The EM_EXPRESS_BASIC role enables users to connect to EM Express and to view the pages in read-only mode.
The EM_EXPRESS_ALL role enables users to connect to EM Express and use all the functionality.
While creating Oracle Database 12c database, DBCA picks a free port from 5500 to 5599 for Enterprise Manager Express. If you want a specific port to be used, set the environment variable DBEXPRESS_HTTPS_PORT before starting Oracle Universal Installer (OUI) or Database Configuration Assistant (DBCA).
Database Express 12c27
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.37 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Database Express Home27
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.38 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Import without generating archived logs TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y[:TABLE|INDEX]
Sets object to NOLOGGIG before import and reverts to original setting after import.
Choose to disable logging for tables (Y:TABLE), indexes (Y:INDEX), or both (Y).
$ impdp DIRECTORY=dump_dir DUMPFILE=ex2.dmp
LOGFILE=ex2.log SCHEMAS=ball
TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y:TABLE
$ impdp DIRECTORY=dump_dir DUMPFILE=ex1.dmp
LOGFILE=ex1.log SCHEMAS=basket
TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y
TRANSFORM=DISABLE_ARCHIVE_LOGGING:N:INDEX
Data Pump NOLOGGING Import28
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.39 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Export one or more views as tables VIEWS_AS_TABLES=[schema_name.]view_name[:table_na
me], ...
table_name specifies the name of a table to serve as the source of the metadata for the exported view (mainly for RO db).
Data Pump performs a table-mode export.
Useful to get a subset of data exported.
Also available in “impdp” to use in the network mode of import.
Data Pump Export Views As Tables29
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.40 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
SQL*Loader in #DB12c has a new option that does not require the user to create a SQL*Loader control file.
Instead, command-line parameters are used to specify how the data file is loaded, and SQL*Loader automatically chooses the best method with which to load the data.
Data files formatted as comma-separated values (CSV) to both SQL*Loader and external tables are supported.
The new parameter, TABLE, turns on express mode. The value of the TABLE parameter is the name of the table that SQL*Loader will load.
If no data file is specified, then looks for file named tablename.dat in the current directory
sqlldr username TABLE=EMPLOYEES
SQL*Loader Express Mode30
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.41 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
“Describe” in RMAN, similar to SQL*Plus.
Most SQL statements can be run in RMAN without the “SQL” prefix (and messing with quotes around the SQL!!).
SYSBACKUP Administration Role – Start replacing scripts where SYSDBA is used
RMAN Notables31
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.42 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
The biggest RMAN feature is restore table from backup.
RECOVER TABLE SCOTT.EMP, SCOTT.DEPT
UNTIL TIME 'SYSDATE-1'
AUXILIARY DESTINATION '/t1/tdb'
DATAPUMP DESTINATION '/t1/dump'
DUMP FILE 'emp_dept_dump.dat'
REMAP TABLE 'HR'.'EMP':'EMP_RECVR';
--NOTABLEIMPORT;
When NOTABLEIMPORT option is used, RMAN performs the restore/recover and creates the export dump file, but does not perform the import.
RMAN Restore Table33
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.43 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Prior to 12c, Active Duplicate used image copies to send across network (Push method)
In 12c, you can initiate Active Duplicate using “Pull “method, which uses backupset instead of image copies.
RMAN skips unused blocks, committed undo blocks.
Can use compression and multisection options.
Fewer resources are used on the source database
Initiates PULL method when:
specify USING BACKUPSET
specify SET ENCRYPTION before the DUPLICATE command
The SECTION SIZE clause divides data files into subsections that are restored in parallel across multiple channels on the auxiliary database.
With the USING COMPRESSED BACKUPSET clause, the files are transferred as compressed backup sets
RMAN Active Duplicate Using Backupset34
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.44 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Starting with 12c, the RMAN catalog database requires Enterprise Edition.
Covered under the Infrastructure Repository License (no need for additional license) RMAN
Oracle Enterprise Manager Cloud Control
Automatic Workload Repository (AWR) Warehouse
Global Data Services Catalog
Grid Infrastructure Management Repository
https://blogs.oracle.com/UPGRADE/entry/rman_catalog_requires_ee_in
http://docs.oracle.com/database/121/DBLIC/editions.htm#DBLIC119
RMAN Catalog Requires EE35
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.45 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
Documentation (docs.oracle.com)
New Features Guide
First chapter in most books
Oracle Database 12c New Features Series
Oracle Database 12c Learning Library
What Else…
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.46 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/12c/r1/poster/OUTPUT_poster/poster.html#
TechNet Interactive Reference
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.47 ©2014 TDS Hosted & Managed Services, LLC. All rights reserved. All other trademarks are the property of their respective owners.
https://apex.oracle.com/pls/apex/f?p=44785:141:0:::141:P141_PAGE_ID,P141_SECTION_ID:6,18
Database 12c Learning Library
©2014 OneNeck IT Solutions LLC. All rights reserved. All other trademarks are the property of their respective owners.48
Oracle Learning Library - Videos
48
Thank you!
Daily #oratidbit on Facebook and Twitter. Follow me!
Tweets: @biju_thomasFacebook: facebook.com/oraclenotes
Blog: bijoos.com/oraclenotes
top related