SQL Simulator
  • Welcome
  • Getting Started
    • About SQL Simulator(beta)
    • Features
    • Benefits
    • Pricing
    • Platform List
    • Supported Databases
    • Technical Overview
      • PostView Merge
        • Step 1
        • Step 2
        • Step 3
        • Step 4
        • Step 5
      • PreView Merge
        • Step 1
        • Step 2
        • Step 3
        • Step 4
      • Dry Run
        • Step 1
        • Step 2
        • Step 3
        • Step 4
        • Step 5
        • Step 6
    • Self Destruct Events
    • K8s Install Guide
      • Azure Marketplace
      • Azure AKS
      • Google GKE
      • Amazon EKS
      • Other Cloud Provider
      • On Prem K8s
    • Limitations
    • Schedule Free Onboarding
  • Hello World Tutorials
    • SQL Server
      • Pod Setup
      • Database Setup
      • SQL Scripts
      • Add SQL Script
      • Datasource Config
      • Dry Run
      • Preview Merge
      • Postview Merge
    • Oracle
      • Pod Setup
      • Database Setup
      • SQL Scripts
      • Add SQL Script
      • Datasource Config
      • Dry Run
      • Preview Merge
      • Postview Merge
    • MySQL
      • Pod Setup
      • Database Setup
      • SQL Scripts
      • Add SQL Script
      • Datasource Config
      • Dry Run
      • Preview Merge
      • Postview Merge
    • Postgres
      • Pod Setup
      • Database Setup
      • SQL Scripts
      • Add SQL Script
      • Datasource Config
      • Dry Run
      • Preview Merge
      • Postview Merge
  • API Tutorials
    • Introduction
    • SQL Server
      • Windows Batch File
    • Oracle
      • Windows Batch File
    • MySQL
      • Windows Batch File
    • Postgres
      • Windows Batch File
  • Help
Powered by GitBook
On this page
  1. API Tutorials
  2. Oracle

Windows Batch File

Step 1 - Issue port forward command to the Control Panel

START /B kubectl port-forward  5000:5000 > sscp.txt

Step 2 - Create Pod

curl -X "POST" ^
  "http://localhost:5000/api/PodAPI/CreatePod?podname=&dbtype=oracle&hdsize=10" ^
  -H "accept:  text/plain" 

Step 3- Issue port forwarding to the pod

START /B kubectl port-forward [podname] 8080:80 1522:1521 > podresults.txt

Step 4- Initialize Pod

curl -X "POST" ^
  "http://localhost:8080/api/Pod/Init?username=[username]&password=[password]" ^
  -H "accept:  text/plain" 

Step 5- Upload SQL Files to Pod. Below shows you how to add multiple files.

curl -X  "POST" "http://localhost:8080/api/SQLFiles/Add?programming_langague=plsql" ^
  -H "accept: */*" ^
  -H "Content-Type: multipart/form-data" ^
  -F files="@C:\\your directory\\your sub directory\\file1.plsql" ^
  -F files="@C:\\your directory\\your sub directory\\file2.plsql" 

Step 6-Add Data Source

curl -X "POST" ^
  "http://localhost:8080/api/DataSources/Add" ^
  -H "Content-Type: application/json" ^
  -d "{  \"database_type\": \"ORACLE\",  \"source_uid\": \"[source db username]\",  \"source_pwd\": \"[source db password]\",  \"source_database_name\": \"[source db name]\",  \"source_host\": \"[source server ip address]\",  \"source_port\": \"1521\",  \"simulated_uid\": \"[pod user name]\",  \"simulated_pwd\": \"[pod password]\",  \"simulated_database_name\": \"FREE\",  \"simulated_schema_name\": \"\",  \"simulated_host\": \"127.0.0.1\",  \"simulated_port\": \"1521\"}"

Step 7 - Test Data Source(optional)

curl -X "POST" ^
  "http://localhost:8080/api/DataSources/TestConnection" ^
  -H "accept:  text/plain" 

Step 8-Perform Preview Merge. You also have the option of doing a DryRun or PostviewMerge.

curl -X "GET" ^
  "http://localhost:8080/api/Run/PreviewMerge" ^
  -H "accept:  text/plain" 
PreviousOracleNextMySQL

Last updated 1 year ago