Apply OS: Windows

Apply Navicat Product: All

Apply Navicat Version No.: Version 11.2 or above

 

Navicat Objects

Server Type

Command Lines

Backup

MySQL, PostgreSQL, SQLite and MariaDB

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

Import

All

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

Export Table

All

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

Export View Result

All

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

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

All

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

Query Execution

All

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

Data Transfer

All

navicat.exe -datatransfer ProfileName -t ProfileType

Data Synchronization

All

navicat.exe -datasync ProfileName -t ConnectionType

Batch Jobs

All

navicat.exe -batchjob BatchJobName

Print Report

All

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

ProfileType - type of the data transfer profile: MySQL, Oracle, PostgreSQL, SQLite, MSSQL, MariaDB 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