New-NAVApplicationDatabase
Creates a new Business Central application database.
New-NAVApplicationDatabase
[-DatabaseServer <String>]
-DatabaseName <String>
[-DatabaseLocation <String>]
[[-Collation] <String>]
[-ApplicationDatabaseCredentials <PSCredential>]
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Use the New-NAVApplicationDatabase cmdlet to create a new application database or initialize an existing database with the Business Central application tables.
New-NavApplicationDatabase -DatabaseServer .\BCDEMO -DatabaseName MyDatabase
This example creates a database.
New-NavApplicationDatabase -DatabaseServer .\BCDEMO -DatabaseName MyDatabase -ApplicationDatabaseCredentials (Get-Credential)
This example creates a new database using a credentials other than your Windows credentials. When you run this cmdlet, you are prompted to enter a valid username and password.
New-NAVApplicationDatabase -DatabaseServer . -DatabaseName MyDatabase_DK -DatabaseLocation c:\MyDatabase\DK -Collation Danish_Greenlandic_100_CS_AS
This example creates a database on a default or unnamed SQL Server instance. The database files are stored in a specified location, and the database collation is set to Danish_Greenlandic_100_CS_AS.
Specifies the username and password of a valid login account that has access to SQL Server. If you omit this parameter, your Windows credentials are used.
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the collation to assign the new database. The value must be a valid Windows collation name; otherwise, an error will occur when the Business Central Server tries to start. If you omit this parameter, the default collation that is assigned to SQL Server will be used. You cannot use this parameter to change the collation of an existing database.
Type: | String |
Position: | 0 |
Default value: | Latin1_General_100_CS_AS |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the location for database files, like the MDF and LDF files.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name to give the new database or the name of an existing empty database that you want to initialize to be a Business Central application database.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of the computer that is running SQL Server and the database instance on which you want to host the new database. You specify the value by using the format ComputerName\SQLServerInstance. The default database instance for Business Central is BCDEMO. If you are using a default or unnamed instance, you omit the SQL server instance.
Type: | String |
Position: | Named |
Default value: | Localhost |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
System.String
By property name: DatabaseServer
System.String
By property name: DatabaseName
System.String
By property name: DatabaseLocation
System.String
By value and by property name: Collation
System.Management.Automation.PSCredential
By property name: ApplicationDatabaseCredentials