I used mvn , build tool to build my project. my sql server is MSSQL2017 . but when I , build project, it failed, given like this error. need some exptert help to fix it.
[INFO] Creating database: DatabaseConfiguration[host=CWLK-UMAYANGA,port=1433,user=spider3,password=********,catalog=schema-export_180427_083129335
[DEBUG] Executing: cmd.exe /X /C "sqlcmd -S tcp:CWLK-UMAYANGA,1433 -d master -U spider3 -P spider3 -I -r -Q "DECLARE @data_path nvarchar(256);SET @data_path = (SELECT SUBSTRING(physical_name, 1, CHARINDEX(N'master.mdf', LOWER(physical_name)) - 1)FROM master.sys.master_files WHERE database_id = 1 AND file_id = 1);EXEC ('CREATE DATABASE [schema-export_180427_083129335] ON ( NAME = MAIN, FILENAME = ''' + @data_path + 'schema-export_180427_083129335.mdf'', SIZE = 5MB ) LOG ON ( NAME = LOG, FILENAME = ''' + @data_path + 'schema-export_180427_083129335.ldf'', SIZE = 1MB)')""
'sqlcmd' is not recognized as an internal or external command,
operable program or batch file.
[ERROR] The following errors occured during execution:
[ERROR] 'sqlcmd' is not recognized as an internal or external command,
[ERROR] operable program or batch file.
[DEBUG] Received event (class org.apache.maven.lifecycle.internal.DefaultExecutionEvent): org.apache.maven.lifecycle.internal.DefaultExecutionEvent@638e271a
I type this query {"sqlcmd -S tcp:CWLK-UMAYANGA,1433 -d master -U spider3 -P spider3 -I -r -Q "DECLARE @data_path nvarchar(256);SET @data_path = (SELECT SUBSTRING(physical_name, 1, CHARINDEX(N'master.mdf', LOWER(physical_name)) - 1)FROM master.sys.master_files WHERE database_id = 1 AND file_id = 1);EXEC ('CREATE DATABASE [schema-export_180427_083129335] ON ( NAME = MAIN, FILENAME = ''' + @data_path + 'schema-export_180427_083129335.mdf'', SIZE = 5MB ) LOG ON ( NAME = LOG, FILENAME = ''' + @data_path + 'schema-export_180427_083129335.ldf'', SIZE = 1MB)')"
} in command prompt , it appear as following image and nothing given any error message.