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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Password thingworx

SA_10373213
7-Bedrock

Password thingworx

When I press enter after thingworxPostgresqlDBSetup command prompt, it says password not supplied. What is wrong there?

ACCEPTED SOLUTION

Accepted Solutions

Looks like you need to use the -r to tell it the password.  Did you specify that when running the file?

So you'd add something like:

-r myP@s5W0rd

 

 

Nick

View solution in original post

4 REPLIES 4

@SA_10373213 ,

 

Can you paste the command you are running?  Also, is this Windows or Linux?

 

-Nick

echo off
REM Copyright (c) 2015, PTC Inc. All rights reserved

REM PostgreSQL server psql runner script for Windows

SET server=localhost
SET port=5432
SET database=thingworx
SET tablespace=thingworx
SET tablespace_location=C:\ThingworxPostgresqlStorage
SET adminusername=postgres
SET thingworxusername=twadmin
SET managedinstancename=""

for /f "delims=" %%a in ('chcp ^|find /c "932"') do @ SET CLIENTENCODING_JP=%%a
if "%CLIENTENCODING_JP%"=="1" SET PGCLIENTENCODING=SJIS
if "%CLIENTENCODING_JP%"=="1" SET /P PGCLIENTENCODING="Client Encoding [%PGCLIENTENCODING%]: "

:LOOP
IF NOT "%1"=="" (
IF "%1"=="-h" (
SET server=%2
SHIFT
)
IF "%1"=="-H" (
SET server=%2
SHIFT
)
IF "%1"=="-p" (
SET port=%2
SHIFT
)
IF "%1"=="-P" (
SET port=%2
SHIFT
)
IF "%1"=="-d" (
SET database=%~2
SHIFT
)
IF "%1"=="-D" (
SET database=%~2
SHIFT
)
IF "%1"=="-t" (
SET tablespace=%~2
SHIFT
)
IF "%1"=="-T" (
SET tablespace=%~2
SHIFT
)
IF "%1"=="-l" (
SET tablespace_location=%~2
SHIFT
)
IF "%1"=="-L" (
SET tablespace_location=%~2
SHIFT
)
IF "%1"=="-a" (
SET adminusername=%~2
SHIFT
)
IF "%1"=="-A" (
SET adminusername=%~2
SHIFT
)
IF "%1"=="-r" (
SET password=%~2
SHIFT
)
IF "%1"=="-R" (
SET password=%~2
SHIFT
)
IF "%1"=="-u" (
SET thingworxusername=%~2
SHIFT
)
IF "%1"=="-U" (
SET thingworxusername=%~2
SHIFT
)
IF "%1"=="-m" (
SET managedinstancename=%2
SHIFT
)
IF "%1"=="-M" (
SET managedinstancename=%2
SHIFT
)
IF "%1"=="--help" (
echo usage: thingworxPostgresDBSetup.bat [-h ^<server^>] [-p ^<port^>] [-d ^<thingworx-database-name^>] [-t ^<tablespace-name^>] [-l ^<tablespace-location^>] [-a ^<database-admin-user-name^>] [-r ^<database-admin-password^>] [-u ^<thingworx-user-name^>] [-m ^<azure-managed-instance-name^>]
GOTO :END
)
SHIFT
GOTO :LOOP
)

echo Server=%server%
echo Port=%port%
echo Database=%database%
echo Tablespace=%tablespace%
echo Tablespace Location=%tablespace_location%
echo Admin User=%adminusername%
echo Thingworx User=%thingworxusername%
echo Azure Managed Instance=%managedinstancename%

IF NOT [%password%] == [] (
SET PGPASSWORD=%password%
)

echo Start Execution

REM Run psql
IF %managedinstancename%=="" (
psql.exe -q -h %server% -d postgres -U %adminusername% -p %port% -v database=%database% -v tablespace=%tablespace% -v username=%thingworxusername% -v tablespace_location=%tablespace_location% -f ./thingworx-database-setup.sql
pause
) else (
psql.exe -q -h %server% -d postgres -U %adminusername%%managedinstancename% -p %port% -v database=%database% -v tablespace=%tablespace% -v username=%thingworxusername% -v tablespace_location=%tablespace_location% -f ./thingworx-database-setup-managed.sql
pause
)
echo End Execution
:END

 

 

 

-Window

Looks like you need to use the -r to tell it the password.  Did you specify that when running the file?

So you'd add something like:

-r myP@s5W0rd

 

 

Nick

slangley
23-Emerald II
(To:SA_10373213)

Hi @SA_10373213.

 

The script should prompt for the password.  Have you made changes to the script?  It's not recommended to do so.  You can find the installation instructions here.  

 

If you continue to have issues, we can open a case to see what may be going on.

 

Regards.

 

--Sharon

Announcements


Top Tags