This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
New-XDDatabase
Creates the specified Database or all Databases.
Syntax
New-XDDatabase
[-AllDefaultDatabases]
[-DatabaseCredentials <PSCredential>]
[-DatabaseNamePrefix <String>]
-DatabaseServer <String>
-SiteName <String>
[-AdminAddress <String>]
[<CommonParameters>]
<!--NeedCopy-->
New-XDDatabase
[-DatabaseCredentials <PSCredential>]
[-DatabaseName <String>]
-DatabaseServer <String>
-DataStore <DataStore>
-SiteName <String>
[-AdminAddress <String>]
[<CommonParameters>]
<!--NeedCopy-->
Description
If AllDefaultDatabases is specified, this cmdlet creates all databases using their default names on the specified SQL server. When used in this manner, the cmdlet need only be called once.
If DataStore is specified, this cmdlet creates the specified database on the specified SQL Server. When used in this manner, the cmdlet should be called once per datastore.
This cmdlet creates, but does not configure, the Database. Run New-XDSite to configure the Site to use the Database.
For database mirroring please refer to “about_XenDesktopModule_SiteConfiguration”.
Examples
EXAMPLE 1
Creates a Site Configuration Database called ‘MySiteDatabase’ for the Site named ‘MySite’ on ‘Instance_1’ of the SQL Server ‘MySqlServer’.
New-XDDatabase -AdminAddress MySiteController -SiteName MySite -Datastore Site -DatabaseServer MySqlServer\Instance_1 -DatabaseName MySiteDatabase
<!--NeedCopy-->
EXAMPLE 2
Creates a Configuration Logging Database called ‘MyLoggingDatabase’ for the Site named ‘MySite’ on ‘Instance_1’ of the SQL Server ‘MySqlServer’.
New-XDDatabase -AdminAddress MySiteController -SiteName MySite -Datastore Logging -DatabaseServer MySqlServer\Instance_1 -DatabaseName MyLoggingDatabase
<!--NeedCopy-->
EXAMPLE 3
Creates a Monitoring Database called ‘MyMonitorDatabase’ for the Site named ‘MySite’ on ‘Instance_1’ of the SQL Server ‘MySqlServer’.
New-XDDatabase -AdminAddress MySiteController -SiteName MySite -Datastore Monitor -DatabaseServer MySqlServer\Instance_1 -DatabaseName MyMonitorDatabase
<!--NeedCopy-->
EXAMPLE 4
Creates Site Configuration, Configuration Logging and Monitoring Databases called ‘MyPrefix-CitrixMySite’, ‘MyPrefix-CitrixConfigLoggingMySite’ and ‘MyPrefix-CitrixMonitorMySite’ for the Site named ‘MySite’ on ‘Instance_1’ of the SQL Server ‘MySqlServer’.
New-XDDatabase -AdminAddress MySiteController -SiteName MySite -AllDefaultDatabases -DatabaseServer MySqlServer\Instance_1 -DatabaseNamePrefix MyPrefix-
<!--NeedCopy-->
Parameters
-AllDefaultDatabases
All databases are created with their default names. The default names are listed with their corresponding dataStore types as follows:
- Site
The Site Configuration Database. The default name of this database is Citrix<SiteName>.
- Logging
The Configuration Logging Database. The default name of this database is CitrixConfigLogging<SiteName>.
- Monitor
The Monitoring Database. The default name of this database is CitrixMonitor<SiteName>.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DatabaseServer
The address of the SQL Server in which the database is to be created. This must include the SQL Instance name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SiteName
The name of the Site for which the specified database is to be created.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DataStore
The datastore type that is to be created. Valid values are Site, Logging and Monitor.
Type: | DataStore |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DatabaseCredentials
The security credentials, in the form of a PSCredential object, that will be used to connect to the SQL Server specified by the DatabaseServer parameter. If this parameter is not provided, then the implicit credentials of the user running the cmdlet are used to connect to the SQL Server.
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DatabaseNamePrefix
The prefix to be added to the default database names when AllDefaultDatabases is specified.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DatabaseName
The name that should be used for the database of the specified datastore type.
Type: | String |
Position: | Named |
Default value: | Site = Citrix |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AdminAddress
Specifies the address of the Delivery Controller to which the PowerShell module will connect. This can be provided as a host name or an IP address.
Type: | String |
Position: | Named |
Default value: | Localhost. Once a value is provided by any cmdlet, this value will become the default. |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
None
You cannot pipe input into this cmdlet.
Outputs
Citrix.XenDesktopPowerShellSdk.ServiceInterfaces.Configuration.Database
One Database object is returned for each datastore type that is created. Each Database object includes the database name, datastore type and SQL Server address.
Notes
If the user running this cmdlet does not have privilege to create databases on the specified SQL Server, then alternative credentials may be provided using the DatabaseCredentials parameter.
The command can fail for the following reasons:
- A connection could not be established with the specified SQL Server.
- The person running the cmdlet, or the supplied credentials, do not have sufficient privilege to create databases on the specified SQL Server. In this situation, use Get-XDDatabaseSchema, instead of New-XDDatabase, to generate SQL database creation scripts that may be given to a database administrator for execution on the SQL Server.
Related Links
Share
Share
In this article
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.