Export (0) Print
Expand All

New-MasterDataServicesDatabase (Windows PowerShell)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Creates a Master Data Services database.


New-MasterDataServicesDatabase [-Server] <Microsoft.MasterDataServices.Configuration.DatabaseServerInformation>
   [-DatabaseName] <String> [-AdminAccount] <String> [-Collation <String>]

New-MasterDataServicesDatabase creates a Master Data Services database. It verifies that the specified instance of SQL Server is a supported version and edition to host the Master Data Services database, and it verifies that the specified account has permission to create a database on that instance.

-Server

The Server parameter is a database server information object from Get-MasterDataServicesDatabaseServerInformation. This object is used to connect to the instance of SQL Server on which to create the Master Data Services database.

Required?

true

Position?

0

Default Value

none

Accept Pipeline Input

true (ByValue)

Accept Wildcard Characters?

false

-DatabaseName

The DatabaseName parameter is a string that specifies the name of the new Master Data Services database.

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input

false

Accept Wildcard Characters?

false

-AdminAccount

The AdminAccount parameter is a string that specifies a domain and Windows account to grant permission to the new Master Data Services database.

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input

false

Accept Wildcard Characters?

false

-Collation

The Collation parameter is a string that specifies a collation for the new Master Data Services database.

Required?

false

Position?

named

Default Value

The default collation for the server.

Accept Pipeline Input

false

Accept Wildcard Characters?

false

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

Inputs

Microsoft.MasterDataServices.Configuration.DatabaseServerInformation

A database server information object from Get-MasterDataServicesDatabaseServerInformation.

Outputs

None

Output

The following is an example of the output that is returned when you use this cmdlet.

Name             : MyDatabase
HasAccess        : True
Collation        : SQL_Latin1_General_CP1_CI_AS
ServiceAccount   :
MdsAdministrator : MyDomain\AccountName
Server           : Microsoft.MasterDataServices.Configuration.DatabaseServerInformation
IsDatabaseOwner  : True

Using Variables and Named Parameters

This example uses the Get-MasterDataServicesDatabaseServerInformation cmdlet to set a variable, $server, to use for the Server parameter in the New-MasterDataServicesDatabase cmdlet. The parameters are named parameters, and the default collation is used for the new database because no collation is specified.

C:\PS> $server = Get-MasterDataServicesDatabaseServerInformation 
    -ConnectionString 'Data Source=MyServer\MyInstance;Initial catalog=;Integrated Security=True;User ID=;Password='; 
    New-MasterDataServicesDatabase -Server $server 
    -DatabaseName 'MyDatabase' -AdminAccount 'MyDomain\AccountName';

Piping Output and Using Named Parameters

This example pipes output from Get-MasterDataServicesDatabaseServerInformation to New-MasterDataServicesDatabase for the Server parameter in New-MasterDataServicesDatabase. The parameters are named parameters.

C:\PS> Get-MasterDataServicesDatabaseServerInformation 
    -ConnectionString 'Data Source=MyServer\MyInstance;Initial catalog=;Integrated Security=True;User ID=;Password=' | 
    New-MasterDataServicesDatabase -DatabaseName 'MyDatabase' 
    -AdminAccount 'MyDomain\AccountName' -Collation 'SQL_Latin1_General_CP1_CI_AS';

Using Variables and Positional Parameters

This example uses the Get-MasterDataServicesDatabaseServerInformation cmdlet to set a variable, $server, to use for the Server parameter in New-MasterDataServicesDatabase cmdlet. The parameters are positional parameters, and the default collation is used for the new database because no collation is specified.

C:\PS> $server = Get-MasterDataServicesDatabaseServerInformation 
    -ConnectionString 'Data Source=MyServer\MyInstance;Initial catalog=;Integrated Security=True;User ID=;Password='; 
    New-MasterDataServicesDatabase $server 'MyDatabase' 'MyDomain\AccountName';
Show:
© 2014 Microsoft