Commit 6e99bc7e authored by Stanley Clark's avatar Stanley Clark
Browse files

Changed structure

parent 07214f4c
oracle/tpcds.sql
\ No newline at end of file
# Comparison
First, generate TPC-DS data using `gen_tpcds.sh`.
## Oracle VPD
* Build the DB [Server](https://github.com/oracle/docker-images/tree/main/OracleDatabase/SingleInstance)
......@@ -8,7 +10,7 @@
and additionally the SQL*Plus Package, and the Tools Package
* Start the server Docker container using
```
docker run --name OracleDB \
docker run -itd --name OracleDB \
-p 1521:1521 -p 5500:5500 \
-e ORACLE_SID=ORCLCDB \
-e ORACLE_PDB=ORCLPDB1 \
......@@ -16,9 +18,22 @@
-v OracleDBData:/opt/oracle/oradata \
oracle/database:19.3.0-ee
```
* Run `oracle/make_tpc.bash`
* Run `oracle/populate.sh`
Connect via JDBC using username `sys as sysdba` and password `password`.
Connect via JDBC using username `sys as sysdba`.
## IBM DB2
* Setup the DB [Docker image](https://hub.docker.com/r/ibmcom/db2).
* Start the server Docker container using
```
docker run -itd --name DB2 \
--privileged=true
-p 50000:50000
-e LICENSE=accept
-e DB2INST1_PASSWORD=password
-e DBNAME=testdb
-v DB2Data:/database ibmcom/db2
```
* Run `ibm/populate.sh`
#!/usr/bin/env sh
# Make the tpc-ds project
cd tpc-ds/tools || exit
make clean
make
# Generate TPC-DS data
rm ./*.dat || true
./dsdgen -scale 1 -terminate N
#!/usr/bin/env sh
# Create TPC-DS schema and users
cd ../../oracle || exit
echo @clean.sql | sqlplus sys/Oradoc_db1@ORCLCDB as sysdba
echo @employee.sql | sqlplus sys/Oradoc_db1@ORCLCDB as sysdba
echo @../tpc-des/tools/tpcds.sql | sqlplus sys/Oradoc_db1@ORCLCDB as sysdba
echo @users.sql | sqlplus sys/Oradoc_db1@ORCLPDB1 as sysdba
# Import generated data to postgres instance
cd ctl || exit
for tableScript in *.ctl
do
echo "$tableScript"
sqlldr \'sys/Oradoc_db1@ORCLCDB as sysdba\' control="$tableScript"
done
#!/usr/bin/env bash
# Make the tpc-ds project
cd ../tpc-ds/tools || exit
make clean
make
# Generate TPC-DS data
rm ./*.dat || true
./dsdgen -scale 1 -terminate N
#!/usr/bin/env sh
# Oracle doesn't support the 'time' format
cp ../tpc-ds/tools/tpcds.sql tpcds.sql
sed -i 's/dv_create_time time/dv_create_time date/g' tpcds.sql
# Create TPC-DS schema and users
cd ../../oracle || exit
echo @clean.sql | sqlplus sys/Oradoc_db1@ORCLCDB as sysdba
echo @employee.sql | sqlplus sys/Oradoc_db1@ORCLCDB as sysdba
echo @../tpc-des/tools/tpcds.sql | sqlplus sys/Oradoc_db1@ORCLCDB as sysdba
echo @tpcds.sql | sqlplus sys/Oradoc_db1@ORCLCDB as sysdba
echo @users.sql | sqlplus sys/Oradoc_db1@ORCLPDB1 as sysdba
# Import generated data to postgres instance
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment