SlideShare a Scribd company logo
1 of 39
Atlantic Oracle Training Conference -
December 20051
Kick Up Your Data Load And Data Extract Jobs A Notch!
Mary Wagner
Database Administrator / Developer
Delaware Department of
Transportation
Atlantic Oracle Training
Conference - December 20052
My Background
 Currently employed as a Database Administrator / Developer
 Certified in Oracle 8i and 9i
 Experience using 7, 8i, 9i, 10g release 1, RAC
10 years of IT Experience including…
 Database administration, design, development
 Java and PL/SQL development
 Internet / Intranet web site development
 LAN Administration
Atlantic Oracle Training
Conference - December 20053
Session Goal
 To provide an introduction to external tables and directory
objects, along with some simple, practical examples, so that
you can begin to work with and investigate these new Oracle
features.
Atlantic Oracle Training
Conference - December 20054
Session Objectives
 Directory Object Overview
 External Table Overview
 Setting up for the Examples
 Example 1 - Using Directory Objects and External Tables in
a Data Load Job
 Example 2 – Using Directory Objects and External Tables in
a Data Extract Job
Atlantic Oracle Training
Conference - December 20055
Directory Object Overview (1)
What is a Directory Object?
 Alias for an existing operating system directory
 Exists as object within the Oracle database
 Can be referred to in PL/SQL code
Atlantic Oracle Training
Conference - December 20056
Directory Object Overview (2)
Why Use Them?
 Create new output paths without restarting the database
 Control access to output paths through database
permissioning
 Dynamically create directory output paths within PL/SQL
procedures (i.e. for dates, etc.)
 More…….
Atlantic Oracle Training
Conference - December 20057
Directory Object Overview (3)
Requirements:
 “Create Any Directory” privilege
 Existence of related operating system directory
 OS Permissioning of operating system directory for Oracle
database processes (i.e. oracle user on unix/linux)
 Granting of privileges to database user who will run PL/SQL
referring to the directory object
Atlantic Oracle Training
Conference - December 20058
Directory Object Overview (4)
Creation and Permissioning:
mydba > @C:aotc_fall_2005scriptscreate_myuser.sql
mydba > create or replace directory
DIR_AOTC_FALL_2005_MY_OUTPUT1 as
'C:aotc_fall_2005my_output1';
mydba > grant read, write on directory
DIR_AOTC_FALL_2005_MY_OUTPUT1 to MYUSER;
Atlantic Oracle Training
Conference - December 20059
Directory Object Overview (4-b)
Creation and Permissioning:
mydba > create or replace directory
DIR_AOTC_FALL_2005_MY_OUTPUT2 as
'C:aotc_fall_2005my_output2';
mydba > grant read, write on directory
DIR_AOTC_FALL_2005_MY_OUTPUT2 to MYUSER;
Atlantic Oracle Training
Conference - December 200510
Directory Object Overview (5)
Use Example:
myuser > select * from dba_directories;
myuser > @C:aotc_fall_2005scriptscreate_pkg_test.sql
myuser > exec pkg_test.write_to_file_test;
myuser > exec
pkg_test.write_to_file_test_dynamic('DIR_AOTC_FALL_2005_MY_
OUTPUT2', 'test_file2.txt');
Atlantic Oracle Training
Conference - December 200511
External Table Overview (1)
What is an External Table?
 A type of Oracle database table
 Points to an operating system file
 DDL refers to directory object
 Can INSERT INTO….SELECT …. FROM …..MERGE
 Can perform multi table UPDATES
 Can JOIN with regular database tables
 9i – Read only, table can only be queried
 10g – Can also extract to, using ORACLE_DATAPUMP type
Atlantic Oracle Training
Conference - December 200512
External Table Overview (2)
Why Use Them?
 Can use any SQL function on them to selectively load/insert
data into a database table
 Can update a database table from them
 Can incorporate data loads or updates from them using
PL/SQL procedures
 Can unload/extract data to them to reload into another
oracle database (10g only)
Atlantic Oracle Training
Conference - December 200513
External Table Overview (3)
Requirements:
 Existence of related operating system file
 OS Permissioning of operating system directory and file for
Oracle database processes (i.e. oracle user on unix/linux)
 Granting of privileges to database user who will run PL/SQL
referring to the external table
 “CREATE TABLE” privilege (10g release 2)
Atlantic Oracle Training
Conference - December 200514
External Table Overview (3-b)
When not to use External Tables:
 If LOBS are involved
 If the source file has to be accessed on a remote server
 If more than one user needs to access the external table at
the same time to load data
Atlantic Oracle Training
Conference - December 200515
External Table Overview (4)
Creation :
myuser > CREATE TABLE EXT_TEST_FILE_TABLE
( LASTNAME VARCHAR2(50),
FIRSTNAME VARCHAR2(50)
)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
…….
Atlantic Oracle Training
Conference - December 200516
External Table Overview (5)
Use Example:
myuser > desc ext_test_file_table;
myuser > select * from user_objects;
myuser > select * from ext_test_file_table;
myuser > select * from ext_test_file_table;
myuser > select substr(firstname, 1, 1) || lastname as username from
ext_test_file_table;
myuser > select firstname || ' ' || lastname as fullname from
ext_test_file_table;
Atlantic Oracle Training
Conference - December 200517
External Table Overview (5-b)
Changing file name and directory location :
myuser > ALTER TABLE ext_test_file_table LOCATION
( 'test_file2.txt'
);
myuser > ALTER TABLE ext_test_file_table DEFAULT
DIRECTORY DIR_AOTC_FALL_2005_MY_OUTPUT2;
myuser > select * from ext_test_file_table;
Atlantic Oracle Training
Conference - December 200518
Setting Up for the Examples.
 Grant additional rights to the example user
mydba > @create_myuser.sql (already created
earlier)
 Create the example table
myuser > @create_table.sql
 Create the FTP PL/SQL package
myuser > @create_pkg_ftp.sql
 Create the EMAIL PL/SQL package
myuser > @create_pkg_email.sql
 Create the EXAMPLE PL/SQL package
myuser > @create_pkg_examples.sql
Atlantic Oracle Training
Conference - December 200519
Example 1 –> Step 1.) Create a New Directory.
mydba> grant create any directory to myuser;
myuser> select * from dba_directories;
myuser> create or replace directory
DIR_AOTC_FALL_2005_EXAMPLE1 as
'C:aotc_fall_2005example1';
myuser> select * from dba_directories;
Atlantic Oracle Training
Conference - December 200520
Example 1 –> Step 2.) Create External Table.
myuser> CREATE TABLE EXT_EMPLOYEE_FILE
(EMPLOYEEID NUMBER(3),
LASTNAME VARCHAR2(32),
FIRSTNAME VARCHAR2(32),
PHONE VARCHAR2(13),
EMAILADDRESS VARCHAR2(32),
) ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
………..
Atlantic Oracle Training
Conference - December 200521
Example 1 –> Step 3.) Get Source File
PKG_EXAMPLES.EMPLOYEE_DATA_LOAD_AND_FTP
RUN_FTP(p_ftp_command => 'get',
p_ftp_xfer_type => 'ascii',
p_ftp_server => 'servername',
p_ftp_port => '21',
p_ftp_username => 'os_user',
p_ftp_password => 'os_password',
p_directory => 'DIR_AOTC_FALL_2005_EXAMPLE1',
p_source_filename => 'employee_file_new.dat',
p_dest_filename =>'employee_file_new.txt');
Atlantic Oracle Training
Conference - December 200522
Example 1 –> Step 4.) Load Data
PKG_EXAMPLES.EMPLOYEE_DATA_LOAD_AND_FTP
myuser> INSERT INTO EMPLOYEES SELECT EMPLOYEEID,
LASTNAME, FIRSTNAME,
FIRSTNAME || ' ' || LASTNAME, PHONE,
LOWER(EMAILADDRESS) FROM
EXT_EMPLOYEE_FILE;
myuser> COMMIT;
Atlantic Oracle Training
Conference - December 200523
Example 1 –> Step 5.) Send Email Notification
PKG_EXAMPLES.EMPLOYEE_DATA_LOAD_AND_FTP
PKG_EMAIL.send
(p_smtp_host => 'smtp.mycompany.com',
p_sender_email => 'pkg_examples.employee_data_load_and_ftp@mydb',
p_from => 'pkg_examples.employee_data_load_and_ftp@mydb',
p_to => pkg_email.array('jsmith@mycompany.com'),
p_cc => pkg_email.array('jdoe@mycompany.com',
'sjackson@mycompany.com'),
p_bcc => pkg_email.array('dba@mycompany.com'),
p_subject => 'EMPLOYEE DATA LOAD AND FTP JOB SUCCEEDED',
p_body => 'The employee load and ftp job completed successfully at -- ' ||
TO_CHAR(SYSDATE, 'MM/DD/YYYY HH24:MI:SS'));
Atlantic Oracle Training
Conference - December 200524
Example 1 –> Step 6.) Run or Schedule PL/SQL
Procedures
exec PKG_EXAMPLES.EMPLOYEE_DATA_LOAD_AND_FTP
Because everything is now in PL/SQL, you can :
 Schedule it to run through DBMS_JOB
 Schedule it to run through DBMS_SCHEDULER
 Schedule it to run through Oracle Management Server
Or run it manually………..
Atlantic Oracle Training
Conference - December 200525
Example 2 –> Step 1.) Alter External Table
PKG_EXAMPLES.EMPLOYEE_DATA_MERGE_AND_FTP
myuser > ALTER TABLE EXT_EMPLOYEE_FILE LOCATION
( 'employee_file_new_and_existing.txt'
);
myuser > SELECT * FROM EXT_EMPLOYEE_FILE;
Atlantic Oracle Training
Conference - December 200526
Example 2 –> Step 2.) Get Source File
PKG_EXAMPLES.EMPLOYEE_DATA_LOAD_AND_FTP
RUN_FTP(p_ftp_command => 'get',
p_ftp_xfer_type => 'ascii',
p_ftp_server => 'servername',
p_ftp_port => '21',
p_ftp_username => 'os_user',
p_ftp_password => 'os_password',
p_directory => 'DIR_AOTC_FALL_2005_EXAMPLE1',
p_source_filename =>
'employee_file_new_and_existing.dat',
p_dest_filename =>'employee_file_new_and_existing.txt');
Atlantic Oracle Training
Conference - December 200527
Example 2 –> Step 3.) Merge Data
PKG_EXAMPLES.EMPLOYEE_DATA_MERGE_AND_FTP
MERGE INTO employees e
USING EXT_EMPLOYEE_FILE e_ext
ON (E.EMPLOYEEID=E_EXT.EMPLOYEEID)
WHEN MATCHED THEN UPDATE
set e.firstname=e_ext.firstname,
e.lastname=e_ext.lastname,
e.fullname=e_ext.firstname || ' ' || e_ext.lastname,
e.phone=e_ext.phone,
e.emailaddress=lower(e_ext.emailaddress)
WHEN NOT MATCHED THEN…….
Atlantic Oracle Training
Conference - December 200528
Example 2 –> Step 4.) Send Email Notification
PKG_EXAMPLES.EMPLOYEE_DATA_MERGE_AND_FTP
PKG_EMAIL.send
(p_smtp_host => 'smtp.mycompany.com',
p_sender_email => 'pkg_examples.employee_data_load_and_ftp@mydb',
p_from => 'pkg_examples.employee_data_load_and_ftp@mydb',
p_to => pkg_email.array('jsmith@mycompany.com'),
p_cc => pkg_email.array('jdoe@mycompany.com',
'sjackson@mycompany.com'),
p_bcc => pkg_email.array('dba@mycompany.com'),
p_subject => 'EMPLOYEE DATA MERGE AND FTP JOB SUCCEEDED',
p_body => 'The employee merge and ftp job completed successfully at --
' || TO_CHAR(SYSDATE, 'MM/DD/YYYY HH24:MI:SS'));
Atlantic Oracle Training
Conference - December 200529
Example 2 –> Step 5.) Run or Schedule PL/SQL
Procedures
exec PKG_EXAMPLES.EMPLOYEE_DATA_MERGE_AND_FTP
Because everything is now in PL/SQL, you can :
 Schedule it to run through DBMS_JOB
 Schedule it to run through DBMS_SCHEDULER
 Schedule it to run through Oracle Management Server
Or run it manually………..
Atlantic Oracle Training
Conference - December 200530
Example 3 (10g) –> Step 1.) Create a New Directory.
PKG_EXAMPLES.EMPLOYEE_DATA_EXTRACT_AND_FTP
myuser > create or replace directory
DIR_AOTC_FALL_2005_EXAMPLE3 as
'C:aotc_fall_2005example3';
Atlantic Oracle Training
Conference - December 200531
Example 3 (10g) –> Step 2.) Create External Table -
Extract Data
PKG_EXAMPLES.EMPLOYEE_DATA_EXTRACT_AND_FTP
myuser> CREATE TABLE EMPLOYEE_EXTRACT
ORGANIZATION EXTERNAL
( TYPE ORACLE_DATAPUMP
DEFAULT DIRECTORY DIR_AOTC_FALL_2005_EXAMPLE3
LOCATION( 'EMPLOYEE_EXTRACT.DAT’ )
)
AS
SELECT * FROM EMPLOYEES
/
Atlantic Oracle Training
Conference - December 200532
Example 3(10g) –> Step 3.) FTP Data Extract File
PKG_EXAMPLES.EMPLOYEE_DATA_EXTRACT_AND_FTP
RUN_FTP(p_ftp_command => 'put',
p_ftp_xfer_type => 'binary',
p_ftp_server => 'servername',
p_ftp_port => '21',
p_ftp_username => 'os_user',
p_ftp_password => 'os_password',
p_directory => 'DIR_AOTC_FALL_2005_EXAMPLE2',
p_source_filename => 'employee_extract.dat',
p_dest_filename =>'employee_extract_' ||
TO_CHAR(SYSDATE, 'MMDDYYHH24MI') || '.txt');
Atlantic Oracle Training
Conference - December 200533
Example 3 (10g) –> Step 4.) Send Email Notification
PKG_EXAMPLES.EMPLOYEE_DATA_EXTRACT_AND_FTP
PKG_EMAIL.send
(p_smtp_host => 'smtp.mycompany.com',
p_sender_email => 'pkg_examples.employee_data_load_and_ftp@mydb',
p_from => 'pkg_examples.employee_data_load_and_ftp@mydb',
p_to => pkg_email.array('jsmith@mycompany.com'),
p_cc => pkg_email.array('jdoe@mycompany.com',
'sjackson@mycompany.com'),
p_bcc => pkg_email.array('dba@mycompany.com'),
p_subject => 'EMPLOYEE DATA EXTRACT AND FTP JOB
SUCCEEDED',
p_body => 'The employee extract and ftp job completed successfully at --
' || TO_CHAR(SYSDATE, 'MM/DD/YYYY HH24:MI:SS'));
Atlantic Oracle Training
Conference - December 200534
Example 3 (10g)–> Step 5.) Run or Schedule PL/SQL
Procedure
exec PKG_EXAMPLES.EMPLOYEE_DATA_EXTRACT_AND_FTP
Because everything is now in PL/SQL, you can :
 Schedule it to run through DBMS_JOB
 Schedule it to run through DBMS_SCHEDULER
 Schedule it to run through Oracle Management Server
Or run it manually………..
Atlantic Oracle Training
Conference - December 200535
Miscellaneous Notes
 Be Careful With Directory Permissions – Be frugal
when granting “create any directory” permissions to users.
If they create it, they can write to it through the database.
 Case Sensitivity – Be aware of OS directory and file
name case sensitivity when creating directory objects and
external tables in Oracle.
 Do The Research – Your environment is not going to be
exactly the same as any one else's. Read the Oracle
DOCS and Chapter 15 of Tom Kyte’s new book (and the
rest also!).
Atlantic Oracle Training
Conference - December 200536
Acknowledgements / More Information
Oracle Docs / Manuals:
 Oracle Database SQL Reference Manual, 9i, 10g, Oracle
Corporation
 Oracle Database Concepts Manual, 9i, 10g, Oracle
Corporation
 Oracle Utilities Guide 9i, 10g, Oracle Corporation
Other Books:
 Expert Oracle Database Architecture, Tom Kyte
Web Sites:
 http://asktom.oracle.com
 http://www.oracle-base.com
 http://otn.oracle.com
Atlantic Oracle Training
Conference - December 200537
Scripts / Contact Info
Use the scripts at your own risk and test them fully in your own test
environment before using them in a production database.
Please email me if you find any errors in the scripts or have any
questions.
Email me at:
maryx.wagner@state.de.us
Atlantic Oracle Training
Conference - December 200538
Questions?
????????????????????????????????????????????????
Atlantic Oracle Training
Conference - December 200539
The End.
Thanks for Coming and please complete the
evaluation!

More Related Content

What's hot

Less17 flashback tb3
Less17 flashback tb3Less17 flashback tb3
Less17 flashback tb3Imran Ali
 
DBA 3 year Interview Questions
DBA 3 year Interview QuestionsDBA 3 year Interview Questions
DBA 3 year Interview QuestionsNaveen P
 
Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)than sare
 
Java 7 Features and Enhancements
Java 7 Features and EnhancementsJava 7 Features and Enhancements
Java 7 Features and EnhancementsGagan Agrawal
 
Lifecycle of a Solr Search Request - Chris "Hoss" Hostetter, Lucidworks
Lifecycle of a Solr Search Request - Chris "Hoss" Hostetter, LucidworksLifecycle of a Solr Search Request - Chris "Hoss" Hostetter, Lucidworks
Lifecycle of a Solr Search Request - Chris "Hoss" Hostetter, LucidworksLucidworks
 
Oracle dba interview question
Oracle dba interview questionOracle dba interview question
Oracle dba interview questionAmarendra Sharma
 
Sql Server 2008 New Programmability Features
Sql Server 2008 New Programmability FeaturesSql Server 2008 New Programmability Features
Sql Server 2008 New Programmability Featuressqlserver.co.il
 
Less10 security mb3
Less10 security mb3Less10 security mb3
Less10 security mb3Imran Ali
 
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeBoost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeMarco Gralike
 
Ts windchill data_loading
Ts windchill data_loadingTs windchill data_loading
Ts windchill data_loadingKhalil Bouali
 
Less08 managing data and concurrency
Less08 managing data and concurrencyLess08 managing data and concurrency
Less08 managing data and concurrencyImran Ali
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Session #5 content providers
Session #5  content providersSession #5  content providers
Session #5 content providersVitali Pekelis
 
R12 d49656 gc10-apps dba 10
R12 d49656 gc10-apps dba 10R12 d49656 gc10-apps dba 10
R12 d49656 gc10-apps dba 10zeesniper
 
Ensuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback FeaturesEnsuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback FeaturesPini Dibask
 

What's hot (20)

Less17 flashback tb3
Less17 flashback tb3Less17 flashback tb3
Less17 flashback tb3
 
DBA 3 year Interview Questions
DBA 3 year Interview QuestionsDBA 3 year Interview Questions
DBA 3 year Interview Questions
 
Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)Mid term & final- preparation- student-review(Oracle)
Mid term & final- preparation- student-review(Oracle)
 
Java 7 Features and Enhancements
Java 7 Features and EnhancementsJava 7 Features and Enhancements
Java 7 Features and Enhancements
 
Lifecycle of a Solr Search Request - Chris "Hoss" Hostetter, Lucidworks
Lifecycle of a Solr Search Request - Chris "Hoss" Hostetter, LucidworksLifecycle of a Solr Search Request - Chris "Hoss" Hostetter, Lucidworks
Lifecycle of a Solr Search Request - Chris "Hoss" Hostetter, Lucidworks
 
Less04 Instance
Less04 InstanceLess04 Instance
Less04 Instance
 
Oracle dba interview question
Oracle dba interview questionOracle dba interview question
Oracle dba interview question
 
Sql Server 2008 New Programmability Features
Sql Server 2008 New Programmability FeaturesSql Server 2008 New Programmability Features
Sql Server 2008 New Programmability Features
 
Less10 security mb3
Less10 security mb3Less10 security mb3
Less10 security mb3
 
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco GralikeBoost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
Boost Your Environment With XMLDB - UKOUG 2008 - Marco Gralike
 
Ts windchill data_loading
Ts windchill data_loadingTs windchill data_loading
Ts windchill data_loading
 
Less08 managing data and concurrency
Less08 managing data and concurrencyLess08 managing data and concurrency
Less08 managing data and concurrency
 
ora_sothea
ora_sotheaora_sothea
ora_sothea
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Session #5 content providers
Session #5  content providersSession #5  content providers
Session #5 content providers
 
Sqlmap
SqlmapSqlmap
Sqlmap
 
R12 d49656 gc10-apps dba 10
R12 d49656 gc10-apps dba 10R12 d49656 gc10-apps dba 10
R12 d49656 gc10-apps dba 10
 
Less17 Util
Less17  UtilLess17  Util
Less17 Util
 
Ensuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback FeaturesEnsuring Data Protection Using Oracle Flashback Features
Ensuring Data Protection Using Oracle Flashback Features
 
History
HistoryHistory
History
 

Viewers also liked

Magnitude practice problems
Magnitude practice problemsMagnitude practice problems
Magnitude practice problemsjulienorman80065
 
First Presbyterian Power Point
First Presbyterian Power PointFirst Presbyterian Power Point
First Presbyterian Power PointMichelle Hill
 
High-Acuity Nursing, 6th edition
High-Acuity Nursing, 6th editionHigh-Acuity Nursing, 6th edition
High-Acuity Nursing, 6th editionLearnStressFree
 
Nicholas Hills Final Paper - HWCA
Nicholas Hills Final Paper - HWCANicholas Hills Final Paper - HWCA
Nicholas Hills Final Paper - HWCANicholas Hills
 
Why You Can’t Ignore Listeria
Why You Can’t Ignore ListeriaWhy You Can’t Ignore Listeria
Why You Can’t Ignore ListeriaKerry Beach
 
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...Quoc-Sang Phan
 
2015-08-30 - Licao 09 - 3 Trimestre 2015 - Juvenis - O Sacrificio do Redentor
2015-08-30 - Licao 09 - 3 Trimestre 2015 - Juvenis - O Sacrificio do Redentor2015-08-30 - Licao 09 - 3 Trimestre 2015 - Juvenis - O Sacrificio do Redentor
2015-08-30 - Licao 09 - 3 Trimestre 2015 - Juvenis - O Sacrificio do RedentorWemerson Bernardo
 
Getting Started with Day for the Brave
Getting Started with Day for the BraveGetting Started with Day for the Brave
Getting Started with Day for the BraveRazooGiving
 
psy 430 research paper (final)
psy 430 research paper (final)psy 430 research paper (final)
psy 430 research paper (final)Tabitha C Smith
 
Cut off tier ii 2014
Cut off tier ii 2014Cut off tier ii 2014
Cut off tier ii 2014sdeshmukh4154
 
Album task
Album taskAlbum task
Album taskloisyo
 
комплексная переработка отходов стекла
комплексная переработка отходов стеклакомплексная переработка отходов стекла
комплексная переработка отходов стеклаamfomin
 
Death spells testimonials; http://deathspellonline.com
Death spells testimonials; http://deathspellonline.comDeath spells testimonials; http://deathspellonline.com
Death spells testimonials; http://deathspellonline.comPhsychic Nyame
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled PresentationHass Kod
 
Finding financial assistance for your hearing aids
Finding financial assistance for your hearing aids Finding financial assistance for your hearing aids
Finding financial assistance for your hearing aids Island Better Hearing
 
How much caffeine you should consume daily while using workout supplements
How much caffeine you should consume daily while using workout supplementsHow much caffeine you should consume daily while using workout supplements
How much caffeine you should consume daily while using workout supplementsSprayable Inc
 

Viewers also liked (20)

Magnitude practice problems
Magnitude practice problemsMagnitude practice problems
Magnitude practice problems
 
Webforms or MVC
Webforms or MVCWebforms or MVC
Webforms or MVC
 
First Presbyterian Power Point
First Presbyterian Power PointFirst Presbyterian Power Point
First Presbyterian Power Point
 
High-Acuity Nursing, 6th edition
High-Acuity Nursing, 6th editionHigh-Acuity Nursing, 6th edition
High-Acuity Nursing, 6th edition
 
Sudarshan Lahiry
Sudarshan LahirySudarshan Lahiry
Sudarshan Lahiry
 
Nicholas Hills Final Paper - HWCA
Nicholas Hills Final Paper - HWCANicholas Hills Final Paper - HWCA
Nicholas Hills Final Paper - HWCA
 
Why You Can’t Ignore Listeria
Why You Can’t Ignore ListeriaWhy You Can’t Ignore Listeria
Why You Can’t Ignore Listeria
 
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...
All-Solution Satisfiability Modulo Theories: applications, algorithms and ben...
 
Resume M.Dahab
Resume  M.DahabResume  M.Dahab
Resume M.Dahab
 
2015-08-30 - Licao 09 - 3 Trimestre 2015 - Juvenis - O Sacrificio do Redentor
2015-08-30 - Licao 09 - 3 Trimestre 2015 - Juvenis - O Sacrificio do Redentor2015-08-30 - Licao 09 - 3 Trimestre 2015 - Juvenis - O Sacrificio do Redentor
2015-08-30 - Licao 09 - 3 Trimestre 2015 - Juvenis - O Sacrificio do Redentor
 
Getting Started with Day for the Brave
Getting Started with Day for the BraveGetting Started with Day for the Brave
Getting Started with Day for the Brave
 
Tipos de linea
Tipos de lineaTipos de linea
Tipos de linea
 
psy 430 research paper (final)
psy 430 research paper (final)psy 430 research paper (final)
psy 430 research paper (final)
 
Cut off tier ii 2014
Cut off tier ii 2014Cut off tier ii 2014
Cut off tier ii 2014
 
Album task
Album taskAlbum task
Album task
 
комплексная переработка отходов стекла
комплексная переработка отходов стеклакомплексная переработка отходов стекла
комплексная переработка отходов стекла
 
Death spells testimonials; http://deathspellonline.com
Death spells testimonials; http://deathspellonline.comDeath spells testimonials; http://deathspellonline.com
Death spells testimonials; http://deathspellonline.com
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
Finding financial assistance for your hearing aids
Finding financial assistance for your hearing aids Finding financial assistance for your hearing aids
Finding financial assistance for your hearing aids
 
How much caffeine you should consume daily while using workout supplements
How much caffeine you should consume daily while using workout supplementsHow much caffeine you should consume daily while using workout supplements
How much caffeine you should consume daily while using workout supplements
 

Similar to Oracle Data Load and Extract Jobs

Less04 instance
Less04 instanceLess04 instance
Less04 instanceImran Ali
 
Oracle All-in-One - how to send mail with attach using oracle pl/sql
Oracle All-in-One - how to send mail with attach using oracle pl/sqlOracle All-in-One - how to send mail with attach using oracle pl/sql
Oracle All-in-One - how to send mail with attach using oracle pl/sqlMassimo Cenci
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneDeepti Singh
 
An overview of snowflake
An overview of snowflakeAn overview of snowflake
An overview of snowflakeSivakumar Ramar
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneDeepti Singh
 
XFILES, The APEX 4 version - The truth is in there
XFILES, The APEX 4 version - The truth is in thereXFILES, The APEX 4 version - The truth is in there
XFILES, The APEX 4 version - The truth is in thereMarco Gralike
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby databaseJorge Batista
 
Capitulo 01 Dba 2
Capitulo 01 Dba 2Capitulo 01 Dba 2
Capitulo 01 Dba 2Julio Pari
 
Create manula and automaticly database
Create manula and automaticly databaseCreate manula and automaticly database
Create manula and automaticly databaseAnar Godjaev
 
Auditing security of Oracle DB (Karel Miko)
Auditing security of Oracle DB (Karel Miko)Auditing security of Oracle DB (Karel Miko)
Auditing security of Oracle DB (Karel Miko)DCIT, a.s.
 
Capturing, Analyzing and Optimizing MySQL
Capturing, Analyzing and Optimizing MySQLCapturing, Analyzing and Optimizing MySQL
Capturing, Analyzing and Optimizing MySQLRonald Bradford
 
Capturing, Analyzing, and Optimizing your SQL
Capturing, Analyzing, and Optimizing your SQLCapturing, Analyzing, and Optimizing your SQL
Capturing, Analyzing, and Optimizing your SQLPadraig O'Sullivan
 
Powershell Training
Powershell TrainingPowershell Training
Powershell TrainingFahad Noaman
 
Distrubuted database connection with oracle
Distrubuted database connection with oracleDistrubuted database connection with oracle
Distrubuted database connection with oracleashrafulais
 
Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940gopalchsamanta
 

Similar to Oracle Data Load and Extract Jobs (20)

Less04 instance
Less04 instanceLess04 instance
Less04 instance
 
plsql Les05
plsql Les05 plsql Les05
plsql Les05
 
Oracle All-in-One - how to send mail with attach using oracle pl/sql
Oracle All-in-One - how to send mail with attach using oracle pl/sqlOracle All-in-One - how to send mail with attach using oracle pl/sql
Oracle All-in-One - how to send mail with attach using oracle pl/sql
 
Plsql les04
Plsql les04Plsql les04
Plsql les04
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
 
An overview of snowflake
An overview of snowflakeAn overview of snowflake
An overview of snowflake
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
 
XFILES, The APEX 4 version - The truth is in there
XFILES, The APEX 4 version - The truth is in thereXFILES, The APEX 4 version - The truth is in there
XFILES, The APEX 4 version - The truth is in there
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby database
 
10053 otw
10053 otw10053 otw
10053 otw
 
Sqllite
SqlliteSqllite
Sqllite
 
Capitulo 01 Dba 2
Capitulo 01 Dba 2Capitulo 01 Dba 2
Capitulo 01 Dba 2
 
Create manula and automaticly database
Create manula and automaticly databaseCreate manula and automaticly database
Create manula and automaticly database
 
Auditing security of Oracle DB (Karel Miko)
Auditing security of Oracle DB (Karel Miko)Auditing security of Oracle DB (Karel Miko)
Auditing security of Oracle DB (Karel Miko)
 
Capturing, Analyzing and Optimizing MySQL
Capturing, Analyzing and Optimizing MySQLCapturing, Analyzing and Optimizing MySQL
Capturing, Analyzing and Optimizing MySQL
 
Capturing, Analyzing, and Optimizing your SQL
Capturing, Analyzing, and Optimizing your SQLCapturing, Analyzing, and Optimizing your SQL
Capturing, Analyzing, and Optimizing your SQL
 
Powershell Training
Powershell TrainingPowershell Training
Powershell Training
 
Distrubuted database connection with oracle
Distrubuted database connection with oracleDistrubuted database connection with oracle
Distrubuted database connection with oracle
 
Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940Maa wp-10g-racprimaryracphysicalsta-131940
Maa wp-10g-racprimaryracphysicalsta-131940
 
Less04_Database_Instance.ppt
Less04_Database_Instance.pptLess04_Database_Instance.ppt
Less04_Database_Instance.ppt
 

Oracle Data Load and Extract Jobs

  • 1. Atlantic Oracle Training Conference - December 20051 Kick Up Your Data Load And Data Extract Jobs A Notch! Mary Wagner Database Administrator / Developer Delaware Department of Transportation
  • 2. Atlantic Oracle Training Conference - December 20052 My Background  Currently employed as a Database Administrator / Developer  Certified in Oracle 8i and 9i  Experience using 7, 8i, 9i, 10g release 1, RAC 10 years of IT Experience including…  Database administration, design, development  Java and PL/SQL development  Internet / Intranet web site development  LAN Administration
  • 3. Atlantic Oracle Training Conference - December 20053 Session Goal  To provide an introduction to external tables and directory objects, along with some simple, practical examples, so that you can begin to work with and investigate these new Oracle features.
  • 4. Atlantic Oracle Training Conference - December 20054 Session Objectives  Directory Object Overview  External Table Overview  Setting up for the Examples  Example 1 - Using Directory Objects and External Tables in a Data Load Job  Example 2 – Using Directory Objects and External Tables in a Data Extract Job
  • 5. Atlantic Oracle Training Conference - December 20055 Directory Object Overview (1) What is a Directory Object?  Alias for an existing operating system directory  Exists as object within the Oracle database  Can be referred to in PL/SQL code
  • 6. Atlantic Oracle Training Conference - December 20056 Directory Object Overview (2) Why Use Them?  Create new output paths without restarting the database  Control access to output paths through database permissioning  Dynamically create directory output paths within PL/SQL procedures (i.e. for dates, etc.)  More…….
  • 7. Atlantic Oracle Training Conference - December 20057 Directory Object Overview (3) Requirements:  “Create Any Directory” privilege  Existence of related operating system directory  OS Permissioning of operating system directory for Oracle database processes (i.e. oracle user on unix/linux)  Granting of privileges to database user who will run PL/SQL referring to the directory object
  • 8. Atlantic Oracle Training Conference - December 20058 Directory Object Overview (4) Creation and Permissioning: mydba > @C:aotc_fall_2005scriptscreate_myuser.sql mydba > create or replace directory DIR_AOTC_FALL_2005_MY_OUTPUT1 as 'C:aotc_fall_2005my_output1'; mydba > grant read, write on directory DIR_AOTC_FALL_2005_MY_OUTPUT1 to MYUSER;
  • 9. Atlantic Oracle Training Conference - December 20059 Directory Object Overview (4-b) Creation and Permissioning: mydba > create or replace directory DIR_AOTC_FALL_2005_MY_OUTPUT2 as 'C:aotc_fall_2005my_output2'; mydba > grant read, write on directory DIR_AOTC_FALL_2005_MY_OUTPUT2 to MYUSER;
  • 10. Atlantic Oracle Training Conference - December 200510 Directory Object Overview (5) Use Example: myuser > select * from dba_directories; myuser > @C:aotc_fall_2005scriptscreate_pkg_test.sql myuser > exec pkg_test.write_to_file_test; myuser > exec pkg_test.write_to_file_test_dynamic('DIR_AOTC_FALL_2005_MY_ OUTPUT2', 'test_file2.txt');
  • 11. Atlantic Oracle Training Conference - December 200511 External Table Overview (1) What is an External Table?  A type of Oracle database table  Points to an operating system file  DDL refers to directory object  Can INSERT INTO….SELECT …. FROM …..MERGE  Can perform multi table UPDATES  Can JOIN with regular database tables  9i – Read only, table can only be queried  10g – Can also extract to, using ORACLE_DATAPUMP type
  • 12. Atlantic Oracle Training Conference - December 200512 External Table Overview (2) Why Use Them?  Can use any SQL function on them to selectively load/insert data into a database table  Can update a database table from them  Can incorporate data loads or updates from them using PL/SQL procedures  Can unload/extract data to them to reload into another oracle database (10g only)
  • 13. Atlantic Oracle Training Conference - December 200513 External Table Overview (3) Requirements:  Existence of related operating system file  OS Permissioning of operating system directory and file for Oracle database processes (i.e. oracle user on unix/linux)  Granting of privileges to database user who will run PL/SQL referring to the external table  “CREATE TABLE” privilege (10g release 2)
  • 14. Atlantic Oracle Training Conference - December 200514 External Table Overview (3-b) When not to use External Tables:  If LOBS are involved  If the source file has to be accessed on a remote server  If more than one user needs to access the external table at the same time to load data
  • 15. Atlantic Oracle Training Conference - December 200515 External Table Overview (4) Creation : myuser > CREATE TABLE EXT_TEST_FILE_TABLE ( LASTNAME VARCHAR2(50), FIRSTNAME VARCHAR2(50) ) ORGANIZATION EXTERNAL ( TYPE ORACLE_LOADER …….
  • 16. Atlantic Oracle Training Conference - December 200516 External Table Overview (5) Use Example: myuser > desc ext_test_file_table; myuser > select * from user_objects; myuser > select * from ext_test_file_table; myuser > select * from ext_test_file_table; myuser > select substr(firstname, 1, 1) || lastname as username from ext_test_file_table; myuser > select firstname || ' ' || lastname as fullname from ext_test_file_table;
  • 17. Atlantic Oracle Training Conference - December 200517 External Table Overview (5-b) Changing file name and directory location : myuser > ALTER TABLE ext_test_file_table LOCATION ( 'test_file2.txt' ); myuser > ALTER TABLE ext_test_file_table DEFAULT DIRECTORY DIR_AOTC_FALL_2005_MY_OUTPUT2; myuser > select * from ext_test_file_table;
  • 18. Atlantic Oracle Training Conference - December 200518 Setting Up for the Examples.  Grant additional rights to the example user mydba > @create_myuser.sql (already created earlier)  Create the example table myuser > @create_table.sql  Create the FTP PL/SQL package myuser > @create_pkg_ftp.sql  Create the EMAIL PL/SQL package myuser > @create_pkg_email.sql  Create the EXAMPLE PL/SQL package myuser > @create_pkg_examples.sql
  • 19. Atlantic Oracle Training Conference - December 200519 Example 1 –> Step 1.) Create a New Directory. mydba> grant create any directory to myuser; myuser> select * from dba_directories; myuser> create or replace directory DIR_AOTC_FALL_2005_EXAMPLE1 as 'C:aotc_fall_2005example1'; myuser> select * from dba_directories;
  • 20. Atlantic Oracle Training Conference - December 200520 Example 1 –> Step 2.) Create External Table. myuser> CREATE TABLE EXT_EMPLOYEE_FILE (EMPLOYEEID NUMBER(3), LASTNAME VARCHAR2(32), FIRSTNAME VARCHAR2(32), PHONE VARCHAR2(13), EMAILADDRESS VARCHAR2(32), ) ORGANIZATION EXTERNAL ( TYPE ORACLE_LOADER ………..
  • 21. Atlantic Oracle Training Conference - December 200521 Example 1 –> Step 3.) Get Source File PKG_EXAMPLES.EMPLOYEE_DATA_LOAD_AND_FTP RUN_FTP(p_ftp_command => 'get', p_ftp_xfer_type => 'ascii', p_ftp_server => 'servername', p_ftp_port => '21', p_ftp_username => 'os_user', p_ftp_password => 'os_password', p_directory => 'DIR_AOTC_FALL_2005_EXAMPLE1', p_source_filename => 'employee_file_new.dat', p_dest_filename =>'employee_file_new.txt');
  • 22. Atlantic Oracle Training Conference - December 200522 Example 1 –> Step 4.) Load Data PKG_EXAMPLES.EMPLOYEE_DATA_LOAD_AND_FTP myuser> INSERT INTO EMPLOYEES SELECT EMPLOYEEID, LASTNAME, FIRSTNAME, FIRSTNAME || ' ' || LASTNAME, PHONE, LOWER(EMAILADDRESS) FROM EXT_EMPLOYEE_FILE; myuser> COMMIT;
  • 23. Atlantic Oracle Training Conference - December 200523 Example 1 –> Step 5.) Send Email Notification PKG_EXAMPLES.EMPLOYEE_DATA_LOAD_AND_FTP PKG_EMAIL.send (p_smtp_host => 'smtp.mycompany.com', p_sender_email => 'pkg_examples.employee_data_load_and_ftp@mydb', p_from => 'pkg_examples.employee_data_load_and_ftp@mydb', p_to => pkg_email.array('jsmith@mycompany.com'), p_cc => pkg_email.array('jdoe@mycompany.com', 'sjackson@mycompany.com'), p_bcc => pkg_email.array('dba@mycompany.com'), p_subject => 'EMPLOYEE DATA LOAD AND FTP JOB SUCCEEDED', p_body => 'The employee load and ftp job completed successfully at -- ' || TO_CHAR(SYSDATE, 'MM/DD/YYYY HH24:MI:SS'));
  • 24. Atlantic Oracle Training Conference - December 200524 Example 1 –> Step 6.) Run or Schedule PL/SQL Procedures exec PKG_EXAMPLES.EMPLOYEE_DATA_LOAD_AND_FTP Because everything is now in PL/SQL, you can :  Schedule it to run through DBMS_JOB  Schedule it to run through DBMS_SCHEDULER  Schedule it to run through Oracle Management Server Or run it manually………..
  • 25. Atlantic Oracle Training Conference - December 200525 Example 2 –> Step 1.) Alter External Table PKG_EXAMPLES.EMPLOYEE_DATA_MERGE_AND_FTP myuser > ALTER TABLE EXT_EMPLOYEE_FILE LOCATION ( 'employee_file_new_and_existing.txt' ); myuser > SELECT * FROM EXT_EMPLOYEE_FILE;
  • 26. Atlantic Oracle Training Conference - December 200526 Example 2 –> Step 2.) Get Source File PKG_EXAMPLES.EMPLOYEE_DATA_LOAD_AND_FTP RUN_FTP(p_ftp_command => 'get', p_ftp_xfer_type => 'ascii', p_ftp_server => 'servername', p_ftp_port => '21', p_ftp_username => 'os_user', p_ftp_password => 'os_password', p_directory => 'DIR_AOTC_FALL_2005_EXAMPLE1', p_source_filename => 'employee_file_new_and_existing.dat', p_dest_filename =>'employee_file_new_and_existing.txt');
  • 27. Atlantic Oracle Training Conference - December 200527 Example 2 –> Step 3.) Merge Data PKG_EXAMPLES.EMPLOYEE_DATA_MERGE_AND_FTP MERGE INTO employees e USING EXT_EMPLOYEE_FILE e_ext ON (E.EMPLOYEEID=E_EXT.EMPLOYEEID) WHEN MATCHED THEN UPDATE set e.firstname=e_ext.firstname, e.lastname=e_ext.lastname, e.fullname=e_ext.firstname || ' ' || e_ext.lastname, e.phone=e_ext.phone, e.emailaddress=lower(e_ext.emailaddress) WHEN NOT MATCHED THEN…….
  • 28. Atlantic Oracle Training Conference - December 200528 Example 2 –> Step 4.) Send Email Notification PKG_EXAMPLES.EMPLOYEE_DATA_MERGE_AND_FTP PKG_EMAIL.send (p_smtp_host => 'smtp.mycompany.com', p_sender_email => 'pkg_examples.employee_data_load_and_ftp@mydb', p_from => 'pkg_examples.employee_data_load_and_ftp@mydb', p_to => pkg_email.array('jsmith@mycompany.com'), p_cc => pkg_email.array('jdoe@mycompany.com', 'sjackson@mycompany.com'), p_bcc => pkg_email.array('dba@mycompany.com'), p_subject => 'EMPLOYEE DATA MERGE AND FTP JOB SUCCEEDED', p_body => 'The employee merge and ftp job completed successfully at -- ' || TO_CHAR(SYSDATE, 'MM/DD/YYYY HH24:MI:SS'));
  • 29. Atlantic Oracle Training Conference - December 200529 Example 2 –> Step 5.) Run or Schedule PL/SQL Procedures exec PKG_EXAMPLES.EMPLOYEE_DATA_MERGE_AND_FTP Because everything is now in PL/SQL, you can :  Schedule it to run through DBMS_JOB  Schedule it to run through DBMS_SCHEDULER  Schedule it to run through Oracle Management Server Or run it manually………..
  • 30. Atlantic Oracle Training Conference - December 200530 Example 3 (10g) –> Step 1.) Create a New Directory. PKG_EXAMPLES.EMPLOYEE_DATA_EXTRACT_AND_FTP myuser > create or replace directory DIR_AOTC_FALL_2005_EXAMPLE3 as 'C:aotc_fall_2005example3';
  • 31. Atlantic Oracle Training Conference - December 200531 Example 3 (10g) –> Step 2.) Create External Table - Extract Data PKG_EXAMPLES.EMPLOYEE_DATA_EXTRACT_AND_FTP myuser> CREATE TABLE EMPLOYEE_EXTRACT ORGANIZATION EXTERNAL ( TYPE ORACLE_DATAPUMP DEFAULT DIRECTORY DIR_AOTC_FALL_2005_EXAMPLE3 LOCATION( 'EMPLOYEE_EXTRACT.DAT’ ) ) AS SELECT * FROM EMPLOYEES /
  • 32. Atlantic Oracle Training Conference - December 200532 Example 3(10g) –> Step 3.) FTP Data Extract File PKG_EXAMPLES.EMPLOYEE_DATA_EXTRACT_AND_FTP RUN_FTP(p_ftp_command => 'put', p_ftp_xfer_type => 'binary', p_ftp_server => 'servername', p_ftp_port => '21', p_ftp_username => 'os_user', p_ftp_password => 'os_password', p_directory => 'DIR_AOTC_FALL_2005_EXAMPLE2', p_source_filename => 'employee_extract.dat', p_dest_filename =>'employee_extract_' || TO_CHAR(SYSDATE, 'MMDDYYHH24MI') || '.txt');
  • 33. Atlantic Oracle Training Conference - December 200533 Example 3 (10g) –> Step 4.) Send Email Notification PKG_EXAMPLES.EMPLOYEE_DATA_EXTRACT_AND_FTP PKG_EMAIL.send (p_smtp_host => 'smtp.mycompany.com', p_sender_email => 'pkg_examples.employee_data_load_and_ftp@mydb', p_from => 'pkg_examples.employee_data_load_and_ftp@mydb', p_to => pkg_email.array('jsmith@mycompany.com'), p_cc => pkg_email.array('jdoe@mycompany.com', 'sjackson@mycompany.com'), p_bcc => pkg_email.array('dba@mycompany.com'), p_subject => 'EMPLOYEE DATA EXTRACT AND FTP JOB SUCCEEDED', p_body => 'The employee extract and ftp job completed successfully at -- ' || TO_CHAR(SYSDATE, 'MM/DD/YYYY HH24:MI:SS'));
  • 34. Atlantic Oracle Training Conference - December 200534 Example 3 (10g)–> Step 5.) Run or Schedule PL/SQL Procedure exec PKG_EXAMPLES.EMPLOYEE_DATA_EXTRACT_AND_FTP Because everything is now in PL/SQL, you can :  Schedule it to run through DBMS_JOB  Schedule it to run through DBMS_SCHEDULER  Schedule it to run through Oracle Management Server Or run it manually………..
  • 35. Atlantic Oracle Training Conference - December 200535 Miscellaneous Notes  Be Careful With Directory Permissions – Be frugal when granting “create any directory” permissions to users. If they create it, they can write to it through the database.  Case Sensitivity – Be aware of OS directory and file name case sensitivity when creating directory objects and external tables in Oracle.  Do The Research – Your environment is not going to be exactly the same as any one else's. Read the Oracle DOCS and Chapter 15 of Tom Kyte’s new book (and the rest also!).
  • 36. Atlantic Oracle Training Conference - December 200536 Acknowledgements / More Information Oracle Docs / Manuals:  Oracle Database SQL Reference Manual, 9i, 10g, Oracle Corporation  Oracle Database Concepts Manual, 9i, 10g, Oracle Corporation  Oracle Utilities Guide 9i, 10g, Oracle Corporation Other Books:  Expert Oracle Database Architecture, Tom Kyte Web Sites:  http://asktom.oracle.com  http://www.oracle-base.com  http://otn.oracle.com
  • 37. Atlantic Oracle Training Conference - December 200537 Scripts / Contact Info Use the scripts at your own risk and test them fully in your own test environment before using them in a production database. Please email me if you find any errors in the scripts or have any questions. Email me at: maryx.wagner@state.de.us
  • 38. Atlantic Oracle Training Conference - December 200538 Questions? ????????????????????????????????????????????????
  • 39. Atlantic Oracle Training Conference - December 200539 The End. Thanks for Coming and please complete the evaluation!