SlideShare a Scribd company logo
1 of 5
Testing : BULK DATA LOAD on Database Machine of Exadata.
NOTE: This is only for testing environment. For bulk data loading, Oracle recommends
to create a separate dedicated database instance for DBFS on Database Machine
Step 1: Configure a database file system (DBFS) and use it to stage a CSV formatted
file.
Step 2 : Create external table to reference the CSV file.
Step 3: CREATE TABLE to copy the CSV file data into a table in your database
Step 1: Configure a database file system (DBFS) and use it to stage a CSV
formatted file.
i. Create a tablespace for database file system (DBFS) and a new database user to
support DBFS.
create bigfile tablespace dbfs datafile '+DBFS_DG' size 130M;
create user dbfs identified by dbfs quota unlimited on dbfs;
grant create session, create table, create procedure, dbfs_role to dbfs;
ii. create a new directory named DBFS which will act as the anchor for your database
file system mount point.
$mkdir DBFS
iii. Create the database objects for your DBFS store
dbfs_create_filesystem_advanced.sql script under
$ORACLE_HOME/ rtstxdbs/admin).
sqlplus dbfs/dbfs
@?/rtstxdbs/admin/dbfs_create_filesystem_advanced.sql dbfs mydbfs
nocompress nodeduplicate noencrypt non-partition
dbfs --> specifies the tablespace where the DBFS store is created.
mydbfs --> specifies the name of the DBFS store.
The final four parameters specify whether or not to enable various features inside the
DBFS store.
Typically, it is recommended to leave the advanced features disabled for a DBFS store
that is used to stage data files for bulk data loading.
OutPut:
--------
CREATE STORE:
begin tstxdbs_dbfs_sfs.createFilesystem(store_name => 'FS_MYDBFS', tbl_name
=>
'T_MYDBFS', tbl_tbs => 'dbfs', lob_tbs => 'dbfs', do_partition => false,
partition_key => 1, do_compress => false, compression => '', do_dedup => false,
do_encrypt => false); end;
--------
REGISTER STORE:
begin tstxdbs_dbfs_content.registerStore(store_name=> 'FS_MYDBFS',
provider_name =>
'sample1', provider_package => 'tstxdbs_dbfs_sfs'); end;
--------
MOUNT STORE:
begin tstxdbs_dbfs_content.mountStore(store_name=>'FS_MYDBFS',
store_mount=>'mydbfs'); end;
--------
CHMOD STORE:
declare m integer; begin m := tstxdbs_fuse.fs_chmod('/mydbfs', 16895); end;
No errors.
iv. For DBFS database user create a file named passwd.txt, which contains the
password
[oracle@XXXXXX ~]$ echo dbfs >passwd.txt
[oracle@XXXXXX ~]$ ls
datagenerator DBFS labs oradiag_oracle passwd.txt setup sql1.sh
[oracle@XXXXXX ~]$ vi passwd.txt
v. Mounts database file system by running DBFS client (dbfs_client)
-----------------------------------------------------------------------------------------------
[oracle@XXXXXX ~]$ nohup $ORACLE_HOME/bin/dbfs_client 
> dbfs@tstxdb -o allow_other,direct_io /home/oracle/DBFS < passwd.txt &
[1] 28161
[oracle@XXXXXX ~]$ nohup: appending output to `nohup.out'
vi. Check the dbfs_client process and database file system
---------------------------------------------------------------------------------
[oracle@XXXXXX ~]$ ps -ef | grep dbfs_client
oracle 28161 25684 0 02:30 pts/0 00:00:00
/u01/app/oracle/product/11.2.0/dbhome_1/bin/dbfs_client dbfs@tstxdb -o
allow_other,direct_io /home/oracle/DBFS
oracle 28238 25684 0 02:31 pts/0 00:00:00 grep dbfs_client
[oracle@XXXXXX ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda2 8022104 4008292 3599740 53% /
/dev/xvda1 101086 13048 82819 14% /boot
tmpfs 1331200 797316 533884 60% /dev/shm
/dev/xvdb1 15480800 11955632 2738788 82% /u01
dbfs-dbfs@tstxdb:/ 101080 152 100928 1% /home/oracle/DBFS
vi. Transfer file the CSV file to stage inside DBFS
-------------------------------------------------------------
[oracle@XXXXXX ~]$ cp /Test/CSV/customers_tsdbfs.csv DBFS/mydbfs/
[oracle@XXXXXX ~]$ cd DBFS/mydbfs/
[oracle@XXXXXX mydbfs]$ ls -l *.csv
-rw-r--r-- 1 oracle oinstall 7552705 Sep 30 02:33 customers_tsdbfs.csv
So CSV data file is now staged inside DBFS.
vii. SQL> create directory staging as '/home/oracle/DBFS/mydbfs';
grant read, write on directory staging to sh;
Directory created.
SQL>
Grant succeeded.
Step 2: Create the external table to reference the CSV file.
i. Create an external table that references the data in your DBFS-staged CSV data file.
SQL> create table ext_customers
2 (
3 customer_id number(12),
4 cust_first_name varchar2(30),
5 cust_last_name varchar2(30),
6 nls_language varchar2(3),
7 nls_territory varchar2(30),
8 credit_limit number(9,2),
9 cust_email varchar2(100),
10 account_mgr_id number(6)
11 )
12 organization external
13 (
14 type oracle_loader
15 default directory staging
16 access parameters
17 (
18 records delimited by newline
19 badfile staging:'custxt%a_%p.bad'
20 logfile staging:'custxt%a_%p.log'
21 fields terminated by ',' optionally enclosed by '"'
22 missing field values are null
23 (
24 customer_id, cust_first_name, cust_last_name, nls_language,
25 nls_territory, credit_limit, cust_email, account_mgr_id
26 )
27 )
28 location (' customers_tsdbfs.csv)
29 )
30 parallel
31 reject limit unlimited;
Table created.
ii. Check query execution plans
-----------------------------
SQL>
SQL> set autotrace on explain
SQL> select count (*) from ext_customers;
COUNT(*)
----------
100000
Execution Plan
----------------------------------------------------------
Plan hash value: 3054877561
--------------------------------------------------------------------------------
--------------------------------------
| Id | Operation | Name | Rows | Cost (%CPU)| T
ime | TQ |IN-OUT| PQ Distrib |
--------------------------------------------------------------------------------
--------------------------------------
| 0 | SELECT STATEMENT | | 1 | 16 (0)| 0
0:00:01 | | | |
| 1 | SORT AGGREGATE | | 1 | |
| | | |
| 2 | PX COORDINATOR | | | |
| | | |
| 3 | PX SEND QC (RANDOM) | :TQ10000 | 1 | |
| Q1,00 | P->S | QC (RAND) |
| 4 | SORT AGGREGATE | | 1 | |
| Q1,00 | PCWP | |
| 5 | PX BLOCK ITERATOR | | 8168 | 16 (0)| 0
0:00:01 | Q1,00 | PCWC | |
| 6 | EXTERNAL TABLE ACCESS FULL| EXT_CUSTOMERS | 8168 | 16 (0)| 0
0:00:01 | Q1,00 | PCWP | |
--------------------------------------------------------------------------------
--------------------------------------
Note : The full table scan of the external table is executed in parallel.
SQL> set autotrace off;
STEP 3: Load the external table data from CSV file into a new table
SQL>
create table loaded_customers
as select * from ext_customers;SQL> 2
Table created.
SQL> select count(*) from loaded_customers;
COUNT(*)
----------
100000
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 -
64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage
Management, OLAP,
Data Mining and Real Application Testing options
[oracle@XXXXXX mydbfs]$ ls -l
total 7382
-rw-r--r-- 1 oracle oinstall 7552705 Sep 30 02:33 customers.csv
-rw-r--r-- 1 oracle dba 2752 Sep 30 02:43 custxt000_28630.log
-rw-r--r-- 1 oracle dba 2752 Sep 30 02:43 custxt000_3259.log
Unmount database file system
-------------------------------------
[oracle@XXXXXX mydbfs]$ cd
[oracle@XXXXXX ~]$ fusermount -u /home/oracle/DBFS/
[oracle@XXXXXX ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda2 8022104 4008292 3599740 53% /
/dev/xvda1 101086 13048 82819 14% /boot
tmpfs 1331200 797316 533884 60% /dev/shm
/dev/xvdb1 15480800 11957216 2737204 82% /u01
[1]+ Done nohup $ORACLE_HOME/bin/dbfs_client dbfs@tstxdb -
o allow_other,direct_io /home/oracle/DBFS < passwd.txt
[oracle@XXXXXX ~]$ ps -ef | grep dbfs_client
oracle 29077 25684 0 02:47 pts/0 00:00:00 grep dbfs_client

More Related Content

What's hot

Postgresql Database Administration Basic - Day2
Postgresql  Database Administration Basic  - Day2Postgresql  Database Administration Basic  - Day2
Postgresql Database Administration Basic - Day2PoguttuezhiniVP
 
Scripts related to temp tablespace
Scripts related to temp tablespaceScripts related to temp tablespace
Scripts related to temp tablespaceSoumya Das
 
Mysql database basic user guide
Mysql database basic user guideMysql database basic user guide
Mysql database basic user guidePoguttuezhiniVP
 
FIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11GFIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11GN/A
 
Basic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition PresentationBasic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition PresentationN/A
 
Postgresql Database Administration Basic - Day1
Postgresql  Database Administration Basic  - Day1Postgresql  Database Administration Basic  - Day1
Postgresql Database Administration Basic - Day1PoguttuezhiniVP
 
Postgresql Database Administration- Day3
Postgresql Database Administration- Day3Postgresql Database Administration- Day3
Postgresql Database Administration- Day3PoguttuezhiniVP
 
Hive data migration (export/import)
Hive data migration (export/import)Hive data migration (export/import)
Hive data migration (export/import)Bopyo Hong
 
TP2 Big Data HBase
TP2 Big Data HBaseTP2 Big Data HBase
TP2 Big Data HBaseAmal Abid
 
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...Marco Vigelini
 
Creating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsCreating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsRoo Wall
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replicationPoguttuezhiniVP
 
Plmce 14 be a_hero_16x9_final
Plmce 14 be a_hero_16x9_finalPlmce 14 be a_hero_16x9_final
Plmce 14 be a_hero_16x9_finalMarco Tusa
 
Writing A Foreign Data Wrapper
Writing A Foreign Data WrapperWriting A Foreign Data Wrapper
Writing A Foreign Data Wrapperpsoo1978
 
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...BertrandDrouvot
 
Postgresql Database Administration- Day4
Postgresql Database Administration- Day4Postgresql Database Administration- Day4
Postgresql Database Administration- Day4PoguttuezhiniVP
 

What's hot (19)

Postgresql Database Administration Basic - Day2
Postgresql  Database Administration Basic  - Day2Postgresql  Database Administration Basic  - Day2
Postgresql Database Administration Basic - Day2
 
Scripts related to temp tablespace
Scripts related to temp tablespaceScripts related to temp tablespace
Scripts related to temp tablespace
 
Mysql database basic user guide
Mysql database basic user guideMysql database basic user guide
Mysql database basic user guide
 
FIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11GFIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11G
 
Basic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition PresentationBasic - Oracle Edition Based Redefinition Presentation
Basic - Oracle Edition Based Redefinition Presentation
 
Mongodb replication
Mongodb replicationMongodb replication
Mongodb replication
 
Postgresql Database Administration Basic - Day1
Postgresql  Database Administration Basic  - Day1Postgresql  Database Administration Basic  - Day1
Postgresql Database Administration Basic - Day1
 
Postgresql Database Administration- Day3
Postgresql Database Administration- Day3Postgresql Database Administration- Day3
Postgresql Database Administration- Day3
 
Hive data migration (export/import)
Hive data migration (export/import)Hive data migration (export/import)
Hive data migration (export/import)
 
TP2 Big Data HBase
TP2 Big Data HBaseTP2 Big Data HBase
TP2 Big Data HBase
 
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
 
Creating a physical standby database 11g on windows
Creating a physical standby database 11g on windowsCreating a physical standby database 11g on windows
Creating a physical standby database 11g on windows
 
Hive commands
Hive commandsHive commands
Hive commands
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replication
 
Gg steps
Gg stepsGg steps
Gg steps
 
Plmce 14 be a_hero_16x9_final
Plmce 14 be a_hero_16x9_finalPlmce 14 be a_hero_16x9_final
Plmce 14 be a_hero_16x9_final
 
Writing A Foreign Data Wrapper
Writing A Foreign Data WrapperWriting A Foreign Data Wrapper
Writing A Foreign Data Wrapper
 
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
Reduce Resource Consumption & Clone in Seconds your Oracle Virtual Environmen...
 
Postgresql Database Administration- Day4
Postgresql Database Administration- Day4Postgresql Database Administration- Day4
Postgresql Database Administration- Day4
 

Viewers also liked

12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storage12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storageMonowar Mukul
 
Oracle 12c RAC (Advanced installation - Flex ASM)
Oracle 12c RAC (Advanced installation - Flex ASM)Oracle 12c RAC (Advanced installation - Flex ASM)
Oracle 12c RAC (Advanced installation - Flex ASM)Monowar Mukul
 
Exadata - Smart Scan Testing
Exadata - Smart Scan TestingExadata - Smart Scan Testing
Exadata - Smart Scan TestingMonowar Mukul
 
TimesTen in memory database Creation
TimesTen in memory database Creation TimesTen in memory database Creation
TimesTen in memory database Creation Monowar Mukul
 
Moving 12c database from NON-ASM to ASM
Moving 12c database from NON-ASM to ASMMoving 12c database from NON-ASM to ASM
Moving 12c database from NON-ASM to ASMMonowar Mukul
 
Oracle 12c far sync standby instance
Oracle 12c far sync standby instanceOracle 12c far sync standby instance
Oracle 12c far sync standby instanceMonowar Mukul
 
SOA Fusion Middleware installation
SOA Fusion Middleware installationSOA Fusion Middleware installation
SOA Fusion Middleware installationMonowar Mukul
 
Exadata I/O Resource Manager (Exadata IORM)
Exadata I/O Resource Manager (Exadata IORM)Exadata I/O Resource Manager (Exadata IORM)
Exadata I/O Resource Manager (Exadata IORM)Monowar Mukul
 
Copyright Crash Course 1st revised ppt 6340.64 Sonia Aldape
Copyright Crash Course 1st revised ppt 6340.64 Sonia AldapeCopyright Crash Course 1st revised ppt 6340.64 Sonia Aldape
Copyright Crash Course 1st revised ppt 6340.64 Sonia Aldapesoniaaldape
 
Advanced installation 12c rac
Advanced installation 12c racAdvanced installation 12c rac
Advanced installation 12c racMonowar Mukul
 
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobsMonowar Mukul
 
Upgrade database using cloud_control Provisioning
Upgrade database using cloud_control Provisioning Upgrade database using cloud_control Provisioning
Upgrade database using cloud_control Provisioning Monowar Mukul
 
Edtc6341 63 esther_sauceda_practice_test5
Edtc6341 63 esther_sauceda_practice_test5Edtc6341 63 esther_sauceda_practice_test5
Edtc6341 63 esther_sauceda_practice_test5esauceda12
 
12c Flex ASM: Moving to Flex ASM
12c Flex ASM: Moving to Flex ASM12c Flex ASM: Moving to Flex ASM
12c Flex ASM: Moving to Flex ASMMonowar Mukul
 
Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database
Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database  Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database
Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database Monowar Mukul
 
4. java intro class
4. java intro class4. java intro class
4. java intro classQuan Ho
 
EM12c Configuration Setup - Step by Step
EM12c Configuration Setup - Step by StepEM12c Configuration Setup - Step by Step
EM12c Configuration Setup - Step by StepMonowar Mukul
 
Oracle AWR baseline - Basic
Oracle AWR baseline - BasicOracle AWR baseline - Basic
Oracle AWR baseline - BasicMonowar Mukul
 

Viewers also liked (20)

12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storage12c database migration from ASM storage to NON-ASM storage
12c database migration from ASM storage to NON-ASM storage
 
Oracle 12c RAC (Advanced installation - Flex ASM)
Oracle 12c RAC (Advanced installation - Flex ASM)Oracle 12c RAC (Advanced installation - Flex ASM)
Oracle 12c RAC (Advanced installation - Flex ASM)
 
Exadata - Smart Scan Testing
Exadata - Smart Scan TestingExadata - Smart Scan Testing
Exadata - Smart Scan Testing
 
TimesTen in memory database Creation
TimesTen in memory database Creation TimesTen in memory database Creation
TimesTen in memory database Creation
 
Moving 12c database from NON-ASM to ASM
Moving 12c database from NON-ASM to ASMMoving 12c database from NON-ASM to ASM
Moving 12c database from NON-ASM to ASM
 
Exadata Cell metrics
Exadata Cell metricsExadata Cell metrics
Exadata Cell metrics
 
Oracle 12c far sync standby instance
Oracle 12c far sync standby instanceOracle 12c far sync standby instance
Oracle 12c far sync standby instance
 
SOA Fusion Middleware installation
SOA Fusion Middleware installationSOA Fusion Middleware installation
SOA Fusion Middleware installation
 
Exadata I/O Resource Manager (Exadata IORM)
Exadata I/O Resource Manager (Exadata IORM)Exadata I/O Resource Manager (Exadata IORM)
Exadata I/O Resource Manager (Exadata IORM)
 
1247g3hg1238 2011
1247g3hg1238 20111247g3hg1238 2011
1247g3hg1238 2011
 
Copyright Crash Course 1st revised ppt 6340.64 Sonia Aldape
Copyright Crash Course 1st revised ppt 6340.64 Sonia AldapeCopyright Crash Course 1st revised ppt 6340.64 Sonia Aldape
Copyright Crash Course 1st revised ppt 6340.64 Sonia Aldape
 
Advanced installation 12c rac
Advanced installation 12c racAdvanced installation 12c rac
Advanced installation 12c rac
 
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
 
Upgrade database using cloud_control Provisioning
Upgrade database using cloud_control Provisioning Upgrade database using cloud_control Provisioning
Upgrade database using cloud_control Provisioning
 
Edtc6341 63 esther_sauceda_practice_test5
Edtc6341 63 esther_sauceda_practice_test5Edtc6341 63 esther_sauceda_practice_test5
Edtc6341 63 esther_sauceda_practice_test5
 
12c Flex ASM: Moving to Flex ASM
12c Flex ASM: Moving to Flex ASM12c Flex ASM: Moving to Flex ASM
12c Flex ASM: Moving to Flex ASM
 
Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database
Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database  Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database
Migration Database from SQL SERVER 2012 to Oracle12c with Pluggable Database
 
4. java intro class
4. java intro class4. java intro class
4. java intro class
 
EM12c Configuration Setup - Step by Step
EM12c Configuration Setup - Step by StepEM12c Configuration Setup - Step by Step
EM12c Configuration Setup - Step by Step
 
Oracle AWR baseline - Basic
Oracle AWR baseline - BasicOracle AWR baseline - Basic
Oracle AWR baseline - Basic
 

Similar to Exadata - BULK DATA LOAD Testing on Database Machine

Discard inport exchange table & tablespace
Discard inport exchange table & tablespaceDiscard inport exchange table & tablespace
Discard inport exchange table & tablespaceMarco Tusa
 
Get started with Microsoft SQL Polybase
Get started with Microsoft SQL PolybaseGet started with Microsoft SQL Polybase
Get started with Microsoft SQL PolybaseHenk van der Valk
 
Create manula and automaticly database
Create manula and automaticly databaseCreate manula and automaticly database
Create manula and automaticly databaseAnar Godjaev
 
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdf
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdfVikas 500 BIG DATA TECHNOLOGIES LAB.pdf
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdfvikas12611618
 
15 MySQL Basics #burningkeyboards
15 MySQL Basics #burningkeyboards15 MySQL Basics #burningkeyboards
15 MySQL Basics #burningkeyboardsDenis Ristic
 
An overview of snowflake
An overview of snowflakeAn overview of snowflake
An overview of snowflakeSivakumar Ramar
 
database-querry-student-note
database-querry-student-notedatabase-querry-student-note
database-querry-student-noteLeerpiny Makouach
 
Playing with the CONNECT storage engine
Playing with the CONNECT storage enginePlaying with the CONNECT storage engine
Playing with the CONNECT storage engineFederico Razzoli
 
Guide to compile your own 4.3.4 cataclysm server
Guide to compile your own 4.3.4 cataclysm serverGuide to compile your own 4.3.4 cataclysm server
Guide to compile your own 4.3.4 cataclysm serverMohit Maheshwari
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shellIvan Ma
 
TrinityCore server install guide
TrinityCore server install guideTrinityCore server install guide
TrinityCore server install guideSeungmin Shin
 
MySQL Audit using Percona audit plugin and ELK
MySQL Audit using Percona audit plugin and ELKMySQL Audit using Percona audit plugin and ELK
MySQL Audit using Percona audit plugin and ELKYoungHeon (Roy) Kim
 
My SYSAUX tablespace is full - please help
My SYSAUX tablespace is full - please helpMy SYSAUX tablespace is full - please help
My SYSAUX tablespace is full - please helpMarkus Flechtner
 
Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2nesmaddy
 

Similar to Exadata - BULK DATA LOAD Testing on Database Machine (20)

Discard inport exchange table & tablespace
Discard inport exchange table & tablespaceDiscard inport exchange table & tablespace
Discard inport exchange table & tablespace
 
Get started with Microsoft SQL Polybase
Get started with Microsoft SQL PolybaseGet started with Microsoft SQL Polybase
Get started with Microsoft SQL Polybase
 
Csql Cache Presentation
Csql Cache PresentationCsql Cache Presentation
Csql Cache Presentation
 
Presentation day4 oracle12c
Presentation day4 oracle12cPresentation day4 oracle12c
Presentation day4 oracle12c
 
Create manula and automaticly database
Create manula and automaticly databaseCreate manula and automaticly database
Create manula and automaticly database
 
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdf
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdfVikas 500 BIG DATA TECHNOLOGIES LAB.pdf
Vikas 500 BIG DATA TECHNOLOGIES LAB.pdf
 
15 MySQL Basics #burningkeyboards
15 MySQL Basics #burningkeyboards15 MySQL Basics #burningkeyboards
15 MySQL Basics #burningkeyboards
 
Hive
HiveHive
Hive
 
An overview of snowflake
An overview of snowflakeAn overview of snowflake
An overview of snowflake
 
MySql slides (ppt)
MySql slides (ppt)MySql slides (ppt)
MySql slides (ppt)
 
Rmoug ashmaster
Rmoug ashmasterRmoug ashmaster
Rmoug ashmaster
 
database-querry-student-note
database-querry-student-notedatabase-querry-student-note
database-querry-student-note
 
Playing with the CONNECT storage engine
Playing with the CONNECT storage enginePlaying with the CONNECT storage engine
Playing with the CONNECT storage engine
 
Guide to compile your own 4.3.4 cataclysm server
Guide to compile your own 4.3.4 cataclysm serverGuide to compile your own 4.3.4 cataclysm server
Guide to compile your own 4.3.4 cataclysm server
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell
 
TrinityCore server install guide
TrinityCore server install guideTrinityCore server install guide
TrinityCore server install guide
 
MySQL Audit using Percona audit plugin and ELK
MySQL Audit using Percona audit plugin and ELKMySQL Audit using Percona audit plugin and ELK
MySQL Audit using Percona audit plugin and ELK
 
MySQL Presentation
MySQL PresentationMySQL Presentation
MySQL Presentation
 
My SYSAUX tablespace is full - please help
My SYSAUX tablespace is full - please helpMy SYSAUX tablespace is full - please help
My SYSAUX tablespace is full - please help
 
Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2Steps for upgrading the database to 10g release 2
Steps for upgrading the database to 10g release 2
 

Recently uploaded

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 

Recently uploaded (20)

Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 

Exadata - BULK DATA LOAD Testing on Database Machine

  • 1. Testing : BULK DATA LOAD on Database Machine of Exadata. NOTE: This is only for testing environment. For bulk data loading, Oracle recommends to create a separate dedicated database instance for DBFS on Database Machine Step 1: Configure a database file system (DBFS) and use it to stage a CSV formatted file. Step 2 : Create external table to reference the CSV file. Step 3: CREATE TABLE to copy the CSV file data into a table in your database Step 1: Configure a database file system (DBFS) and use it to stage a CSV formatted file. i. Create a tablespace for database file system (DBFS) and a new database user to support DBFS. create bigfile tablespace dbfs datafile '+DBFS_DG' size 130M; create user dbfs identified by dbfs quota unlimited on dbfs; grant create session, create table, create procedure, dbfs_role to dbfs; ii. create a new directory named DBFS which will act as the anchor for your database file system mount point. $mkdir DBFS iii. Create the database objects for your DBFS store dbfs_create_filesystem_advanced.sql script under $ORACLE_HOME/ rtstxdbs/admin). sqlplus dbfs/dbfs @?/rtstxdbs/admin/dbfs_create_filesystem_advanced.sql dbfs mydbfs nocompress nodeduplicate noencrypt non-partition dbfs --> specifies the tablespace where the DBFS store is created. mydbfs --> specifies the name of the DBFS store. The final four parameters specify whether or not to enable various features inside the DBFS store. Typically, it is recommended to leave the advanced features disabled for a DBFS store that is used to stage data files for bulk data loading. OutPut: -------- CREATE STORE: begin tstxdbs_dbfs_sfs.createFilesystem(store_name => 'FS_MYDBFS', tbl_name => 'T_MYDBFS', tbl_tbs => 'dbfs', lob_tbs => 'dbfs', do_partition => false,
  • 2. partition_key => 1, do_compress => false, compression => '', do_dedup => false, do_encrypt => false); end; -------- REGISTER STORE: begin tstxdbs_dbfs_content.registerStore(store_name=> 'FS_MYDBFS', provider_name => 'sample1', provider_package => 'tstxdbs_dbfs_sfs'); end; -------- MOUNT STORE: begin tstxdbs_dbfs_content.mountStore(store_name=>'FS_MYDBFS', store_mount=>'mydbfs'); end; -------- CHMOD STORE: declare m integer; begin m := tstxdbs_fuse.fs_chmod('/mydbfs', 16895); end; No errors. iv. For DBFS database user create a file named passwd.txt, which contains the password [oracle@XXXXXX ~]$ echo dbfs >passwd.txt [oracle@XXXXXX ~]$ ls datagenerator DBFS labs oradiag_oracle passwd.txt setup sql1.sh [oracle@XXXXXX ~]$ vi passwd.txt v. Mounts database file system by running DBFS client (dbfs_client) ----------------------------------------------------------------------------------------------- [oracle@XXXXXX ~]$ nohup $ORACLE_HOME/bin/dbfs_client > dbfs@tstxdb -o allow_other,direct_io /home/oracle/DBFS < passwd.txt & [1] 28161 [oracle@XXXXXX ~]$ nohup: appending output to `nohup.out' vi. Check the dbfs_client process and database file system --------------------------------------------------------------------------------- [oracle@XXXXXX ~]$ ps -ef | grep dbfs_client oracle 28161 25684 0 02:30 pts/0 00:00:00 /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbfs_client dbfs@tstxdb -o allow_other,direct_io /home/oracle/DBFS oracle 28238 25684 0 02:31 pts/0 00:00:00 grep dbfs_client [oracle@XXXXXX ~]$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda2 8022104 4008292 3599740 53% / /dev/xvda1 101086 13048 82819 14% /boot tmpfs 1331200 797316 533884 60% /dev/shm /dev/xvdb1 15480800 11955632 2738788 82% /u01 dbfs-dbfs@tstxdb:/ 101080 152 100928 1% /home/oracle/DBFS
  • 3. vi. Transfer file the CSV file to stage inside DBFS ------------------------------------------------------------- [oracle@XXXXXX ~]$ cp /Test/CSV/customers_tsdbfs.csv DBFS/mydbfs/ [oracle@XXXXXX ~]$ cd DBFS/mydbfs/ [oracle@XXXXXX mydbfs]$ ls -l *.csv -rw-r--r-- 1 oracle oinstall 7552705 Sep 30 02:33 customers_tsdbfs.csv So CSV data file is now staged inside DBFS. vii. SQL> create directory staging as '/home/oracle/DBFS/mydbfs'; grant read, write on directory staging to sh; Directory created. SQL> Grant succeeded. Step 2: Create the external table to reference the CSV file. i. Create an external table that references the data in your DBFS-staged CSV data file. SQL> create table ext_customers 2 ( 3 customer_id number(12), 4 cust_first_name varchar2(30), 5 cust_last_name varchar2(30), 6 nls_language varchar2(3), 7 nls_territory varchar2(30), 8 credit_limit number(9,2), 9 cust_email varchar2(100), 10 account_mgr_id number(6) 11 ) 12 organization external 13 ( 14 type oracle_loader 15 default directory staging 16 access parameters 17 ( 18 records delimited by newline 19 badfile staging:'custxt%a_%p.bad' 20 logfile staging:'custxt%a_%p.log' 21 fields terminated by ',' optionally enclosed by '"' 22 missing field values are null 23 ( 24 customer_id, cust_first_name, cust_last_name, nls_language, 25 nls_territory, credit_limit, cust_email, account_mgr_id 26 )
  • 4. 27 ) 28 location (' customers_tsdbfs.csv) 29 ) 30 parallel 31 reject limit unlimited; Table created. ii. Check query execution plans ----------------------------- SQL> SQL> set autotrace on explain SQL> select count (*) from ext_customers; COUNT(*) ---------- 100000 Execution Plan ---------------------------------------------------------- Plan hash value: 3054877561 -------------------------------------------------------------------------------- -------------------------------------- | Id | Operation | Name | Rows | Cost (%CPU)| T ime | TQ |IN-OUT| PQ Distrib | -------------------------------------------------------------------------------- -------------------------------------- | 0 | SELECT STATEMENT | | 1 | 16 (0)| 0 0:00:01 | | | | | 1 | SORT AGGREGATE | | 1 | | | | | | | 2 | PX COORDINATOR | | | | | | | | | 3 | PX SEND QC (RANDOM) | :TQ10000 | 1 | | | Q1,00 | P->S | QC (RAND) | | 4 | SORT AGGREGATE | | 1 | | | Q1,00 | PCWP | | | 5 | PX BLOCK ITERATOR | | 8168 | 16 (0)| 0 0:00:01 | Q1,00 | PCWC | | | 6 | EXTERNAL TABLE ACCESS FULL| EXT_CUSTOMERS | 8168 | 16 (0)| 0 0:00:01 | Q1,00 | PCWP | | -------------------------------------------------------------------------------- -------------------------------------- Note : The full table scan of the external table is executed in parallel. SQL> set autotrace off;
  • 5. STEP 3: Load the external table data from CSV file into a new table SQL> create table loaded_customers as select * from ext_customers;SQL> 2 Table created. SQL> select count(*) from loaded_customers; COUNT(*) ---------- 100000 SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@XXXXXX mydbfs]$ ls -l total 7382 -rw-r--r-- 1 oracle oinstall 7552705 Sep 30 02:33 customers.csv -rw-r--r-- 1 oracle dba 2752 Sep 30 02:43 custxt000_28630.log -rw-r--r-- 1 oracle dba 2752 Sep 30 02:43 custxt000_3259.log Unmount database file system ------------------------------------- [oracle@XXXXXX mydbfs]$ cd [oracle@XXXXXX ~]$ fusermount -u /home/oracle/DBFS/ [oracle@XXXXXX ~]$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda2 8022104 4008292 3599740 53% / /dev/xvda1 101086 13048 82819 14% /boot tmpfs 1331200 797316 533884 60% /dev/shm /dev/xvdb1 15480800 11957216 2737204 82% /u01 [1]+ Done nohup $ORACLE_HOME/bin/dbfs_client dbfs@tstxdb - o allow_other,direct_io /home/oracle/DBFS < passwd.txt [oracle@XXXXXX ~]$ ps -ef | grep dbfs_client oracle 29077 25684 0 02:47 pts/0 00:00:00 grep dbfs_client