microsoft/mssql-scripter

Parameter --data-only is ignored when specify at least one object for the --include-objects or --exclude-objects parameter

AleksandrKurilov opened this issue · 2 comments

Hello!
Faced a problem, if you need to create a script to insert data with the --data-only parameter and specify at least one object for the --include-objects or --exclude-objects parameter, then scripts are created for --schema-only, and the parameter - -data-only is ignored. If you don’t specify objects for --include-objects or --exclude-objects, then scripts are created to insert data, but for the whole database, in my case it is too much data, I need data for some tables.
In this article, a person describes a situation in which he was able to create scripts for specific tables: https://www.mssqltips.com/sqlservertip/5913/mssqlscripter-tool-and-examples-to-generate-scripts-for-sql-server -objects /

I tried with SQL Server 2016 and 2017
I tried to Run a script in Python 2.7.12 and 3.8
And also from PowerShell and CMD,
The result is one.

The reason was the irrelevant version of the library

@AleksandrKurilov Can you elaborate? Whether or not I include --data-only or --schema-and-data, I get the same output with no data at all. I'm not doing any includes or excludes...