> For the complete documentation index, see [llms.txt](https://sql-simulator.tribalknowledge.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sql-simulator.tribalknowledge.tech/api-tutorials/oracle/windows-batch-file.md).

# Windows Batch File

**Step 1 - Issue port forward command to the Control Panel**

<pre><code>START /B kubectl port-forward <a data-footnote-ref href="#user-content-fn-1">[control panel name]</a> 5000:5000 > sscp.txt
</code></pre>

**Step 2 - Create Pod**

<pre data-full-width="false"><code>curl -X "POST" ^
  "http://localhost:5000/api/PodAPI/CreatePod?podname=<a data-footnote-ref href="#user-content-fn-2">[podname]</a>&#x26;dbtype=oracle&#x26;hdsize=10" ^
  -H "accept:  text/plain" 

</code></pre>

**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.**&#x20;

```
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" 
```

[^1]: Replace this text with the name of the control panel

[^2]: Replace this text with the name of the pod


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sql-simulator.tribalknowledge.tech/api-tutorials/oracle/windows-batch-file.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
