Windows Batch File

Step 1 - Issue port forward command to the Control Panel

START /B kubectl port-forward [control panel name] 5000:5000 > sscp.txt

Step 2 - Create Pod

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

Step 3- Issue port forwarding to the pod

START /B kubectl port-forward [podname] 8080:80 1433:1433 > 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_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 6-Add Data Source

Step 7 - Test Data Source(optional)

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

Last updated