我已经提取了最新版本的Microsoft sql服务器docker映像( mcr.microsoft.com/mssql/server:2017-latest ),现在我想对此执行更长的命令图片。
经过一番摸索,似乎每个命令的字符限制为〜1000个字符。
例如以下命令无法执行:
docker exec -it sql1 /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "Str@ngPassword1" -Q "SELECT TOP (1000) [name] ,[object_id] ,[principal_id],[schema_id],[parent_object_id],[type],[type_desc],[create_date],[modify_date],[is_ms_shipped],[is_published],[is_schema_published],[is_replicated],[has_replication_filter] ,[has_opaque_metadata],[has_unchecked_assembly_data],[with_check_option] ,[is_date_correlation_view] ,[is_tracked_by_cdc] FROM [master].[sys].[all_views] where Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%' and Name like '%a%'"
错误是:
消息105,级别15,状态1,服务器7c30e32209f0,第1行 字符串'%a后的引号引起来 '。
消息102,级别15,状态1,服务器7c30e32209f0,第1行 '%a
附近的语法不正确
如果您删除一个”和“%a%”之类的名称,则代码可以正常执行。
此约束是否有解决方法?