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

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


---

# Agent Instructions: 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:

```
GET https://ssdocker.tribalknowledge.tech/api-tutorials/sql-server/windows-batch-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
