# SqlServerServerResource.WithRepl

- Module: [Aspire.Hosting.SqlServer](/reference/api/go/aspire.hosting.sqlserver.md)
- Defined on: [SqlServerServerResource](/reference/api/go/aspire.hosting.sqlserver/sqlserverserverresource.md)
- Version: `17.0.0`
- Kind: `method`

Adds a REPL command that opens an authenticated SQL Server shell with the configured client tools.

## Remarks

This command is opt-in and available only in run mode. Dashboard users who can execute resource commands
can run commands as `sa`, including server-side operating system commands when enabled.
Enable it only for trusted dashboard users.
The default sqlcmd executable path matches the integration's default container image.
When using an older or custom image, select the executable path installed in that image.
The callback runs once during configuration in run mode, and the selected client is captured.

## Definition

```go
type SqlServerServerResource interface {
    // ... omitted for brevity
    WithRepl(options ...*WithReplOptions) SqlServerServerResource
}
```

## Signature

```go
WithRepl(options ...*WithReplOptions) SqlServerServerResource
```

## Parameters

- `options` (`...*WithReplOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*WithReplOptions` argument.

- `Configure` (`func(obj SqlServerReplOptions)`) `callback` -- An optional callback to configure the SQL Server REPL.

## Returns

[`SqlServerServerResource`](/reference/api/go/aspire.hosting.sqlserver/sqlserverserverresource.md) -- The resource builder for chaining.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [SqlServerServerResource](/reference/api/go/aspire.hosting.sqlserver/sqlserverserverresource.md) -- `handle`
