The document discusses transporting a single partition of a table between Oracle databases using Oracle Data Pump. It provides steps to create test tablespaces and a partitioned table with two partitions stored in different tablespaces. It then shows how to export the first partition to a dump file, drop related objects, and import the partition from the dump file to restore it. This demonstrates using Data Pump to transport a single table partition between databases for improved efficiency over full table transports.
Testing Oracle 12c new features of Database Table rows Archiving. Better for quick recovery information than finding tape, load that and restore somewhere first.
Test: DML with NOLOGGING
NOLOGGING: Oracle will generate a minimal number of redo log entries in order to protect
the data dictionary, and the operation will probably run faster. Logging can be disabled at
the table level or the tablespace level.
Testing Oracle 12c new features of Database Table rows Archiving. Better for quick recovery information than finding tape, load that and restore somewhere first.
Test: DML with NOLOGGING
NOLOGGING: Oracle will generate a minimal number of redo log entries in order to protect
the data dictionary, and the operation will probably run faster. Logging can be disabled at
the table level or the tablespace level.
This presentation explains all of the new features that are relevant for developers in Oracle 12c. It's been out for a couple of years, but many companies haven't updated to 12c. So, if you're looking to update soon, or are just interested in what the new features are, look at this presentation.
The full post is available at http://www.completeitprofessional.com/oracle-12c-new-features-for-developers
This presentation explains all of the new features that are relevant for developers in Oracle 12c. It's been out for a couple of years, but many companies haven't updated to 12c. So, if you're looking to update soon, or are just interested in what the new features are, look at this presentation.
The full post is available at http://www.completeitprofessional.com/oracle-12c-new-features-for-developers
Oracle 21c: New Features and Enhancements of Data Pump & TTSChristian Gohmann
At the end of the year 2020, Oracle released 21c on its Cloud infrastructure. The on-premises version will follow later this year. As with every new Oracle version, the Data Pump utility gets new features or enhancements for existing features.
This presentation gives an overview of the enhancements of Data Pump and Transportable Tablespaces. The following list is an excerpt of the points I will talk about
- Simultaneous use of EXCLUDE and INCLUDE
- Parallelized import of metadata during a TTS import operation
- Checksum support for dump files
- Direct access to Oracle Cloud Object Store for exports and imports
Oratop is a text-based user interface tool for monitoring basic database operations in real time. This presentation will go into depth on how to use the tool and some example scenarios. It can be used for both RAC as well as single-instance database and can be used in combination with top to get a more holistic view of system performance and identify any bottlenecks
Ass2-Descriptor.docx1 Problem DescriptionThe objective of .docxfredharris32
Ass2-Descriptor.docx
1 Problem Description
The objective of this assignment is to:
(1) Enhance your understanding of Relational Database Design & Implementation, and
(2) Understand & practice with PL/SQL in particular database interaction, functions & procedures, check constraints, triggers and packages.
The assignment will consist of four (4) tasks.
Task one will involve the extension of the relational model from assignment 1 and the development of the code for maintaining the consistency of the database.
Task two will involve the development of several functions and procedures which will be encapsulated in a package with a separate specification (header) and a body (implementation).
Task three will involve developing a database trigger.
Task four will involve testing the code developed as part of tasks one to three. You may want to insert a sufficient number of rows into the tables so that you can demonstrate the workings of all the code components.
Methodology
Using your solutions to assignments 1 & 2, create the DDL/SQL script file to create the tables and attributes (dropping them all beforehand of course).
Write the code for Task one in a separate SQL script and test it to check for errors.
Write the package specification and the package body in two separate SQL scripts.
Write the SQL script file to insert the records (at least five records per table) into the relevant tables so that you can test the functions and procedures provided in the package above.
** Refer to the Oracle 11g documentation files when necessary.
Compile all the separate SQL scripts together into a single script (Assignment2.sql).
Place the test results into your report (Assignment2.doc).
The EER diagram for Task One from the Diagnostic Assignment:
Note: conductTest is a relationship among Airplane, Technician, Senior_Technician and Testinfo with attributes: data, score, and hours. And service is a relationship among Flight, Technician, and Senior_ Technician with attribute date and time.
2 Task Specifications
Task 1
You are required to add another attribute called NoofPassengers to each flight to record the number of passengers booked on that flight. You are also required to ensure the consistency requirement that NoofPassengers does not exceed the capacity of the airplane that serves that flight.
Discuss how you could maintain the consistency of the database. This discussion should go in the report. Then revise your DDL script from assignment 1 to add NoofPassengers to the relevant flight table as well as implementing the necessary SQL and/or PL/SQL code to maintain the consistency of the database. Place the revised DDL statements and the code in your SQL script.
Task 2
Write the package body for the following package specification. Place the package specification and the package body in your SQL script. The marks for each procedure are of equal value.
create or replace package assignment2
is
procedure ...
Presented at the Dallas Oracle Users Group
By Nabil Nawaz
sponsored by BIAS Corporation
Oracle DataPump is an excellent tool for cloning databases and schemas and it is widely used as a common toolset today among DBAs and Developers to transfer data and structure between databases. Please come and learn about new Data pump features for Oracle version 12.2. We will also be sharing a case study for a large multi-terabyte database for optimizing a data pump import process that originally ran for more than a day and then the process was tuned to run in just about 4-6 hours a nearly 90% performance enhancement. The tips that will be shared will be of great value and help to ensure you are able to have a well-tuned import process with DataPump.
Similar to DataPump ile Single Parititon Export (20)
1. Anar Godjaev
http://anargodjaev.wordpress.com
Oracle Data Pump ile Single parititon export/transport
Oracle 11g ile birlikte single table partitionlarını veritabanları arasında taşımak mümkün hale gelmiştir,
Normal olarak tablonun tamamını taşımaktansa sadece belli partition’unu taşımak çok daha mantıklıdır.
Bunu örnekle dahada iyi açıklayabilmek adınapartititonlarımızı saklayacak 2 tane tablespace yaratacağız
ve test açamçlı olarak bu tablespace ler üzerinde quotalar vereceğiz.
[oracle@rac1 ~]$ sqlplus '/as sysdba'
SQL>CREATE TABLESPACE transport_test_ts_1
DATAFILE 'tt_ts1.dbf'
SIZE 128K AUTOEXTEND ON NEXT 128K;
SQL>CREATE TABLESPACE transport_test_ts_2
DATAFILE 'tt_ts2.dbf'
SIZE 128K AUTOEXTEND ON NEXT 128K;
SQL>ALTER USER test
QUOTA UNLIMITED ON transport_test_ts_1
QUOTA UNLIMITED ON transport_test_ts_2;
SQL>CONN test/test
Test kullanıcımızla bağlandıktan sonra örnek bir partition tablo yaratıyoruz ve içini veri ile dolduruyoruz.
SQL>CREATE TABLE transport_test_tab (
id
NUMBER NOT NULL,
code
VARCHAR2(10) NOT NULL,
description VARCHAR2(50),
created_date DATE,
CONSTRAINT transport_test_pk PRIMARY KEY (id)
)
PARTITION BY RANGE (created_date)
(
PARTITION part_2010 VALUES LESS THAN (TO_DATE('01-10-2010','DD-MM-YYYY'))
TABLESPACE transport_test_ts_1,
PARTITION part_2011 VALUES LESS THAN (TO_DATE('01-10-2011','DD-MM-YYYY'))
TABLESPACE transport_test_ts_2
);
SQL>INSERT INTO transport_test_tab
SQL>INSERT INTO transport_test_tab
SQL>INSERT INTO transport_test_tab
ADD_MONTHS(SYSDATE,12));
SQL>INSERT INTO transport_test_tab
ADD_MONTHS(SYSDATE,12));
SQL>COMMIT;
VALUES (1, 'ONE', '1 ONE', SYSDATE);
VALUES (2, 'TWO', '2 TWO', SYSDATE);
VALUES (3, 'THREE', '3 THREE',
VALUES (4, 'FOUR', '4 FOUR',
Tablomuzun istatistiğini alıp ,tablomuza ait partitionları ve içerdikleri kayıtlara bir bakalım.
SQL>EXEC DBMS_STATS.gather_table_stats(USER, 'TRANSPORT_TEST_TAB');
SQL>COLUMN table_name FORMAT A20
SQL>COLUMN partition_name FORMAT A20
SQL>COLUMN tablespace_name FORMAT A20
2. Anar Godjaev
http://anargodjaev.wordpress.com
SQL> set linesize 1000
SQL>SELECT table_name, partition_name, tablespace_name, num_rows
FROM
user_tab_partitions
Where table_name='TRANSPORT_TEST_TAB';
TABLE_NAME
-------------------TRANSPORT_TEST_TAB
TRANSPORT_TEST_TAB
PARTITION_NAME
-------------------PART_2010
PART_2011
TABLESPACE_NAME
NUM_ROWS
-------------------- ---------TRANSPORT_TEST_TS_1
2
TRANSPORT_TEST_TS_2
2
Görüldüğü gibi her partition 2 şer kayıt içeriyor.
Transport yapacağımız tablespace ler kesinlikle readonly modda olmalıdır.
SQL>ALTER TABLESPACE transport_test_ts_1 READ ONLY;
Şu an herşey hazır 2010 parititonunu export yapabiliriz.
[oracle@rac1 ~]$ sqlplus '/as sysdba'
SQL> CREATE OR REPLACE DIRECTORY data_pump_dir AS '/u01/app11g/backup/';
SQL> GRANT READ, WRITE ON DIRECTORY data_pump_dir TO public;
[oracle@rac1 ~]$expdp system/oracle tables=test.transport_test_tab:part_2010
transportable=always directory=data_pump_dir dumpfile=part_2010.dmp
Yapılan export’un ouput’u aşağıdaki gibi olacaktır.
Export: Release 11.2.0.1.0 - Production on Wed NOV18 13:35:17 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates.
All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYSTEM"."SYS_EXPORT_TABLE_01": system/********
tables=test.transport_test_tab:part_2010 transportable=always
directory=data_pump_dir dumpfile=part_2010.dmp
Processing object type TABLE_EXPORT/TABLE/PLUGTS_BLK
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type TABLE_EXPORT/TABLE/END_PLUGTS_BLK
Master table "SYSTEM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
*****************************************************************************
*
Dump file set for SYSTEM.SYS_EXPORT_TABLE_01 is:
/u01/app11g/backup/part_2010.dmp
*****************************************************************************
*
Datafiles required for transportable tablespace TRANSPORT_TEST_TS_1:
/u01/app11g/oracle/product/11.2.0/db_1/dbs/tt_ts1.dbf
3. Anar Godjaev
http://anargodjaev.wordpress.com
Datafiles required for transportable tablespace USERS:
/u01/app/oracle/oradata/EDUCATE/users01.dbf
Job "SYSTEM"."SYS_EXPORT_TABLE_01" successfully completed at 13:36:23
Şimdi geri dönme yani backuptan geri alma testi yapacağız bunun için ilgili tabloyu ve onun ait olduğu
tablespace leri drop ediyoruz.
[oracle@rac1 ~]$ sqlplus '/as sysdba'
SQL>DROP TABLE test.transport_test_tab;
SQL>DROP TABLESPACE transport_test_ts_1 INCLUDING CONTENTS;
SQL>DROP TABLESPACE transport_test_ts_2 INCLUDING CONTENTS AND DATAFILES;
Dikkat edersek 1.tablespace te sadece content yani syntax bilgisini drop ettik,tablespace in datafile’ı halen
mevcuttur.
Şimdi artık aldığımız export backup ındaki bilgiyi import edebiliriz.
[oracle@rac1 ~]$impdp system/oracle partition_options=departition
dumpfile=part_2010.dmp transport_datafiles='tt_ts1.dbf'
İşlemin output bilgiside aşağıdaki gibi olacaktır,
$ impdp system/password partition_options=departition dumpfile=part_2007.dmp
transport_datafiles='/u01/app/oracle/oradata/DB11G/tt_ts_1'
Import: Release 11.2.0.1.0 - Production on Wed NOV18 13:42:38 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates.
All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully
loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01": system/********
partition_options=departition dumpfile=part_2010.dmp
transport_datafiles=tt_ts1.dbf
Processing object type TABLE_EXPORT/TABLE/PLUGTS_BLK
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
ORA-39083: Object type INDEX failed to create with error:
ORA-00942: table or view does not exist
Failing sql is:
CREATE UNIQUE INDEX "TEST"."TRANSPORT_TEST_PK" ON "TEST"."TRANSPORT_TEST_TAB"
("ID") PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(SEG_FILE 4 SEG_BLOCK 635
OBJNO_REUSE 85559 INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS
2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT
FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" PARALLEL 1
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
ORA-39083: Object type CONSTRAINT failed to create with error:
ORA-00942: table or view does not exist
4. Anar Godjaev
http://anargodjaev.wordpress.com
Failing sql is:
ALTER TABLE "TEST"."TRANSPORT_TEST_TAB" ADD CONSTRAINT "TRANSPORT_TEST_PK"
PRIMARY KEY ("ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(SEG_FILE 4 SEG_BLOCK 635 OBJNO_REUSE 85559 INITIAL 65536 NEXT 1048576
MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS
1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "USERS" ENABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
ORA-39112: Dependent object type INDEX_STATISTICS skipped, base object type
INDEX:"TEST"."TRANSPORT_TEST_PK" creation failed
Processing object type TABLE_EXPORT/TABLE/END_PLUGTS_BLK
Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" completed with 3 error(s) at
13:42:50
Tablo segmenti tablo ismi ve partition isimlerinin kombinasyonu ile isimlendirilmiştir, bu yüzden buna
bağlı olan objeler hata vermiştir çünkü yanlış tablo ismini aramaktadırlar.O yüzden verilen hataları
görmezden geliyoruz. Şimdi artık oluşan yeni segmenti aşağıda görebiliriz.
[oracle@rac1 ~]$ sqlplus '/as sysdba'
SQL>CONN test/test
SQL>EXEC DBMS_STATS.gather_schema_stats(USER);
SQL>COLUMN table_name FORMAT A30
SQL>COLUMN tablespace_name FORMAT A20
SQL> set linesize 1000
SQL>SELECT table_name, tablespace_name, partitioned, num_rows
FROM
user_tables
Where tablespace_name like '%TRANSPORT_TEST_TS_1%';
TABLE_NAME
TABLESPACE_NAME
PAR
NUM_ROWS
------------------------------ -------------------- --- ---------TRANSPORT_TES_PART_2007
TRANSPORT_TEST_TS_1 NO
2
1 row selected.