Load data into Table from external files, using two methods:

Size: px
Start display at page:

Download "Load data into Table from external files, using two methods:"

Transcription

1 Load data into Table from external files, using two methods: 1) SQL Loader 2) External tables I) SQL Loader. Source Table Name : SYS.DBA_USERS Target Table Name : SYS.MY_DBA_USERS 1) We need to have the Data file with comma separated fields. I will unload data from DBA_USERS table. cat csv.sql REM Comma separated data REM REM Run as below REM <Owner> <Tablename> REM TEST EMP REM Create By : Malesh Gummula set echo off set verify off set pages 0 set feedback off set trimspool on set line 200 spool run_sql.sql prompt set echo off prompt set pages 0 prompt set feedback off prompt set trimspool on prompt set line prompt spool oradata.txt

2 SELECT CASE WHEN rownum = SELECT COUNT1) + 1 FROM dba_tab_columns WHERE owner = upper'&&1') AND table_name = upper'&&2')) THEN substroutput, 1, instroutput, ' ', 1) - 1) ELSE output END AS query FROM SELECT rownum, a.* FROM SELECT 'Select ' AS output FROM dual UNION ALL SELECT column_name ' '','' ' FROM SELECT column_name FROM dba_tab_columns WHERE owner = upper'&1') AND table_name = upper'&2') ORDER BY column_id) UNION ALL SELECT 'from &1..&2; ' FROM dual) a) b; prompt spool off spool off REM Now run the query REM #####################End of Creating DAT File ############## 2) Run the Above SQL to Generate data file named oradata.txt SYS DBA_USERS garacdev02:/opt/oracle: cat oradata.txt SYS,0,,OPEN,,02-SEP-12,SYSTEM,TEMP,06-MAR-12,DEFAULT,SYS_GROUP,,10G 11G,N,PASSWORD SYSTEM,5,,OPEN,,24-SEP-12,SYSTEM,TEMP,06-MAR-12,DEFAULT,SYS_GROUP,,10G 11G,N,PASSWORD E517137,84,,OPEN,,16-SEP-12,USERS,TEMP,06-MAR- TEST,85,,OPEN,,05-DEC-12,USERS,TEMP,20-MAR-12,DEFAULT,DEFAULT_CONSUMER_GROUP,,10G 11G,N,PASSWORD E465800,86,,OPEN,,20-JAN-13,USERS,TEMP,24-JUL- OUTLN,9,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSTEM,TEMP,06-MAR- MGMT_VIEW,74,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSTEM,TEMP,06-MAR- FLOWS_FILES,75,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- MDSYS,57,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- WMSYS,32,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- APPQOSSYS,31,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR-

3 APEX_030200,78,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- OWBSYS_AUDIT,83,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- DBSNMP,30,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- OWBSYS,79,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- ORDDATA,54,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- ANONYMOUS,46,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- 12,DEFAULT,DEFAULT_CONSUMER_GROUP,,,N,PASSWORD EXFSYS,42,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- XDB,45,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- ORDSYS,53,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- CTXSYS,43,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- ORDPLUGINS,55,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- SYSMAN,72,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- OLAPSYS,61,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- SI_INFORMTN_SCHEMA,56,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,SYSAUX,TEMP,06-MAR- XS$NULL, ,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,USERS,TEMP,06-MAR- MDDATA,65,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,USERS,TEMP,06-MAR- ORACLE_OCM,21,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,USERS,TEMP,06-MAR- DIP,14,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,USERS,TEMP,06-MAR- APEX_PUBLIC_USER,76,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,USERS,TEMP,06-MAR- SPATIAL_CSW_ADMIN_USR,70,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,USERS,TEMP,06-MAR- SPATIAL_WFS_ADMIN_USR,67,,EXPIRED & LOCKED,06-MAR-12,06-MAR-12,USERS,TEMP,06-MAR- 3) Create SQLLDR control file Dynamically. To insert data in <Owner>.MY_<Tablename> E.g. SYS.my_DBA_USERS Note : You can run the below script without any parameters in same session of step 1 cat cntl.sql REM #####################Generating SQLLDR control file ############## set verify off set pages 0 set feedback off set trimspool on set line 200 set pages 0 set recsep off prompt "Generating SQL Loader File..." spool loader.ctl

4 SELECT CASE WHEN rownum = SELECT COUNT1) + 1 FROM dba_tab_columns WHERE owner = upper'&&1') AND table_name = upper'&&2')) THEN substroutput, 1, instroutput, ',', 1) - 1) ELSE output END query FROM SELECT 'LOAD Data' chr10) chr9) 'infile ''oradata.txt''' chr10) chr9) 'into table &&1..my_&&2' chr10) chr9) 'fields terminated by "," optionally enclosed by ''"'' ' chr10) chr9) '' AS output FROM dual UNION ALL SELECT chr9) column_name ',' FROM SELECT column_name FROM dba_tab_columns WHERE owner = upper'&1') AND table_name = upper'&2') ORDER BY column_id)) b UNION ALL SELECT chr9) ')' FROM dual; spool off prompt " End of Generating SQL Loader File..." REM #####################End of Generating SQLLDR control file ############## 4) Run above script to create control file SYS DBA_USERS "Generating SQL Loader File..." LOAD Data infile 'oradata.txt' into table SYS.my_DBA_USERS fields terminated by "," optionally enclosed by '"' USERNAME, USER_ID, PASSWORD, ACCOUNT_STATUS, LOCK_DATE, EXPIRY_DATE, DEFAULT_TABLESPACE, TEMPORARY_TABLESPACE, CREATED, PROFILE,

5 INITIAL_RSRC_CONSUMER_GROUP, EXTERNAL_NAME, PASSWORD_VERSIONS, EDITIONS_ENABLED, AUTHENTICATION_TYPE ) " End of Generating SQL Loader File..." 5) Now we have data file and control file for SQLLDR input, so we can run the sql loader now. Note : this will create table where data needs to be loaded in same schema of source table, before creating Target table it will drop Target table. Source Table Name : SYS.DBA_USERS Target Table Name : SYS.MY_DBA_USERS cat load.sql set echo on set line 200 set pages 200 set verify on set feedback on drop table &&1..my_&&2; create table &&1..my_&&2 as select * from &&1..&&2 where 1=2; set echo off prompt " Executing SQL Loader to load Data..." REM for Unix => host sqlldr \'/ AS SYSDBA\' control=loader.ctl host sqlldr \'/ AS SYSDBA\' control=loader.ctl REM host sqlldr '/ AS SYSDBA' control=loader.ctl prompt " End of Executing SQL Loader to load Data..." select * from &&1..my_&&2; 6) Now run the script load.sql to load data from sqlplus SYS DBA_USERS Output: SQL> set line 200 SQL> set pages 200 SQL> set verify on SQL> set feedback on SQL> SQL> drop table &&1..my_&&2; old 1: drop table &&1..my_&&2

6 new 1: drop table SYS.my_DBA_USERS Table dropped. SQL> create table &&1..my_&&2 as select * from &&1..&&2 where 1=2; old 1: create table &&1..my_&&2 as select * from &&1..&&2 where 1=2 new 1: create table SYS.my_DBA_USERS as select * from SYS.DBA_USERS where 1=2 Table created. SQL> SQL> set echo off " Executing SQL Loader to load Data..." SQL*Loader: Release Production on Tue Aug 14 07:45: Copyright c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Commit point reached - logical record count 32 " End of Executing SQL Loader to load Data..." old new 1: select * from &&1..my_&&2 1: select * from SYS.my_DBA_USERS

7 II) External Tables 1) We will load the data in table TEST.EMP CREATE TABLE test.emp eno NUMBER4), ename varchar220), dno NUMBER4) ); SQL> desc TEST.emp Name Null? Type ENO NOT NULL NUMBER4) ENAME VARCHAR220) DNO NUMBER4) SQL> select * from test.emp; no rows selected 2) Create Directory Object in database and copy the data file to the directory location. SQL> CREATE OR REPLACE DIRECTORY ext_tab_dir AS '/u02/exports'; Directory created. cp oradata.txt /u02/exports garacdev02:/opt/oracle: ls -ltr /u02/exports/oradata.txt -rw-r--r-- 1 oracle dba 16 Aug 14 09:41 /u02/exports/oradata.txt garacdev02:/opt/oracle: cat /u02/exports/oradata.txt 1,sam,1 2,tom,2 3) Create External table now SQL> drop table emp_ext; Table dropped. SQL>!ls -ltr /u02/exports total rw-r--r-- 1 oracle dba 16 Aug 14 09:41 oradata.txt

8 SQL> CREATE TABLE emp_ext eno NUMBER4), ename varchar220), dno NUMBER4) ) ORGANIZATION EXTERNAL TYPE ORACLE_LOADER DEFAULT DIRECTORY ext_tab_dir ACCESS PARAMETERS RECORDS DELIMITED BY NEWLINE BADFILE 'bad_%a_%p.bad' LOGFILE 'log_%a_%p.log' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LRTRIM MISSING FIELD VALUES ARE NULL REJECT ROWS WITH ALL NULL FIELDS eno INTEGER EXTERNAL4), ename CHAR20), dno INTEGER EXTERNAL4) ) ) LOCATION 'oradata.txt') ) PARALLEL 5 REJECT LIMIT 0; Table created. Note : Do not provide the full path for data file 'oradata.txt', as path will be picked from DEFAULT DIRECTORY ext_tab_dir clause, ie directory which we created in step 2. SQL> select * from emp_ext; ENO ENAME DNO sam 1 2 tom 2 4) Check Log files created in Directory location SQL>!ls -ltr /u02/exports total rw-r--r-- 1 oracle dba 16 Aug 14 09:41 oradata.txt -rw-r--r-- 1 oracle dba 676 Aug 14 09:48 log_000_17496.log -rw-r--r-- 1 oracle dba 676 Aug 14 09:48 log_000_20044.log garacdev02:/u02/exports: cat log_000_17496.log

9 LOG file opened at 08/14/12 09:48:24 Field Definitions for table EMP_EXT Record format DELIMITED BY NEWLINE Data in file has same endianness as the platform Reject rows with all null fields Fields in Data Source: ENO Integer external 4) ENAME CHAR 20) DNO Integer external 4) garacdev02:/u02/exports: cat log_000_20044.log LOG file opened at 08/14/12 09:48:25 Field Definitions for table EMP_EXT Record format DELIMITED BY NEWLINE Data in file has same endianness as the platform Reject rows with all null fields Fields in Data Source: ENO Integer external 4) ENAME CHAR 20) DNO Integer external 4) 5) Now you can transfer the data from external table to regular table SQL> drop table test.emp; Table dropped. SQL> create table test.emp as select * from emp_ext; Table created.

10 SQL> select * from test.emp; ENO ENAME DNO sam 1 2 tom 2 6) END

Getting Started With Oracle

Getting Started With Oracle Getting Started With Oracle Ashikur Rahman CSE, BUET July 14, 2016 1 Logging In to Oracle You should be logged onto one of the Windows 7 machine in the database lab. Open the command promt first by typping

More information

Get Oracle Schema Ddl Syntax With Dbms_metadata

Get Oracle Schema Ddl Syntax With Dbms_metadata Get Oracle Schema Ddl Syntax With Dbms_metadata It there an easy way to extract DDLs from an Oracle 10 schema (tables and route, then rather than trying to convert Oracle DDL syntax to H2 you'd be better

More information

Chapter 14 Data Dictionary and Scripting

Chapter 14 Data Dictionary and Scripting Chapter 14 Data Dictionary and Scripting Tables in the Oracle Database User Tables Collection of tables to store data Data Dictionary Tables Collection of tables created and maintained by Oracle server

More information

Database Administration and Management

Database Administration and Management Database Administration and Management M.Sc. Information Technology BS Information Technology Umair Shafique (Gold Medalist) Lecturer Installation Oracle Installation and Starting Manual for Installation

More information

What are temporary tables? When are they useful?

What are temporary tables? When are they useful? What are temporary tables? When are they useful? Temporary tables exists solely for a particular session, or whose data persists for the duration of the transaction. The temporary tables are generally

More information

Oracle ILM Assistant Installation Guide Version 1.4

Oracle ILM Assistant Installation Guide Version 1.4 Oracle ILM Assistant Installation Guide Version 1.4 This document provides instructions for installing and running Oracle Information Lifecycle Management (ILM) Assistant. Version: 1.4 Oracle Corporation

More information

SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database.

SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database. SQL SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database. SQL*Plus SQL*Plus is an application that recognizes & executes SQL commands &

More information

Creating and Managing Tables Schedule: Timing Topic

Creating and Managing Tables Schedule: Timing Topic 9 Creating and Managing Tables Schedule: Timing Topic 30 minutes Lecture 20 minutes Practice 50 minutes Total Objectives After completing this lesson, you should be able to do the following: Describe the

More information

SunGard Higher Education Solutions Converter Tool Training. Introduction. Agenda. <print name> Technical Consultant

SunGard Higher Education Solutions Converter Tool Training. Introduction. Agenda. <print name> Technical Consultant SunGard Higher Education Solutions Converter Tool Training Technical Consultant Introduction The SunGard Higher Education Solutions Converter Tool is an Oracle Forms application that simplifies

More information

ORACLE VIEWS ORACLE VIEWS. Techgoeasy.com

ORACLE VIEWS ORACLE VIEWS. Techgoeasy.com ORACLE VIEWS ORACLE VIEWS Techgoeasy.com 1 Oracle VIEWS WHAT IS ORACLE VIEWS? -A view is a representation of data from one or more tables or views. -A view is a named and validated SQL query which is stored

More information

Sqlplus To Create The Plan_table In Your Schema

Sqlplus To Create The Plan_table In Your Schema Sqlplus To Create The Plan_table In Your Schema It provides an example of how to create a SQL Plan Baseline for a query with auto capture, and it demonstrates how You can use sqlplus on the commandline

More information

SQL Structured Query Language Introduction

SQL Structured Query Language Introduction SQL Structured Query Language Introduction Rifat Shahriyar Dept of CSE, BUET Tables In relational database systems data are represented using tables (relations). A query issued against the database also

More information

Database Programming with SQL

Database Programming with SQL Database Programming with SQL 13-1 Objectives In this lesson, you will learn to: List and categorize the main database objects Review a table structure Describe how schema objects are used by the Oracle

More information

Instruction Decode In Oracle Sql Loader Control File Example Csv

Instruction Decode In Oracle Sql Loader Control File Example Csv Instruction Decode In Oracle Sql Loader Control File Example Csv The examples in this article require the SCOTT schema. SET PAGESIZE 0 LINESIZE 100 TRIMSPOOL ON FEEDBACK OFF SPOOL such that all the default

More information

SPRIDEN 5 PHVTIME 5 SPRIDEN_FIRST_NAME VARCHAR2(60)... SPRIDEN_MI VARCHAR2(60)...

SPRIDEN 5 PHVTIME 5 SPRIDEN_FIRST_NAME VARCHAR2(60)... SPRIDEN_MI VARCHAR2(60)... SPRIDEN 5 SPRIDEN_PIDM NUMBER(8) SPRIDEN_ID (9) SPRIDEN_LAST_NAME SPRIDEN_FIRST_NAME... SPRIDEN_MI... SPRIDEN_CHANGE_IND SPRIDEN_ENTITY_IND SPRIDEN_ACTIVITY_DATE DATE SPRIDEN_USER... SPRIDEN_ORIGIN...

More information

Assignment 6. This lab should be performed under the Oracle Linux VM provided in the course.

Assignment 6. This lab should be performed under the Oracle Linux VM provided in the course. Assignment 6 This assignment includes hands-on exercises in the Oracle VM. It has two Parts. Part 1 is SQL Injection Lab and Part 2 is Encryption Lab. Deliverables You will be submitting evidence that

More information

This lab will introduce you to MySQL. Begin by logging into the class web server via SSH Secure Shell Client

This lab will introduce you to MySQL. Begin by logging into the class web server via SSH Secure Shell Client Lab 2.0 - MySQL CISC3140, Fall 2011 DUE: Oct. 6th (Part 1 only) Part 1 1. Getting started This lab will introduce you to MySQL. Begin by logging into the class web server via SSH Secure Shell Client host

More information

Database Compatibility for Oracle Developers Tools and Utilities Guide

Database Compatibility for Oracle Developers Tools and Utilities Guide Database Compatibility for Oracle Developers EDB Postgres Advanced Server 10 August 29, 2017 by EnterpriseDB Corporation Copyright 2007-2017 EnterpriseDB Corporation. All rights reserved. EnterpriseDB

More information

Oracle 11g Invisible Indexes Inderpal S. Johal. Inderpal S. Johal, Data Softech Inc.

Oracle 11g Invisible Indexes   Inderpal S. Johal. Inderpal S. Johal, Data Softech Inc. ORACLE 11G INVISIBLE INDEXES Inderpal S. Johal, Data Softech Inc. INTRODUCTION In this document we will work on another Oracle 11g interesting feature called Invisible Indexes. This will be very helpful

More information

COSC 304 Introduction to Database Systems. Views and Security. Dr. Ramon Lawrence University of British Columbia Okanagan

COSC 304 Introduction to Database Systems. Views and Security. Dr. Ramon Lawrence University of British Columbia Okanagan COSC 304 Introduction to Database Systems Views and Security Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Views A view is a named query that is defined in the database.

More information

Oracle Login Max Length Of Column Name 11g Table

Oracle Login Max Length Of Column Name 11g Table Oracle Login Max Length Of Column Name 11g Table Table 6-1 shows the datatypes recognized by Oracle. Maximum size is 4000 bytes or characters, and minimum is 1 byte or 1 character. name that differs from

More information

I need to get the maximum length of data per each column in a bunch of tables. are looking at BEGIN -- loop through column names in all_tab_columns.

I need to get the maximum length of data per each column in a bunch of tables. are looking at BEGIN -- loop through column names in all_tab_columns. Oracle Login Maximum Length Of Data In Column Names This chapter contains reference information for Oracle Big Data SQL: Sign In Icon Use this property when the source field names exceed the maximum length

More information

7/17/2018. Copyright 2016, Oracle and/or its affiliates. All rights reserved. 2

7/17/2018. Copyright 2016, Oracle and/or its affiliates. All rights reserved. 2 Copyright 2016, Oracle and/or its affiliates. All rights reserved. 2 1 Typical speaker ego slide blog connor-mcdonald.com youtube tinyurl.com/connor-tube twitter @connor_mc_d Copyright 2016, Oracle and/or

More information

This chapter describes the information contained in SQL*Loader log file output. Chapter 9, "Conventional and Direct Path Loads" This chapter

This chapter describes the information contained in SQL*Loader log file output. Chapter 9, Conventional and Direct Path Loads This chapter PartII SQL*Loader The chapters in this section describe the SQL*Loader utility: Chapter 3, "SQL*Loader Concepts" This chapter introduces SQL*Loader and describes its features. It also introduces data loading

More information

Getting Award Information into Your SIS

Getting Award Information into Your SIS Getting Award Information into Your SIS Agenda Introductions What s an API? What Information is Available? What is the Process? Gotchas? What s an API? API An application programming interface specifies

More information

The Encryption Wizard for Oracle. API Library Reference

The Encryption Wizard for Oracle. API Library Reference The Encryption Wizard for Oracle For Oracle 9i, 10g and 11g Databases Version 7 Copyright 2003-2008 All Rights Reserved. Copyright 2008-2010 The Encryption Wizard for Oracle RDC) 12021 Wilshire Blvd Suite

More information

The Relational Model. CS157A Chris Pollett Sept. 19, 2005.

The Relational Model. CS157A Chris Pollett Sept. 19, 2005. The Relational Model CS157A Chris Pollett Sept. 19, 2005. Outline A little bit on Oracle on sigma Introduction to the Relational Model Oracle on Sigma Two ways to connect: connect to sigma, then connect

More information

Lab # 3 Hands-On. DML Basic SQL Statements Institute of Computer Science, University of Tartu, Estonia

Lab # 3 Hands-On. DML Basic SQL Statements Institute of Computer Science, University of Tartu, Estonia Lab # 3 Hands-On DML Basic SQL Statements Institute of Computer Science, University of Tartu, Estonia DML: Data manipulation language statements access and manipulate data in existing schema objects. These

More information

Getting started with Oracle

Getting started with Oracle Getting started with Oracle The purpose of these pages is to enable you to get started with using Oracle software. They explain how to create an Oracle account and how to start up and begin to use the

More information

ORACLE Reference. 2. Modify your start-up script file using Option 1 or 2 below, depending on which shell you run.

ORACLE Reference. 2. Modify your start-up script file using Option 1 or 2 below, depending on which shell you run. ORACLE Reference 1 Introduction The ORACLE RDBMS is a relational database management system. A command language called SQL*PLUS (SQL stands for Structured Query Language ) is used for working with an OR-

More information

Oracle Login Maximum Length Of Column Name In 11g Table

Oracle Login Maximum Length Of Column Name In 11g Table Oracle Login Maximum Length Of Column Name In 11g Table Sign In Icon Fusion Middleware Online Documentation Library, 11g Release 1 (11.1.1.7) / Business Working with Logical Tables, Joins, and Columns

More information

1) Introduction to SQL

1) Introduction to SQL 1) Introduction to SQL a) Database language enables users to: i) Create the database and relation structure; ii) Perform insertion, modification and deletion of data from the relationship; and iii) Perform

More information

Set Current Schema Command Oracle Sql Developer Alter Session

Set Current Schema Command Oracle Sql Developer Alter Session Set Current Schema Command Oracle Sql Developer Alter Session sqlauthorization property must be set to true before you can use the GRANT The syntax that you use for the REVOKE statement depends on whether

More information

Tablespace Usage By Schema In Oracle 11g Query To Check Temp

Tablespace Usage By Schema In Oracle 11g Query To Check Temp Tablespace Usage By Schema In Oracle 11g Query To Check Temp The APPS schema has access to the complete Oracle E-Business Suite data model. E-Business Suite Release 12.2 requires an Oracle database block

More information

How to Use Full Pushdown Optimization in PowerCenter

How to Use Full Pushdown Optimization in PowerCenter How to Use Full Pushdown Optimization in PowerCenter 2014 Informatica Corporation. No part of this document may be reproduced or transmitted in any form, by any means (electronic, photocopying, recording

More information

CS Reading Packet: "Set-theoretic operations, more on modifying data, SQL*Loader, and sequences"

CS Reading Packet: Set-theoretic operations, more on modifying data, SQL*Loader, and sequences CS 325 - Reading Packet: "Set-theoretic ops, modifying data, SQLLoader, and sequences" p. 1 CS 325 - Reading Packet: "Set-theoretic operations, more on modifying data, SQLLoader, and sequences" Sources:

More information

1 SQL Structured Query Language

1 SQL Structured Query Language 1 SQL Structured Query Language 1.1 Tables In relational database systems (DBS) data are represented using tables (relations). A query issued against the DBS also results in a table. A table has the following

More information

Managing Data. Copyright 2004, Oracle. All rights reserved.

Managing Data. Copyright 2004, Oracle. All rights reserved. Managing Data Objectives After completing this lesson, you should be able to do the following: Manipulate data through SQL Use Data Pump to export data Use Data Pump to import data Load data with SQL Loader

More information

Oracle Database 12c: SQL Fundamentals. Part COPYRIGHTED MATERIAL

Oracle Database 12c: SQL Fundamentals. Part COPYRIGHTED MATERIAL Oracle Database 12c: SQL Fundamentals Part I COPYRIGHTED MATERIAL Chapter 1 Introducing Oracle Database 12c RDBMS Oracle Database 12c: SQL Fundamentals exam objectives covered in this chapter: Introduction

More information

Unit 1 - Chapter 4,5

Unit 1 - Chapter 4,5 Unit 1 - Chapter 4,5 CREATE DATABASE DatabaseName; SHOW DATABASES; USE DatabaseName; DROP DATABASE DatabaseName; CREATE TABLE table_name( column1 datatype, column2 datatype, column3 datatype,... columnn

More information

SQL: Advanced topics. Assertions

SQL: Advanced topics. Assertions SQL: Advanced topics Prof. Weining Zhang Cs.utsa.edu Assertions Constraints defined over multiple tables. No student is allowed to take more than six courses. SQL> create assertion Course_Constraint check

More information

Write Less Code With More Oracle 12c New Features

Write Less Code With More Oracle 12c New Features Write Less Code With More Oracle 12c New Features Oren Nakdimon www.db-oriented.com oren@db-oriented.com +972-54-4393763 @DBoriented WHO AM I? A CHRONOLOGY BY ORACLE YEARS When What Where Oracle 6/7 1991-1997

More information

COSC 304 Introduction to Database Systems SQL DDL. Dr. Ramon Lawrence University of British Columbia Okanagan

COSC 304 Introduction to Database Systems SQL DDL. Dr. Ramon Lawrence University of British Columbia Okanagan COSC 304 Introduction to Database Systems SQL DDL Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca SQL Overview Structured Query Language or SQL is the standard query language

More information

Database Vault Installation and Configuration

Database Vault Installation and Configuration Best Practice Document Version: 1.0 2015-02-20 Installation and Configuration Guide Document History Version Date Change 1.0 2015-02-20 Document creation 2 2015 SAP SE or an SAP affiliate company. All

More information

Simple SQL. Peter Y. Wu. Dept of Computer and Information Systems Robert Morris University

Simple SQL. Peter Y. Wu. Dept of Computer and Information Systems Robert Morris University Simple SQL Peter Y. Dept of Computer and Information Systems Robert Morris University Simple SQL create table drop table insert into table values ( ) delete from table where update table set a to v where

More information

Who s Afraid of SQL Injection?! Mike Kölbl Sonja Klausburg Siegfried Goeschl

Who s Afraid of SQL Injection?! Mike Kölbl Sonja Klausburg Siegfried Goeschl Who s Afraid of SQL Injection?! Mike Kölbl Sonja Klausburg Siegfried Goeschl 1 http://xkcd.com/327/ 2 What Is SQL Injection? Incorrectly validated or nonvalidated string literals are concatenated into

More information

SQL*Loader Concepts. SQL*Loader Features

SQL*Loader Concepts. SQL*Loader Features 6 SQL*Loader Concepts This chapter explains the basic concepts of loading data into an Oracle database with SQL*Loader. This chapter covers the following topics: SQL*Loader Features SQL*Loader Parameters

More information

LOSS OF FULL DATABASE AND DATABASE RECOVERY ORACLE 11g

LOSS OF FULL DATABASE AND DATABASE RECOVERY ORACLE 11g CONNECT TO TARGET DATABASE USING RMAN $ export ORACLE_SID=crms $ rlrman target / Recovery Manager: Release 11.2.0.1.0 - Production on Sat Jan 31 10:13:56 2015 Copyright (c) 1982, 2009, Oracle and/or its

More information

Performing a 32 bit to 64 bit migration using the Transportable Database RMAN feature

Performing a 32 bit to 64 bit migration using the Transportable Database RMAN feature Performing a 32 bit to 64 bit migration using the Transportable Database RMAN feature This note describes the procedure used to perform a 32 bit to 64 bit conversion of an 11.2.0.3 database on the Linux

More information

Installing and Configuring Oracle 10g Express Edition. for use with the ETM System

Installing and Configuring Oracle 10g Express Edition. for use with the ETM System Installing and Configuring Oracle 10g Express Edition for use with the ETM System Contents Oracle 10g XE Installation and Configuration 1 Preparing Oracle 10g XE for use with the ETM System...1 Installation...1

More information

chapter 2 G ETTING I NFORMATION FROM A TABLE

chapter 2 G ETTING I NFORMATION FROM A TABLE chapter 2 Chapter G ETTING I NFORMATION FROM A TABLE This chapter explains the basic technique for getting the information you want from a table when you do not want to make any changes to the data and

More information

Tutorial 1 Database: Introductory Topics

Tutorial 1 Database: Introductory Topics Tutorial 1 Database: Introductory Topics Theory Reference: Rob, P. & Coronel, C. Database Systems: Design, Implementation & Management, 6th Edition, 2004, Chapter 1. Review Questions 2 7, 9 10. Problems

More information

Views. COSC 304 Introduction to Database Systems. Views and Security. Creating Views. Views Example. Removing Views.

Views. COSC 304 Introduction to Database Systems. Views and Security. Creating Views. Views Example. Removing Views. COSC 304 Introduction to Database Systems Views and Security Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Views A view is a named query that is defined in the database.

More information

SQL: A COMMERCIAL DATABASE LANGUAGE. Data Change Statements,

SQL: A COMMERCIAL DATABASE LANGUAGE. Data Change Statements, SQL: A COMMERCIAL DATABASE LANGUAGE Data Change Statements, Outline 1. Introduction 2. Data Definition, Basic Constraints, and Schema Changes 3. Basic Queries 4. More complex Queries 5. Aggregate Functions

More information

SQL - Subqueries and. Schema. Chapter 3.4 V4.0. Napier University

SQL - Subqueries and. Schema. Chapter 3.4 V4.0. Napier University SQL - Subqueries and Chapter 3.4 V4.0 Copyright @ Napier University Schema Subqueries Subquery one SELECT statement inside another Used in the WHERE clause Subqueries can return many rows. Subqueries can

More information

DATA MASKING on EBS with Enterprise Manager

DATA MASKING on EBS with Enterprise Manager DATA MASKING on EBS 12.1.3 with Enterprise Manager 12.1.0.5 DBA Oracle E-Business Suite Data Masking Pack, Release 12.1.3 with Oracle Enterprise Manager 12.1 (Doc ID 1481916.1) We have followed the above

More information

5 Integrity Constraints and Triggers

5 Integrity Constraints and Triggers 5 Integrity Constraints and Triggers 5.1 Integrity Constraints In Section 1 we have discussed three types of integrity constraints: not null constraints, primary keys, and unique constraints. In this section

More information

CSC Web Programming. Introduction to SQL

CSC Web Programming. Introduction to SQL CSC 242 - Web Programming Introduction to SQL SQL Statements Data Definition Language CREATE ALTER DROP Data Manipulation Language INSERT UPDATE DELETE Data Query Language SELECT SQL statements end with

More information

INDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables

INDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables INDEX Exercise No Title 1 Basic SQL Statements 2 Restricting and Sorting Data 3 Single Row Functions 4 Displaying data from multiple tables 5 Creating and Managing Tables 6 Including Constraints 7 Manipulating

More information

PHP: Cookies, Sessions, Databases. CS174. Chris Pollett. Sep 24, 2008.

PHP: Cookies, Sessions, Databases. CS174. Chris Pollett. Sep 24, 2008. PHP: Cookies, Sessions, Databases. CS174. Chris Pollett. Sep 24, 2008. Outline. How cookies work. Cookies in PHP. Sessions. Databases. Cookies. Sometimes it is useful to remember a client when it comes

More information

CS348 INFORMATION SYSTEMS

CS348 INFORMATION SYSTEMS CS348 INFORMATION SYSTEMS Romila Pradhan Advanced SQL Logistics Connecting to CS Oracle Server Registered for CS348 You should have an account on Oracle at Purdue. Login details: https://my.cs.purdue.edu

More information

Archive and Retirement Job Steps in Data Archive

Archive and Retirement Job Steps in Data Archive Archive and Retirement Job Steps in Data Archive Copyright Informatica LLC 2016, 2017. Informatica and the Informatica logo are trademarks or registered trademarks of Informatica LLC in the United States

More information

Chapter-14 SQL COMMANDS

Chapter-14 SQL COMMANDS Chapter-14 SQL COMMANDS What is SQL? Structured Query Language and it helps to make practice on SQL commands which provides immediate results. SQL is Structured Query Language, which is a computer language

More information

Database Compatibility for Oracle Developers Tools and Utilities Guide

Database Compatibility for Oracle Developers Tools and Utilities Guide Database Compatibility for Oracle Developers EDB Postgres Advanced Server 9.6 August 22, 2016 by EnterpriseDB Corporation Copyright 2007-2016 EnterpriseDB Corporation. All rights reserved. EnterpriseDB

More information

EECS2301. Example. Testing 3/22/2017. Linux/Unix Part 3. for SCRIPT in /path/to/scripts/dir/* do if [ -f $SCRIPT -a -x $SCRIPT ] then $SCRIPT fi done

EECS2301. Example. Testing 3/22/2017. Linux/Unix Part 3. for SCRIPT in /path/to/scripts/dir/* do if [ -f $SCRIPT -a -x $SCRIPT ] then $SCRIPT fi done Warning: These notes are not complete, it is a Skelton that will be modified/add-to in the class. If you want to us them for studying, either attend the class or get the completed notes from someone who

More information

Model Question Paper. Credits: 4 Marks: 140

Model Question Paper. Credits: 4 Marks: 140 Model Question Paper Subject Code: BT0075 Subject Name: RDBMS and MySQL Credits: 4 Marks: 140 Part A (One mark questions) 1. MySQL Server works in A. client/server B. specification gap embedded systems

More information

1 SQL Structured Query Language

1 SQL Structured Query Language 1 SQL Structured Query Language 1.1 Tables In relational database systems (DBS) data are represented using tables (relations). A query issued against the DBS also results in a table. A table has the following

More information

Relational Database Language

Relational Database Language DATA BASE MANAGEMENT SYSTEMS Unit IV Relational Database Language: Data definition in SQL, Queries in SQL, Insert, Delete and Update Statements in SQL, Views in SQL, Specifying General Constraints as Assertions,

More information

1. Using Bitvise SSH Secure Shell to login to CS Systems Note that if you do not have Bitvise ssh secure shell on your PC, you can download it from

1. Using Bitvise SSH Secure Shell to login to CS Systems Note that if you do not have Bitvise ssh secure shell on your PC, you can download it from 60-539 Fall 2016 Some SQL Commands 1. Using Bitvise SSH Secure Shell to login to CS Systems Note that if you do not have Bitvise ssh secure shell on your PC, you can download it from http://www.putty.org/..

More information

The Encryption Wizard for Oracle. API Library Reference

The Encryption Wizard for Oracle. API Library Reference The Encryption Wizard for Oracle For Oracle 10g, 11g and 12c Databases Version 8 All Rights Reserved. The Encryption Wizard for Oracle RDC) 12021 Wilshire Blvd Suite 108 Los Angeles, CA. 90025 310-281-1915

More information

Chapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

Chapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel 1 In this chapter, you will learn: The basic commands

More information

Rampant TechPress. Documenting Oracle Databases Complete Oracle database schema auditing. Mike Ault. TLFeBOOK

Rampant TechPress. Documenting Oracle Databases Complete Oracle database schema auditing. Mike Ault. TLFeBOOK Rampant TechPress Documenting Oracle Databases Complete Oracle database schema auditing Mike Ault Notice While the author makes every effort to ensure the information presented in this white paper is accurate

More information

Module 9: Managing Schema Objects

Module 9: Managing Schema Objects Module 9: Managing Schema Objects Overview Naming guidelines for identifiers in schema object definitions Storage and structure of schema objects Implementing data integrity using constraints Implementing

More information

Utility Scripts. Changing Passwords: Prime Network Database Schemas CHAPTER

Utility Scripts. Changing Passwords: Prime Network Database Schemas CHAPTER CHAPTER 15 The following topics describe some additional Prime Network utility scripts that you can use to do the following: Changing Passwords: Prime Network Database Schemas, page 15-1 Changing Passwords:

More information

User's Guide c-treeace SQL Explorer

User's Guide c-treeace SQL Explorer User's Guide c-treeace SQL Explorer Contents 1. c-treeace SQL Explorer... 4 1.1 Database Operations... 5 Add Existing Database... 6 Change Database... 7 Create User... 7 New Database... 8 Refresh... 8

More information

SQL functions fit into two broad categories: Data definition language Data manipulation language

SQL functions fit into two broad categories: Data definition language Data manipulation language Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition Chapter 7 Beginning Structured Query Language (SQL) MDM NUR RAZIA BINTI MOHD SURADI 019-3932846 razia@unisel.edu.my

More information

Intro to Database Commands

Intro to Database Commands Intro to Database Commands SQL (Structured Query Language) Allows you to create and delete tables Four basic commands select insert delete update You can use clauses to narrow/format your result sets or

More information

Chapter # 7 Introduction to Structured Query Language (SQL) Part I

Chapter # 7 Introduction to Structured Query Language (SQL) Part I Chapter # 7 Introduction to Structured Query Language (SQL) Part I Introduction to SQL SQL functions fit into two broad categories: Data definition language Data manipulation language Basic command set

More information

How to use SQL to create a database

How to use SQL to create a database Chapter 17 How to use SQL to create a database How to create a database CREATE DATABASE my_guitar_shop2; How to create a database only if it does not exist CREATE DATABASE IF NOT EXISTS my_guitar_shop2;

More information

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database: SQL Fundamentals I. Q&As: 292

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database: SQL Fundamentals I. Q&As: 292 Vendor: Oracle Exam Code: 1Z1-051 Exam Name: Oracle Database: SQL Fundamentals I Q&As: 292 QUESTION 1 Evaluate the SQL statement: TRUNCATE TABLE DEPT; Which three are true about the SQL statement? (Choose

More information

Laboratory Handout Introduction to Oracle

Laboratory Handout Introduction to Oracle Laboratory Handout Introduction to Oracle SQL*Plus schemata data types DML & DDL examples editing commands using external files the dual pseudo-table introduction to transactions optional exercise references.

More information

Databases - 4. Other relational operations and DDL. How to write RA expressions for dummies

Databases - 4. Other relational operations and DDL. How to write RA expressions for dummies Databases - 4 Other relational operations and DDL How to write RA expressions for dummies Step 1: Identify the relations required and CP them together Step 2: Add required selections to make the CP Step

More information

Table of Contents. Oracle SQL PL/SQL Training Courses

Table of Contents. Oracle SQL PL/SQL Training Courses Table of Contents Overview... 7 About DBA University, Inc.... 7 Eligibility... 8 Pricing... 8 Course Topics... 8 Relational database design... 8 1.1. Computer Database Concepts... 9 1.2. Relational Database

More information

COMPRESS TEST FOR HISTORIC DATABASES

COMPRESS TEST FOR HISTORIC DATABASES COMPRESS TEST FOR HISTORIC DATABASES Alejandro Vargas Oracle Israel TABLE OF CONTENTS About the Test... 6 List of Tested Scenarios... 7 Scenario #1. Alter Table Move Compress into ASM Based Tablespace...

More information

Lecture 5. Monday, September 15, 2014

Lecture 5. Monday, September 15, 2014 Lecture 5 Monday, September 15, 2014 The MySQL Command So far, we ve learned some parts of the MySQL command: mysql [database] [-u username] p [-- local-infile]! Now let s go further 1 mysqldump mysqldump

More information

Oracle Sql Describe Schema Query To Find Table

Oracle Sql Describe Schema Query To Find Table Oracle Sql Describe Schema Query To Find Table And, notably, Oracle still doesn't support the information schema. Views in the /d (object_name) will describe the schema of the table or view. Not sure how.

More information

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 7 Introduction to Structured Query Language (SQL)

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management Tenth Edition Chapter 7 Introduction to Structured Query Language (SQL) Objectives In this chapter, students will learn: The basic commands and

More information

Using Databases in the Web of Things Environment

Using Databases in the Web of Things Environment Using Databases in the Web of Things Environment During this class, you will have accounts on the tlab, the Wilkinson lab, and on two of the resources in the Web Of Things (WOT) environment: Murphy and

More information

Abstract. The next section will demonstrate the Oracle SQL script and the SAS program, and provide more detailed discussion of this automated process.

Abstract. The next section will demonstrate the Oracle SQL script and the SAS program, and provide more detailed discussion of this automated process. Automated Generation of SAS Access Views from Oracle Tables Xinsheng Lin, IMS America, Plymouth Meeting, PA Sheng Luo, Providian Corporation, Frazer, PA Abstract The authors have been involved in creating

More information

Infor ERP LN 6.1 Data Converter

Infor ERP LN 6.1 Data Converter Infor ERP LN 6.1 Infor ERP LN 6.1 Data Converter User's Guide Copyright 2008 Infor All rights reserved. The word and design marks set forth herein are trademarks and/or registered trademarks of Infor and/or

More information

Why Relational Databases? Relational databases allow for the storage and analysis of large amounts of data.

Why Relational Databases? Relational databases allow for the storage and analysis of large amounts of data. DATA 301 Introduction to Data Analytics Relational Databases Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca DATA 301: Data Analytics (2) Why Relational Databases? Relational

More information

PL/SQL Developer 7.0 New Features. December 2005

PL/SQL Developer 7.0 New Features. December 2005 PL/SQL Developer 7.0 New Features December 2005 L/SQL Developer 7.0 New Features 3 Contents CONTENTS... 3 1. INTRODUCTION... 5 2. DIAGRAM WINDOW... 6 2.1 CREATING A DIAGRAM...6 2.2 SAVING AND OPENING

More information

Oracle Tables TECHGOEASY.COM

Oracle Tables TECHGOEASY.COM Oracle Tables TECHGOEASY.COM 1 Oracle Tables WHAT IS ORACLE DATABASE TABLE? -Tables are the basic unit of data storage in an Oracle Database. Data is stored in rows and columns. -A table holds all the

More information

CHAPTER. Introduction

CHAPTER. Introduction CHAPTER 1 Introduction 2 Oracle Database 12c SQL In this chapter, you will learn about the following: Relational databases Structured Query Language (SQL), which is used to access a database SQL*Plus,

More information

2. Software Oracle 12c is installed on departmental server machines.

2. Software Oracle 12c is installed on departmental server machines. 1. Introduction This note describes how to access the Oracle database management system on the departmental computer systems. Basic information on the use of SQL*Plus is included. Section 8 tells you how

More information

1Z0-071 Exam Questions Demo Oracle. Exam Questions 1Z Oracle Database 12c SQL.

1Z0-071 Exam Questions Demo   Oracle. Exam Questions 1Z Oracle Database 12c SQL. Oracle Exam Questions 1Z0-071 Oracle Database 12c SQL Version:Demo 1. the Exhibit and examine the structure of the CUSTOMERS and CUST_HISTORY tables. The CUSTOMERS table contains the current location of

More information

Oracle 11g Db Stats Enhancements Inderpal S. Johal. Inderpal S. Johal, Data Softech Inc.

Oracle 11g Db Stats Enhancements   Inderpal S. Johal. Inderpal S. Johal, Data Softech Inc. ORACLE 11G DATABASE STATISTICS MULTICOLUMN STATISTICS Inderpal S. Johal, Data Softech Inc. OVERVIEW Prior to Oracle 11g, optimizer utilizes the statistics of all the columns involved in Complex predicate

More information

Real Application Security Administration

Real Application Security Administration Oracle Database Real Application Security Administration Console (RASADM) User s Guide 12c Release 2 (12.2) E85615-01 June 2017 Real Application Security Administration Oracle Database Real Application

More information

Top 6 SQL Query Interview Questions and Answers

Top 6 SQL Query Interview Questions and Answers Just my little additions, remarks and corrections to Top 6 SQL Query Interview Questions and Answers as published on http://javarevisited.blogspot.co.nz/2017/02/top-6-sqlquery-interview-questions-and-answers.html

More information

Import & Export Utilities

Import & Export Utilities Import & Export Utilities GridSQL Version 2.0 February 2010 GridSQL Import & Export Utilities Table of Contents 1. Table of Contents...2 2. 1 Introduction...3 1.1 Performance Considerations...3 3. 2 gs-loader...5

More information