SQL Simulator - Docker
  • Welcome
  • Getting Started
    • About SQL Simulator(beta) - Docker
    • Features
    • Benefits
    • Pricing
    • 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
    • Docker Install Guide
      • SQL Server
      • Oracle
      • MySQL
      • Postgres
    • Limitations
    • Schedule Free Onboarding
  • Web UI Tutorials
    • SQL Server
      • Initialize Container
      • Database Setup
      • SQL Scripts
      • Add SQL Script
      • Datasource Config
      • Dry Run
      • Preview Merge
      • Postview Merge
    • Oracle
      • Initialize Container
      • Database Setup
      • SQL Scripts
      • Add SQL Script
      • Datasource Config
      • Dry Run
      • Preview Merge
      • Postview Merge
    • MySQL
      • Initialize Container
      • Database Setup
      • SQL Scripts
      • Add SQL Script
      • Datasource Config
      • Dry Run
      • Preview Merge
      • Postview Merge
    • Postgres
      • Initialize Container
      • 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. SQL Server

Windows Batch File

Step 1- Initialize Container

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

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

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

Step 3-Add Data Source

curl -X "POST" ^
  "http://localhost:8080/api/DataSources/Add" ^
  -H "Content-Type: application/json" ^
  -d "{  \"database_type\": \"SQLSERVER\",  \"source_uid\": \"[username]\",  \"source_pwd\": \"[password]\",  \"source_database_name\": \"[database name]\",  \"source_server\": \"[server address]\",    \"source_trusted_connection\": \"false\",    \"simulated_uid\": \"[pod user name]\",  \"simulated_pwd\": \"[pod password]\",  \"simulated_database_name\": \"master\",  \"simulated_server\": \"mssql\",  \"simulated_schema_name\": \"\",  \"simulated_trusted_connection\": \"false\"}"

Step 4 - Test Data Source(optional)

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

Step 5-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" 
PreviousSQL ServerNextOracle

Last updated 6 months ago