Share via


Get-AzureSqlDatabase

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Get-AzureSqlDatabase

Returns a SQL database by name from the specified SQL Server.

Syntax

Parameter Set: ByName
Get-AzureSqlDatabase [-Context] <IServerDataServiceContext> [[-DatabaseName] <String> ] [ <CommonParameters>]

Parameter Set: ByInputObject
Get-AzureSqlDatabase [-Context] <IServerDataServiceContext> [-Database] <Database> [ <CommonParameters>]

Detailed Description

If the database name is not specified, then the cmdlet returns all SQL databases for the SQL Server.

Parameters

-Context<IServerDataServiceContext>

The connection context to the specified Windows Azure SQL Database Server.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Database<Database>

A database object representing the database to be retrieved.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-DatabaseName<String>

The name of the database to be retrieved.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.SqlServer.Management.Client.DataServices.Server.Database

Examples

-------------------------- EXAMPLE 1 --------------------------

This example returns the database, "Database1", from the Windows Azure SQL Database Server specified by the connection $ctx.

C:\PS>$database1 = Get-AzureSqlDatabase $ctx -DatabaseName "Database1"


New-AzureSqlDatabase

Remove-AzureSqlDatabase

Set-AzureSqlDatabase