cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

script errors on AZure SQL thingworx schemas

vi1
15-Moonstone
15-Moonstone

script errors on AZure SQL thingworx schemas

Hello,

 

I have created Azure SQL srever and created thingworx database. I am trying to create schemas on thingworx database using script which provided by thingworx installation. Below are errors while running the schema setup script. I am using thingworx 8.5.11 Thingworx version.

 

Setting up ThingWorx schema and creating user twadmin in thingworx...
Password: sqlcmd : The term 'sqlcmd' is not recognized as the name of a cmdlet, function, script file, or operable progr
am.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Softwares\MED-61280-CD-085_SP11_ThingWorx-Platform-Azuresql-8-5-11\install\thingworxAzureSingleInstanceSchemaSetu
p.ps1:84 char:1
+ sqlcmd -S $server\\$serverinstance,$port -U $sqlserverloginname -d $database -i ...
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (sqlcmd:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

cat : Cannot find path 'C:\Softwares\MED-61280-CD-085_SP11_ThingWorx-Platform-Azuresql-8-5-11\install\tempLogFile.log'
because it does not exist.
At C:\Softwares\MED-61280-CD-085_SP11_ThingWorx-Platform-Azuresql-8-5-11\install\thingworxAzureSingleInstanceSchemaSetu
p.ps1:41 char:19
+ $tempContents = cat tempLogFile.log | Select-String -NotMatch "Password:"
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Softwares\ME...tempLogFile.log:String) [Get-Content], ItemNotFoundEx
ception
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand


rm : Cannot find path 'C:\Softwares\MED-61280-CD-085_SP11_ThingWorx-Platform-Azuresql-8-5-11\install\tempLogFile.log'
because it does not exist.
At C:\Softwares\MED-61280-CD-085_SP11_ThingWorx-Platform-Azuresql-8-5-11\install\thingworxAzureSingleInstanceSchemaSetu
p.ps1:45 char:3
+ rm tempLogFile.log
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Softwares\ME...tempLogFile.log:String) [Remove-Item], ItemNotFoundEx
ception
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand


Setting up model schema...
Password: sqlcmd : The term 'sqlcmd' is not recognized as the name of a cmdlet, function, script file, or operable progr
am.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Softwares\MED-61280-CD-085_SP11_ThingWorx-Platform-Azuresql-8-5-11\install\thingworxAzureSingleInstanceSchemaSetu
p.ps1:94 char:3.............................................

........................................

 

Regards,

Vidyullatha 

1 ACCEPTED SOLUTION

Accepted Solutions
odukiya
15-Moonstone
(To:vi1)

Hello @vi1 

 

So the error related to sqlcmd here shows that you have not installed A valid Microsoft SQL client (sqlcmd) and is not available in the PATH environment variable .But this is a prerequisite for microsoft SQL server.

 

Have you tried to install the database to SQL server here and trying to migrate to azure later? If yes this is something you are missing here.

 

Apart from it for Azure SQL you need to setup azure CLI where you can run your DB and schema setup scripts.

 

Please feel free to revert in case it doesn't resolve your query.

 

Thanks

Om Dukiya

View solution in original post

4 REPLIES 4
slangley
23-Emerald II
(To:vi1)

Hi @vi1.

 

It sounds like you failed to install SQL Server Mgmt Studio.  Did you follow these instructions?

 

Regards.

 

--Sharon

 

 

odukiya
15-Moonstone
(To:vi1)

Hello @vi1 

 

So the error related to sqlcmd here shows that you have not installed A valid Microsoft SQL client (sqlcmd) and is not available in the PATH environment variable .But this is a prerequisite for microsoft SQL server.

 

Have you tried to install the database to SQL server here and trying to migrate to azure later? If yes this is something you are missing here.

 

Apart from it for Azure SQL you need to setup azure CLI where you can run your DB and schema setup scripts.

 

Please feel free to revert in case it doesn't resolve your query.

 

Thanks

Om Dukiya

vi1
15-Moonstone
15-Moonstone
(To:odukiya)

Hello, 

Thank you for response.

 

I will reinstall SSMS again and add the path in environmental variables. 

 

 I have installed azure CLI and used windows power shell and connected to az login, run the script.

 

Regards,

Latha

odukiya
15-Moonstone
(To:vi1)

Hello @vi1 

 

So if the issue has been resolved and you feel your question has been answered, please mark the appropriate solution as accepted for benefit of others. If you have further question please feel free to revert.

 

Thanks

Om Dukiya

Top Tags