# SqlServerDatabaseResource

- Module: [Aspire.Hosting.Azure.Sql](/reference/api/typescript/aspire.hosting.azure.sql.md)
- Version: `13.2.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire)

## Definition

```typescript
interface SqlServerDatabaseResource
  extends IManifestExpressionProvider,
    IResource,
    IResourceWithConnectionString,
    IResourceWithParent,
    SqlServerServerResource]],
    IValueProvider,
    IValueWithReferences {
  readonly connectionStringExpression: ReferenceExpression;
  readonly databaseName: string;
  readonly jdbcConnectionString: ReferenceExpression;
  readonly name: string;
  readonly parent: SqlServerServerResource;
  readonly uriExpression: ReferenceExpression;
  withCreationScript(script: string): SqlServerDatabaseResource;
}
```

## Properties

- `connectionStringExpression`: `ReferenceExpression` `get` -- Gets the ConnectionStringExpression property
- `databaseName`: `string` `get` -- Gets the DatabaseName property
- `jdbcConnectionString`: `ReferenceExpression` `get` -- Gets the JdbcConnectionString property
- `name`: `string` `get` -- Gets the Name property
- `parent`: [SqlServerServerResource](/reference/api/typescript/aspire.hosting.azure.sql/sqlserverserverresource.md) `get` -- Gets the Parent property
- `uriExpression`: `ReferenceExpression` `get` -- Gets the UriExpression property

## Methods

- [withCreationScript](/reference/api/typescript/aspire.hosting.azure.sql/sqlserverdatabaseresource/withcreationscript.md) -- `method` -- Defines the SQL script used to create the database
    ```typescript
  withCreationScript(script: string): SqlServerDatabaseResource
  ```
