Add-SqlDatabase

Adds a new database to a SQL Server.

Syntax

Add-SqlDatabase [-sqlserver] <Object> [-dbname] <String> [[-dataName] <String>] [[-dataFilePath] <String>] [[-dataSize] <Double>] [[-dataGrowthType] {KB | Percent | None}] [[-dataGrowth] <Double>] [[-dataMaxSize] <Double>] [[-logName] <String>] [[-logFilePath] <String>] [[-logSize] <Double>] [[-logGrowthType] {KB | Percent | None}] [[-logGrowth] <Double>] [[-logMaxSize] <Double>] [<CommonParameters>]

Detailed Description

The Add-SqlDatabase function Adds a new database to the specified SQL Server.

Related Commands

* Add-SqlDatabase

Parameters

Name Description Required? Pipeline Input Default Value
sqlserver    true  false   
dbname    true  false   
dataName    false  false   
dataFilePath    false  false   
dataSize    false  false   
dataGrowthType    false  false   
dataGrowth    false  false   
dataMaxSize    false  false   
logName    false  false   
logFilePath    false  false   
logSize    false  false   
logGrowthType    false  false   
logGrowth    false  false   
logMaxSize    false  false   

Input Type

None You cannot pipe objects to Add-SqlDatabase

Return Values

None This function does not generate any output.

Examples

EXAMPLE 1

Add-SqlDatabase "Z002\sql2k8" "NorthwindCopy"
This command adds the NorthwindCopy database to the Z002\sql2k8 server.