Επεξεργασία

Κοινή χρήση μέσω


Using the development environment from the command prompt

Note

Dynamics NAV Development Environment is DISCONTINUED AFTER: Business Central Spring 2019.

You can start the Dynamics NAV Development Environment by running finsql.exe at the command prompt. You can also use the finsql.exe command to run the several development tasks without using the development environment client.

By default, finsql.exe is located at C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\210\RoleTailored Client\.

finsql.exe Command Syntax

The finsql.exe has the following syntax.

finsql.exe [command=<command> | designobject=<object type> <object ID>][,servername=<server>][,collation=<collation>][,database=<database>][,file=<file>][,filter=<filter>][,generatesymbolreference=<yes|no>][,importaction=<default|overwrite|skip|0|1|2>][,langid=<ID>][,logfile=<logfile>][,navservername=<name>][,navserverinstance=<instance>][,navservermanagementport=<port>][,ntauthentication=<yes|no|0|1>][,objectcache=<cache>][,password=<password>][,showalldesignercolumns=<yes|no|0|1>][,suppressbuildsearchindex=<yes|no|0|1>][,synchronizeschemachanges=<yes|no|force>][,temppath=<path>][,tenant=<tenant ID>][,unicode=<yes|no|0|1>][,useoldeditor=<yes|no>][,username=<user name>][,suppresselevationcheck=<yes|no|0|1>] 

Syntax Key

The following table describes the notation that is used to indicate syntax.

Notation Description
Text without brackets Parameters that you must type as shown.
<> A placeholder for values that you must supply. Don't include the brackets in the value.
[] Optional parameters. Don't include the brackets.
| A set of values from which to choose. Use one of the options and don't include &#124; in the value.

Information about building commands

  • The parameters that you'll use depend on the command that you're running as determined by the command and designobjects parameters.

  • You can place parameters in any order after finsql.exe.

  • Separate each parameter with a comma.

finsql.exe Parameters

The following table describes the parameters that you can use with finsql.exe.

Parameter Description Related command
collation The collation to use when you create a new database. The value must be one of the following values:

* A full language culture name. For example, da-DK for Danish or hu-HU for Hungarian.

* A SQL Server collation name without case or accent. For example, Latin1_General_100.

* A SQL Server collation name with case and accent. For example, Danish_Greenlandic_100_CS_AI.

Use this optional parameter when you create a database with the command=createdatabase parameter.
CreateDatabase
command The development command that you want to run. The possible values are as follows:

BuildVirtualMetadata
CreateDatabase
UpgradeDatabase
CompileObjects
DeleteObjects
ExportObjects
ImportObjects
ExportLangModule
ImportLangModule
ExportTranslate
ImportTranslate
ExportToNewSyntax
GetBuildVersion
GenerateSymbolReference
Not applicable
database If you use the command=CreateDatabase parameter, then the database parameter specifies the name of the new database that you want to create. In this case, the database parameter is required.

For all other commands, the database parameter specifies the database that you want to open.

If you don't specify both the servername and the database parameter, then the database server and database that are stored in the zup file are used. If you don't specify the database parameter but you do specify the servername parameter, then the Open Database window opens so that you can specify the database name.

For more information, see Saving Setup Parameters in the Zup File.
All
designobject See DesignObject Not applicable
file The path and file name of the file that is used for exporting data to or importing data from. The file type depends on the command. CreateDatabase

ExportObjects

ImportObjects

ExportLangModule

ImportLangModule

ExportTranslate

ImportTranslate
filter A filter on the Object table.

Use this parameter to specify which objects the command applies to.
CompileObjects

CreateLanguage

ExportObjects

ExportTranslate
id Specifies the path and file name of the zup file for storing setup parameters. By default, the setup parameters are stored in and retrieved from the fin.zup file. If you specify the id parameter, then the setup parameters are stored in and retrieved from a file that is named <id>.zup.

By default, the fin.zup file is located at C:\users\<user name>\AppData\Roaming\. To change the location of the .zup file, specify the path and ID in the id parameter.

For example, the following command sets the path and file name of the zup file to C:\mynavfin.zup:

finsql.exe id="C:\mynavfin.zup"

For more information, see Saving Setup Parameters in the Zup File.
None. You use this parameter as a stand-alone parameter with the finslg.exe.
import action Specifies how to handle conflicts with existing objects when you import from a fob file. The possible values are:

* default or 0 (default) – If there's a conflict, then an error is logged in the log file and no objects from the file are imported.

* overwrite or 1 – If there's a conflict, then overwrite the existing object with the object in the import file.

* skip or 2 - If there's a conflict, then skip the object. The existing object remains unchanged.
ImportObjects
langid Specifies the standard Windows three-letter ID of the language. CreateLanguage

ExportLangModule
logfile Specifies the path and file name for the file that contains error messages that result from running finsql.exe with the command parameter. If there are no errors, then a log file isn't created. All
navservername Specifies the name of the server that hosts the Business Central Server instance, such as MyServer. CompileObjects

DeleteObjects

ImportObjects
navserverinstance Specifies the Business Central Server instance that is being used, such as DynamicsNAV130. CompileObjects

DeleteObjects

ImportObjects
navservermanagementport Specifies the port on the Business Central Server that the Business Central Windows PowerShell cmdlets access, such as 7045. CompileObjects

DeleteObjects

ImportObjects
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. All
objectcache Specifies the size of the object cache, in kilobytes. Objects such as code, descriptions, and windows that are used on the computer that is running the development environment are stored in the object cache.

The default value is 32000.

For example, the following command sets the object cache to 50000:

finsql.exe objectcache=50000

You can also set the object cache from the Options window in the Tools menu of the development environment.
None. You use this as a stand-alone parameter with the finsql.exe.
password Specifies the password to use with the username parameter to authenticate to the database. If you don't 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. All
servername Specifies the name of the database server.

If you don't specify both the servername parameter and the database parameter, then the database server and database that are stored in the .zup file are used. If you don't specify the servername parameter but you do specify the database parameter, then the Open Database window opens so that you can specify the database server name.

For more information, see Saving Setup Parameters in the Zup File.
All
synchronizeschemachanges Synchronizes table schema changes for all tables in the database. This is useful when you upgrade from an earlier version of Business Central or when you made changes to a table or multiple tables previously and chose to synchronize later. For more information, see Synchronizing the Tenant Database with the Application Database. All
temppath Specifies the path of the location to store temporary files that are created while Business Central runs. These files are automatically deleted when Business Central is closed.

By default, these files are put in the Temp folder for the user, such as <C:\Users\<user name>\AppData\Local\Temp>.

For example, the following command sets the temporary file path to C:\Temp:

finsql.exe temppath="c:\temp"

You can also set the temporary file path from the Options window in the Tools menu of the development environment.
None. You use this as a stand-alone parameter with the finsql.exe.
tenant Specifies the ID of the tenant that is accessed when you run objects from the development environment. If your solution isn't set up to deploy in a multitenant deployment architecture, leave the parameter empty. CompileObjects

DeleteObjects

ImportObjects
unicode Specifies if you want to open the development environment with Unicode enabled.

Add the unicode=1 parameter to finsql.exe if your application objects contain strings such as €, and you want to compile and use the objects on computers with different codepages.
None. This parameter isn't relevant when you use command because the development environment doesn't open.
useoldeditor Specifies whether to use the C/AL Editor that was available in Microsoft Dynamics NAV 2015 and earlier versions. The C/AL Editor was redesigned in Microsoft Dynamics NAV 2016.

To use the old editor, specify the parameter as useoldeditor=yes or useoldeditor.

To use the new editor, omit the parameter or specify it as useoldeditor=no.
None. This parameter isn't relevant when you use command because the development environment doesn´'t open.
username The user name to use to authenticate to the database. The user name must exist in the database. If you don't 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.

Alert: If User Access Control (UAC) is turned on and you don't specify to run the Command Prompt window as Administrator, the Command Prompt runs as a standard user. In this case, if you don't 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 Reauthentication parameter must be no or 0.
All
showalldesignercolumns Specifies whether to hide or show the Visible and ApplicationArea columns in Page Designer. The possible values are: no, 0, yes, and 1.

no or 0 - Hides the columns. This value is the default setting.

yes or 1 - Shows the column.

Note: This parameter is only relevant the first time the development environment is opened for a new installation. If the development environment has been opened before, this parameter is ignored. The column setup parameters are retrieved from the fin.zup file that is used by the development environment. By default, the fin.zup file is located in the C:\Users[username]\AppData\Roaming folder.
All
suppresselevationcheck Specifies whether to check that finsql.exe is running in elevated mode (as an administrator). If not in elevated mode, you get 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 runs the check. This value is the default setting.

yes or 1 suppresses the check.
UpgradeDatabase

Database conversion

BuildVirtualMetadata

Regenerates C# and metadata information in Business Central virtual tables for a specified language.

Syntax

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

Example

This example builds metadata for virtual tables in the Demo Database database.

finsql.exe command=buildvirtualmetadata,servername=TestComputer01\BCDEMO,database="Demo Database"  

CreateDatabase

Creates a new database for Business Central on an SQL server.

Syntax

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

collation

The collation to use when you create a new database. The value must be one of the following:

  • A full language culture name. For example, da-DK for Danish or hu-HU for Hungarian.
  • A SQL Server collation name without case or accent. For example, Latin1_General_100.
  • A SQL Server collation name with case and accent. For example, Danish_Greenlandic_100_CS_AI.

Example

This example creates a database on a SQL server that is named TestComputer01\BCDEMO. The new database is given the name NAV Danish Database and uses the collation da-DK.

finsql.exe command=createdatabase,servername=TestComputer01\BCDEMO,database="NAV Danish Database",collation=da-dk  

CompileObjects

Compiles objects from the specified database.

Syntax

finsql.exe command=compileobjects[,servername=<server>][,database=<database>][,filter=<filter>][,logfile=<path and filename>][,username=<user name>][,password=<password>][,ntauthentication=<yes|no|0|1>][,synchronizeschemachanges=<yes|no|force>][,navservername=<server name>][,navserverinstance=<instance>][,navservermanagementport=<port>][,tenant=<tenant ID>]  

synchronizeschemachanges

Specifies how to synchronize table definition changes in the business (tenant) database in SQL Server. The following table describes the available options.

Option Description
yes Before applying changes to the business data table, Business Central Server validates the changed table definition to check for destructive changes to the table. It includes changes that require data is deleted in the fields of the business data table that are affected by the changes before the changes can be applied.

- If there are no destructive changes to the table, then the schema changes are applied to the business data table immediately.
- If there are destructive changes, Business Central Server checks that there are table synchronization instructions in an upgrade codeunit. If there are instructions, then the schema changes are applied to the business database table according to the instructions. If there are no instructions, then an error message appears. The table definition changes aren't saved and the schema changes aren't applied.
no Table definition changes are saved and compiled in the application but the changes aren't validated or applied to the business data table. You synchronize the table schema later by doing one of the following steps:

- Save or compile the table from Object Designer in development environment and choose either the Now - with validation or Force synchronization option.
- Use the Sync. Schema for All Tables option on the Tools menu.
- Run the Sync-NAVTenant cmdlet from the Dynamics NAV Administration Shell.
force Table definition changes are applied to the business data table schema without validation. For destructive changes, data in columns of the business data table that are affected by changes will be deleted.

This option ignores any table synchronization instructions for the table in upgrade codeunits.

For more information about table schema synchronization, see Synchronizing the Tenant Database with the Application Database.

navservername

Specifies the name of the server that hosts the Business Central Server instance, such as MyServer.

navserverinstance

Specifies the Business Central Server instance that is being used, such as DynamicsNAV130.

navservermanagementport

Specifies the port on the Business Central Server server that the Business Central Windows PowerShell cmdlets access, such as 7045.

tenant

Specifies the ID of the tenant that is accessed when you run objects from the development environment. If your solution isn't set up to deploy in a multitenant deployment architecture, leave the parameter empty.

Remarks

You use the CompileObjects command together with the finsql.exe executable. finsql.exe is the executable file that runs the development environment. By default, finsql.exe is located at C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\210\RoleTailored Client\.

To compile objects, you must have a developer license.

Example

This example shows how to run a command to compile all tables and codeunits that have an ID that is greater than or equal to 500 and less than or equal to 1000.

finsql.exe command=compileobjects,servername=TestComputer01\BCDEMO,database="Demo Database BC",filter="Type=Table|Codeunit;ID=500..1000"  

CreateLanguage

Creates captions on Business Central objects for a specified language.

Syntax

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

Parameters

langid

Specifies the standard Windows three-letter ID of the language that you want to add captions for.

Remarks

The CreateLanguage command adds a language caption entry in the CaptionML Property of the controls in the objects that you specify. By default, the caption is the same value as the Name Property of the control.

Note

After you run the command, you must to compile the modified objects. For more information, see CompileObjects.

Example

This example adds captions for Danish (DAN) on all table and page objects with IDs from 1 to 10000 in the BC Danish Database.

finsql.exe command=createlanguage,langid=DAN,servername=TestComputer01\BCDEMO,database="BC Danish Database",filter="Table|Page;ID=1..10000"  

DeleteObjects

Deletes objects from the specified Business Central database.

Syntax

finsql.exe command=deleteobjects[,servername=<server>][,database=<database>][,filter=<filter>][,logfile=<path and filename>][,username=<user name>][,password=<password>][,ntauthentication=<yes|no|0|1>][,synchronizeschemachanges=<yes|no|force>][,navservername=<server name>][,navserverinstance=<instance>][,navservermanagementport=<port>][,tenant=<tenant ID>]  

Remarks

When you run the command, objects are deleted without a warning or confirmation prompt.

Example

This example shows how to run the DeleteObjects command to delete all tables and codeunits that have an ID that is greater than or equal to 500 and less than or equal to 1000.

finsql.exe command=deleteobjects,servername=TestComputer01\BCDEMO,database="Demo Database BC",filter="Type=Table|Codeunit;ID=500..1000"  

DesignObject

Opens the development environment and opens the specified object for design.

Syntax

finsql.exe designobject=<object type> <object ID>[,servername=<server>][,database=<database>][,username=<user name>][,password=<password>][,ntauthentication=<yes|no|0|1>]  

designobject

The type and ID of the object that you want to design. This parameter is required. The possible values of the object type are:

  • Table

  • Page

  • Report

  • Codeunit

  • Query

  • XMLport

    The possible values of the object ID are 0 and any ID of an existing object. If you specify 0 for the object ID, then you open a new object to design.

Example

This example shows how to run a command to open the Dynamics NAV Development Environment and open Page Designer to design page 21, Customer Card.

finsql.exe servername=TestComputer01\BCDEMO,database="Demo Database BC",designobject=Page 21  

ExportLangModule

Exports a language module from the specified database to a file.

Syntax

finsql.exe command=exportlangmodule,file=<exportfile>,langid=<langid>[,servername=<server>][,database=<database>][,logfile=<path and filename>][,username=<username>][,password=<password>][,ntauthentication=<yes|no|1|0>]  

Parameters

file

Specifies the path and file name to which you want to export the language module. This parameter is required.

Give the file name the extension .flm, for example, C:\ENUlanguagemodule.flm.

langid

Specifies the standard Windows three-letter ID of the language that you want to export, such as ENU or DAN.

ENU is the default value. If you don't specify the langid parameter, then the language module for ENU is exported.

Remarks

The language isn't deleted from the database.

Example

This example shows how to run the ExportLangmodule command to export a language module for Danish (DAN) from the Demo Database NAV (10-0) database.

finsql.exe command=exportlangmodule,langid=DAN,file=C:\DANlanguagemodule.flm,servername=TestComputer01\BCDEMO,database="Demo Database BC",username=dbadmin,password=P@ssword,ntauthentication=no,logfile=C:\ExportDANlanguagemoduleLog.txt  

ExportObjects

Exports objects from the specified database.

Syntax

finsql.exe command=exportobjects,file=<exportfile>[,servername=<server>][,database=<database>][,logfile=<path and filename>][,filter=<filter>][,username=<username>][,password=<password>][,ntauthentication=<yes|no|1|0>]  

Parameters

file

The path and file name to which you export objects. This parameter is required. You can export objects to one of the following file types:

  • txt

  • fob

    You specify the file type by the file name extension in the file parameter.

Remarks

You use the ExportObjects command with the finsql.exe from a command prompt. finsql.exe is the executable file that runs the development environment. By default, finsql.exe is located at C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\210\RoleTailored Client\.

To export objects to a txt file, you must have a developer license. To export objects to a fob file, you can have either an end-user license or a developer license.

You can specify parameters in any order.

Example

This example shows how to run a command to export all queries in a given ID range, using the specified user name and password.

finsql.exe command=exportobjects,file=C:\QueryExport.txt,servername=TestComputer01\BCDEMO,database="Demo Database BC",filter="Type=Query;ID=50001..50010",username=dbadmin,password=P@ssword,ntauthentication=no,logfile=C:\QueryExportLog.txt  

ExportToNewSyntax

Export application objects to a .txt file in the syntax that is supported by the Txt2Al conversion tool. The Txt2Al conversion tool enables you to convert Business Central objects that are written in the C/AL language (using the Dynamics NAV Development Environment) to the AL (.al) format.

Syntax

finsql.exe command=exporttonewsyntax,file=<filename.txt>[,servername=<server>][,database=<database>][,filter=<filter>][,logfile=<path and filename>][,username=<username>][,password=<password>][,ntauthentication=<yes|no|1|0>]  

Parameters

file

Specifies the path and name of the text file to export to the AL-supported syntax, for example, C:\objects.txt. This parameter is required.

Example

The following example exports the table 225 from the Demo Database NAV database:

finsql.exe command=exporttonewsyntax,file=exportedobjects.txt,database="Demo Database NAV",servername=.\BCDEMO ,filter=type=table;ID=225

ExportTranslate

Exports UI text strings of objects from a specified Business Central database to a text file.

Syntax

finsql.exe command=exporttranslate,file=<exportfile>[,servername=<server>][,database=<database>][,filter=<filter>][,logfile=<path and filename>][,username=<username>][,password=<password>][,ntauthentication=<yes|no|1|0>]  

Parameters

file

Specifies the path and name of the text file in which to export the text strings, for example C:\translatestrings.txt. This parameter is required.

Remarks

You can use this command for translating text strings in multilanguage setup of Business Central. This command exports all text strings that are associated with objects. It includes text strings that are defined by for properties of the objects in all languages. For more information, see How to: Add Translated Strings By Importing and Exporting Multilanguage Files in Dynamics NAV.

Example

This example shows how to run the ExportTranslate command to export text strings from the Demo Database BC database to a txt type file that has the path and file name C:\bctextstrings.txt.

finsql.exe command=exporttranslate,file=C:\bctextstrings.txt,servername=TestComputer01\BCDEMO,database="Demo Database BC"  

Generatesymbolreference

Generates object symbols for developing against the objects in the AL Development Environment.

Syntax

finsql.exe command=generatesymbolreference,Database=<database name>,servername=<servername>

Example

finsql.exe Command=generatesymbolreference,Database="Demo Database BC",ServerName=.\BCDEMO

GetBuildVersion

Gets the Business Central product name and build version number that is currently installed and saves the information to a txt type file.

Syntax

finsql.exe command=getbuildversion,file=<versionfile>[,logfile=<path and filename>]  

Parameters

file

Specifies the folder path and file name of the text file, for example C:\bcbuildversion.txt, in which to save the build information. This parameter is required.

logfile

The folder path and file name of a text file, for example C:\bcbuildversionlog.txt, in which to save error messages that result from the command. If there are no errors when you run the command, then a log file isn't created.

Remarks

When you run the command, a file that contains information about the success or failure of the command is automatically created. The file has the name navcommandresult.txt. If you specify the logfile parameter, then the navcommandresult.txt file is created in the folder that is specified by the logfile parameter. If you don't specify the logfile parameter, the file is created in the same location as finsql.exe file, which by default is C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\210\RoleTailored Client.

Note

If User Access Control (UAC) is turned on and you don't run the command prompt as an Administrator, then the command prompt window runs as a standard user. In this case, if you don't specify the logfile parameter, then the command fails because the standard user cannot write to the default location of the finsql.exe file.

Example

This example shows how to run the GetBuildVersions command to get the product name and version of Business Central that is currently installed on the computer. The example saves the build version information to a txt type file that has the path and file name C:\temp\navbuildversion.txt. The example also specifies a log file that has the path and file name C:\temp\bcbuildversionlog.txt

finsql.exe command=getbuildversion,file=C:\temp\navbuildversion.txt,logfile= C:\temp\bcbuildversionlog.txt  

The build version file, in this case bcbuildversion.txt, includes information that is similar to the following:

Product Name: Business Central

Product Version: 13.0.38865.0

ImportLangModule

Imports a language module from a file to the specified Business Central database.

Syntax

finsql.exe command=importlangmodule,file=<importfile>[,servername=<server>][,database=<database>][,filter=<filter>][,logfile=<path and filename>][,username=<username>][,password=<password>][,ntauthentication=<yes|no|1|0>] 

Parameters

file

Specifies the path and file name of the language module to import. This parameter is required.

The file name should have the extension .flm, for example, C:\ENUlanguagemodule.flm.

Remarks

You can specify parameters in any order.

Example

This example shows how to run the ImportLangModule command to import a language module for Danish (DAN) to the Demo Database NAV (10-0) database. The language module file path is C:\DANlanguagemodule.flm.

finsql.exe command=importlangmodule,file=C:\DANlanguagemodule.flm,servername=TestComputer01\BCDEMO,database="Demo Database BC"  

ImportObjects

Imports objects from a file to the specified database.

Syntax

finsql.exe command=importobjects,file=<importfile>[,servername=<server>][,database=<database>][,logfile=<path and filename>][,importaction=<default|overwrite|skip|0|1|2>][,username=<username>][,password=<password>][,ntauthentication=<yes|no|1|0>][,synchronizeschemachanges=<yes|no|force>][,navservername=<server name>][,navserverinstance=<instance>][,navservermanagementport=<port>][,suppressbuildsearchindex=<yes|no|1|0>][,tenant=<tenant ID>]  

Parameters

file

The path and file name from which you import objects. This parameter is required. The file must have a fob or txt file name extension.

importaction

Specifies how to handle conflicts with existing objects when you import from a fob file. The possible values are:

  • default or 0 (default) – If there's a conflict, then an error is logged in the log file and no objects from the file are imported.

  • overwrite or 1 – If there's a conflict, then overwrite the existing object with the object in the import file.

  • skip or 2 - If there's a conflict, then skip the object. The existing object remains unchanged.

Warning

If you import from a txt file and there's a conflict, then the objects in the import file overwrite the existing objects in the database.

Note

After you import an object from a txt file, you must compile the object before you use it. If you import an object from a fob file, then the object is compiled automatically after it is imported.

suppressbuildsearchindex

When importing objects from a fob file, specifies whether the command will also build the object search index. The parameter has the following values:

  • no or 0 (default) - the search index isn't built.
  • yes or 1 – the search index isn't built.

Building the search index makes sure that pages and reports, which are properly configured for search, can be found by the Tell Me feature in the client (for more information, see Add pages and reports to Tell me. Building the search index will add time to the import operation.

Setting suppressbuildsearchindex=yes can be useful if you're importing several fob files. In which case, for example, you could use suppressbuildsearchindex=yes parameter on all import commands except the last one. Or, you can skip the search index from the command, and run it afterward from the Dynamics NAV Development Environment by selecting Tools > Build Object Search Index.

Remarks

You use the ImportObjects command with the finsql.exe from a command prompt. finsql.exe is the executable file that runs the development environment. By default, finsql.exe is located at C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\210\RoleTailored Client\.

To import objects from a txt file, you must have a developer license. To import objects from a fob file, you can have either an end-user license or a developer license.

Example

This example shows how to run a command to import the objects from a fob file into Business Central. If any of the objects to import already exist in the database, then overwrite them with the objects from the import file.

finsql.exe command=importobjects,file=C:\NewObjects.fob,servername=TestComputer01,database="Demo Database BC",ImportAction=overwrite  

ImportTranslate

Imports UI text strings for objects from a text file to a specified Business Central database.

Syntax

finsql.exe command=importtranslate,file=<importfile>[,servername=<server>][,database=<database>][,filter=<filter>][,logfile=<path and filename>][,username=<username>][,password=<password>][,ntauthentication=<yes|no|1|0>]  

Parameters

file

Specifies the path and name of the text file that contains the text strings to import, for example C:\translatestrings.txt. This parameter is required.

Remarks

You can use this command for translating text strings in multilanguage setup of Business Central. The contents of the text file must be compatible with Business Central. Therefore, the text file will typically have originated from a text file that was previously exported from the database, and then modified. For more information, see How to: Add Translated Strings By Importing and Exporting Multilanguage Files in Dynamics NAV.

Example

This example shows how to run the ImportTranslate command to import text strings from a text file to the Demo Database NAV (10-0) database. The text file that has the path and file name C:\bctextstrings.txt.

finsql.exe command=importtranslate,file=C:\bctextstrings.txt,servername=TestComputer01\BCDEMO,database="Demo Database BC"  

UpgradeDatabase

Upgrades an existing Business Central 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>]   

Remarks

You use the UpgradeDatabase command together with the finsql.exe executable when you want to convert a database from an earlier version of Business Central 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 Dynamics NAV Development Environment. By default, finsql.exe is located at C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\210RoleTailored Client\.

Important

The upgrade isn't completed when you have run this command. You must compile all objects, and you must connect to a Business Central Server instance. For more information, see Converting a Database.

Example

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

finsql.exe command=upgradedatabase,servername=TestComputer01\BCDEMO,database="BC Danish Database"