Продажи: 1-800-867-1389
EN
Данное содержимое не доступно на вашем языке, используйте версию на английском языке.

Set-AzureSqlDatabase

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

Set-AzureSqlDatabase

Sets properties for a Windows Azure SQL Database either in the specified SQL Database Server connection context or in the specified SQL Database Server.

Syntax

Parameter Set: ByNameWithConnectionContext
Set-AzureSqlDatabase [-ConnectionContext] <IServerDataServiceContext> [-DatabaseName] <String> [-Edition <DatabaseEdition> ] [-Force] [-MaxSizeGB <Int32> ] [-NewDatabaseName <String> ] [-PassThru] [-ServiceObjective <ServiceObjective> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByNameWithServerName
Set-AzureSqlDatabase [-ServerName] <String> [-DatabaseName] <String> [-Edition <DatabaseEdition> ] [-Force] [-MaxSizeGB <Int32> ] [-NewDatabaseName <String> ] [-PassThru] [-ServiceObjective <ServiceObjective> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByObjectWithConnectionContext
Set-AzureSqlDatabase [-ConnectionContext] <IServerDataServiceContext> [-Database] <Database> [-Edition <DatabaseEdition> ] [-Force] [-MaxSizeGB <Int32> ] [-NewDatabaseName <String> ] [-PassThru] [-ServiceObjective <ServiceObjective> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ByObjectWithServerName
Set-AzureSqlDatabase [-ServerName] <String> [-Database] <Database> [-Edition <DatabaseEdition> ] [-Force] [-MaxSizeGB <Int32> ] [-NewDatabaseName <String> ] [-PassThru] [-ServiceObjective <ServiceObjective> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Set-AzureSqlDatabase cmdlet sets properties either for the specified SQL Database in a SQL Database Server connection context or a SQL Database Server. You can specify the database by name or pass a SQL Database object through the pipeline.

When you set a database property in a specified SQL Database Server, the Set-AzureSqlDatabase cmdlet creates a temporary connection context using the specified SQL Database Server name and the current Windows Azure subscription information to perform the operation.

Parameters

-ConnectionContext<IServerDataServiceContext>

The connection context to a SQL Database Server where you want to modify a SQL Database.


Aliases

Context

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Database<Database>

A database object representing the SQL Database to modify.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-DatabaseName<String>

The name of the SQL Database to modify.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Edition<DatabaseEdition>

If specified, the new edition for the SQL Database. Acceptable values are Web and Business.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

Allows the action to complete without prompting you for confirmation.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MaxSizeGB<Int32>

If specified, the new maximum size for the database in gigabytes. The acceptable values differ based on edition.

Web Edition values: 1 or 5

Business Edition values: 10, 20, 30, 40, 50, 100, or 150


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NewDatabaseName<String>

If specified, the new name of the SQL Database.


Aliases

NewName

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PassThru

Returns the input object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ServerName<String>

The name of the SQL Database Server where you want to modify a SQL Database.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ServiceObjective<ServiceObjective>

If specified, an object representing the new service objective for this database.

Note: This parameter is a feature of the preview of Windows Azure SQL Database Premium Edition. Only participants in the preview are able to use this parameter. To learn more about the preview, please see http://go.microsoft.com/fwlink/p/?LinkId=308949.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


Required?

false

Position?

named

Default Value

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.

  • Microsoft.WindowsAzure.Management.SqlDatabase.Services.Server.Database

Outputs

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

  • Microsoft.WindowsAzure.Management.SqlDatabase.Services.Server.Database

Examples

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

This example changes the current size of the database, "Database1", to 20 GB, in the specified SQL Database Server connection context “$ctx”.


C:\PS>$database1 = Get-AzureSqlDatabase -ConnectionContext $ctx -DatabaseName "Database1"C:\PS>Set-AzureSqlDatabase -ConnectionContext $ctx -Database $database1 -MaxSizeGB 20

-------------------------- EXAMPLE 2 --------------------------

This example changes the current size of the database, "Database1", to 20 GB, in the specified SQL Database Server "lpqd0zbr8y".


C:\PS>$database1 = Get-AzureSqlDatabase -ServerName "lpqd0zbr8y" -DatabaseName "Database1"C:\PS>Set-AzureSqlDatabase -ServerName "lpqd0zbr8y" -Database $database1 -MaxSizeGB 20

Related topics

Была ли вам полезна эта информация?
(1500 символов осталось)
Спасибо за ваш отзыв
Показ:
© 2014 Microsoft