> For the complete documentation index, see [llms.txt](https://help.security.gallagher.com/knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.security.gallagher.com/knowledge-hub/deployment-resources/engineering-and-design-reference/migrate-and-upgrade/remove-an-sql-server-instance.md).

# Remove an SQL Server instance

A site may have multiple SQL instances, for example GALLAGHER, GALLAGHER1, or SQLEXPRESS. A default Command Centre install expects to create a `GALLAGHER` instance, so an existing instance can get in the way. Removing an unused instance is also useful when an instance is blocking a SQL upgrade.

{% hint style="warning" %}
Use the **same installer version** as the version installed.
{% endhint %}

### Steps

1. **Extract the install files.** Create a new folder under the C drive, for example `C:\SQLEXPR`. Run `SQLEXPR_x64_ENU.exe` from `…\Setup\SQLInstall\` on the Gallagher install media, and set the extract path to `C:\SQLEXPR\`.

   !\[Choose Directory For Extracted Files dialog with the path set to C:\SQLEXPR]\(../.gitbook/assets/SECHUB-iut-sql-instance-removal-01-extract-path.png)
2. **Remove the instance.** Open a Command Prompt and move to the SQL folder:

   ```
   cd c:\SQLEXPR
   setup.exe /action="uninstall"
   ```

   Select the instance to remove and click Next.

   ![Remove SQL Server, Select Instance page, with the instance to remove features from chosen from the drop-down list of installed instances](https://3862776825-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Feem9HLOjc53n2VxEz3Cq%2Fuploads%2FEP9k18gFHwq1z81vpL8J%2FSECHUB-iut-sql-instance-removal-02-select-instance.png?alt=media\&token=fff3a722-943b-4f7d-9127-355636a8d731)

   Click **Select All**, then click Next. Note that the **SQL Client Connectivity SDK is NOT checked**.

   ![Remove SQL Server, Select Features page, with the instance features ticked and Shared Features SQL Client Connectivity SDK left unticked](https://3862776825-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Feem9HLOjc53n2VxEz3Cq%2Fuploads%2FLtno53q9K0Iy1vg6L3sc%2FSECHUB-iut-sql-instance-removal-03-select-features.png?alt=media\&token=53c5dd94-c2b0-4809-a945-ef9bdfb4307c)

The instance is then uninstalled.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.security.gallagher.com/knowledge-hub/deployment-resources/engineering-and-design-reference/migrate-and-upgrade/remove-an-sql-server-instance.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
