New finsql.exe Command Prompt Options

New finsql.exe Command Prompt Options

Rate This
  • Comments 7

Based on partner feedback and the increasingly important goal of automating processes around a Microsoft Dynamics NAV installation, we’re pleased announce that we have added company-related and database-related command-line options to finsql.exe, in addition to the existing options. Introduced in hotfix 2791548, you can use the following commands to perform development tasks without using the Microsoft Dynamics NAV Development Environment.

  • Create company - new
  • Delete company - new
  • Rename company - new
  • Create database - new
  • Compile objects
  • Export objects
  • Import objects

Note

To use the new and changed command-line options, you must install hotfix 2791548 (requires access to PartnerSource/CustomerSource).

You can start the Microsoft Dynamics NAV Development Environment by running finsql.exe at the command prompt. By default, finsql.exe is located at C:\Program Files (x86)\Microsoft Dynamics NAV\70\RoleTailored Client\. The extended full syntax is:

Finsql.exe [command=<command> | designobject=<object type> <object ID>,] [servername=<server>,] [database=<database>,] [collationname=<collation>,] [company=<company>,] [newcompany = <new company>,] [filter=<filter>], [logfile=<logfile>,] [username=<user name>,] [password=<password>,] [ntauthentication=<yes|no|0|1>]

The full documentation is available on the MSDN Library. Additional documentation is available at Development Environment Commands.

Parameters

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

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.

Use this optional parameter when you create a database with the command=createdatabase parameter.

command

The development command that you want to run. The possible values include:

    • CompileObjects
    • CreateCompany
    • CreateDatabase
    • DeleteCompany
    • ExportObjects
    • ImportObjects
    • RenameCompany

If you specify this parameter and run a command, then the development environment does not open.

For more information, see Development Environment Commands.

company

The name of the company that you want to create, delete, or rename.

A company name cannot be more than 30 characters.

If you create, delete, or rename a company with the command parameter, then the company parameter is required.

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 do not 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 do not specify the database parameter but you do specify the servername parameter, then the Open Databasewindow opens so that you can specify the database name.

For more information, see Saving Setup Parameters in the Zup File.

designobject

The type and ID of the object that you want to design. The possible values of the object type include:

    • 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.

For more information, see DesignObject.

file

The path and file name. Use the file parameter for the following:

    • To specify the path and file name to which you export objects if you use the command=ExportObjects parameter. The file must have a .fob or .txt file name extension.
    • To specify the path and file name from which you import objects if you use the command=ImportObjects parameter. The file must have a .fob or .txt file name extension.
    • To specify the directory for the new database file if you use the command=createdatabase parameter.

For more information, see ExportObjects and ImportObjects.

filter

A filter on the Object table.

Use this parameter if you use the command parameter to compile, export, or import objects.

For more information, see Development Environment Commands.

id

Specifies the ID of the .zup file. 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 more information, see Saving Setup Parameters in the Zup File.

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 is not created.

For more information, see Development Environment Commands.

newcompany

The new name of the company that you rename.

A company name cannot be more than 30 characters.

If you rename a company with the command parameter, then the newcompany parameter is required.

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.

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.

password

Specifies 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.

servername

Specifies the name of the database server.

If you do not 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 do not 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.

temppath

Specifies the path of the location to store temporary files that are created while Microsoft Dynamics NAV runs. These files are automatically deleted when Microsoft Dynamics NAV is closed.

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

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.

Warning

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 or 0.

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

 

 

Best regards from the NAV Management Tools team

 

 

 

Leave a Comment
  • Please add 3 and 5 and type the answer here:
  • Post
  • The link to download the hotfix is not working

  • Hello Cristina (and others),

    The KB article will be available later today. Sorry for the inconvenience!

    /The NAV team

  • The link still not working.

  • Hello all,

    The hotfix is now available on PartnerSource/CustomerSource. We had some internal problems with tools, but all should accessible to you now.

    Sorry for the inconvenience!

    /The NAV team

  • Great that we have this interface. However one command I am missing: to import a translation file. Would be great if that was made available.

  • where do I find training on using the finsql?

  • How Do I: Manage Objects in Microsoft Dynamics NAV 2013 R2 Development Environment from the Command Prompt

    msdn.microsoft.com/.../dn582045

Page 1 of 1 (7 items)