次の方法で共有


UpgradeDatabase

Upgrades an existing Dynamics NAV database.

Syntax

finsql.exe command=upgradedatabase, servername=<server>, database=<database>[, logfile=<path and filename>,] [username=<user name>,] [password=<password>,] [ntauthentication=<yes|no|0|1>, ] [suppresselevationcheck=<yes|no|0|1]  

Parameters

servername

The name of the database server and server instance on which you want to run the command and upgrade the database.

Tip

To view the name of the server on which the current database is stored, on the File menu, choose Database, and then choose Information. Use the value of the Database Server field for the servername parameter.

database

The name of the database that you want to upgrade.

Tip

To view the name of the current database, on the File menu, choose Database, and then choose Information. Use the value of the Database Name field for the database parameter.

logfile

The path and file name for the file that contains error messages that result from the command. If there are no errors, then a log file is not created.

By default, the file is named naverrorlog.txt and is located in the same location as finsql.exe.

The navcommandresult.txt file, which contains information about the success or failure of the command, is created in the folder that is specified by the logfile parameter.

When you run finsql.exe with a command, the previous log file and result file are deleted.

Note

If User Access Control (UAC) is turned on and you do not specify to run the Command Prompt window as Administrator, then the Command Prompt window runs as a standard user. In this case, if you do not specify the logfile parameter, then the command fails because the standard user cannot write to the default location of the log file.

username

The user name to use to authenticate to the database. The user name must exist in the database. If you do not specify a user name and password, then the command uses the Windows user name and password of the current user to authenticate to the database.

Note

If User Access Control (UAC) is turned on and you do not specify to run the Command Prompt window as Administrator, then the Command Prompt window runs as a standard user. In this case, if you do not specify the username parameter and the current Windows user is an Administrator, then the command is run as the standard user.

If you specify the username parameter, then you must also specify the password parameter and the ntauthentication parameter must be no.

For more information about database users and permissions, see Setting Database Owner and Security Administration Permissions.

password

The password to use with the username parameter to authenticate to the database. If you do not specify a user name and password, then the command uses the Windows user name and password of the current user to authenticate to the database.

ntauthentication

Specifies if you want to use NT authentication. The possible values are yes, no, 1, or 0. If you specify the username and password parameters, then you must specify ntauthentication=no or ntauthentication=0.

suppresselevationcheck

Specifies whether to check that finsql.exe is running in elevated mode (as an administrator) and if not, give a warning that proceeding might cause errors. You are given the option to continue or cancel. The possible values are: no, 0, yes, and 1. no or 0 run the check. This is the default setting. yes or 1 suppress the check.

Remarks

You use the UpgradeDatabase command together with the finsql.exe executable when you want to convert a database from an earlier version of Dynamics NAV to the new version. For example, if you are upgrading several databases, you can create scripts that help you repeat the steps. Finsql.exe is the executable file that runs the Microsoft Dynamics NAV Development Environment. By default, finsql.exe is located at C:\Program Files (x86)\Microsoft Dynamics NAV\100RoleTailored Client\.

Important

The upgrade is not completed when you have run this command. You must compile all objects, and you must connect to a Microsoft Dynamics NAV Server instance. For more information, see Converting a Database.

Example

This example upgrades the NAV Danish Database database on the TestComputer01\NAVDEMO SQL Server instance.

finsql.exe command=upgradedatabase, servername=TestComputer01\NAVDEMO, database="NAV Danish Database"  

See Also

Using the Development Environment from the Command Prompt
Converting a Database
Microsoft Dynamics NAV Windows PowerShell Cmdlets
Compiling Objects
BuildVirtualMetadata
CreateDatabase
UpgradeDatabase
CreateLanguage
CreateLanguage
DesignObject
ExportObjects
ImportObjects
ExportLangModule
ImportLangModule
ExportTranslate
ImportTranslate