Apply OS: Windows

Apply Navicat Product: All

Apply Navicat Version No.: Version 12.1

 

Navicat Object

Command Line

Automation

navicat.exe -batchjob BatchJobName

Backup
(MySQL, PostgreSQL, SQLite and MariaDB)

navicat.exe -backup [ProfileName] -u NavicatID -p ProjectName -t ConnectionType -c ConnectionName -d DatabaseName -s SchemaName

Data Synchronization

navicat.exe -datasync ProfileName -t ConnectionType

Data Transfer

navicat.exe -datatransfer ProfileName -t ProfileType

Export Materialized View Result
(Oracle and PostgreSQL)

navicat.exe -exportmview ProfileName -u NavicatID -p ProjectName -t ConnectionType -c ConnectionName -d DatabaseName -s SchemaName

Export Query Result

navicat.exe -exportquery ProfileName -u NavicatID -p ProjectName -t ConnectionType -c ConnectionName -d DatabaseName -s SchemaName

Export Table/Collection

navicat.exe -export ProfileName -u NavicatID -p ProjectName -t ConnectionType -c ConnectionName -d DatabaseName -s SchemaName

Export View Result

navicat.exe -exportview ProfileName -u NavicatID -p ProjectName -t ConnectionType -c ConnectionName -d DatabaseName -s SchemaName

Import

navicat.exe -import ProfileName -u NavicatID -p ProjectName -t ConnectionType -c ConnectionName -d DatabaseName -s SchemaName

MapReduce
(MongoDB)

navicat.exe -mapreduce ProfileName -u NavicatID -p ProjectName -t ConnectionType -c ConnectionName -d DatabaseName

MongoDump
(MongoDB)

navicat.exe -mongodump ProfileName

MongoExport
(MongoDB)

navicat.exe -mongoexport ProfileName

MongoImport
(MongoDB)

navicat.exe -mongoimport ProfileName

Query Execution

navicat.exe -query QueryName -u NavicatID -p ProjectName -t ConnectionType -c ConnectionName -d DatabaseName -s SchemaName

Print Report
(MySQL, Oracle, PostgreSQL, SQLite, SQL Server and MariaDB)

navicat.exe -report ReportName -u NavicatID -p ProjectName -t ConnectionType -c ConnectionName -d DatabaseName -s SchemaName FileType PathName [-sc DataPipelineName Value [Value ...] ...

Note:

NavicatID - if the connection stores in Navicat Cloud, Navicat ID is required, e.g. user@example.com

ProjectName - if the connection stores in Navicat Cloud, project name is required

ConnectionType - type of the connection: MySQL, Oracle, PostgreSQL, SQLite, MSSQL or MariaDB, MongoDB

ProfileType - type of the data transfer profile: MySQL, Oracle, PostgreSQL, SQLite, MSSQL, MariaDB, MongoDB or Premium

FileType - output report file type: -pdf, -html, -excel or -printer

PathName - printer name or target file path, e.g. C:\Users\Guest\Desktop\report_sample.pdf

DataPipelineName - name of the data pipeline under the Data tab

Value - value of the criteria with the AutoSearch option is checked under the Search tab of Query Designer under the Data tab


Example:

navicat.exe -report MyReport -u test@navicat.com -p Project1 -t MSSQL -c "SQL Server 2012" -d AdventureWorks -s dbo -pdf "C:\Users\Guest\Desktop\report_sample.pdf" -sc table1 value1 value2 -sc table2 value1

Have more questions?
Submit Ticket