Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update configure-db.sh status comparison and loop condition #872

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

boerngen-schmidt
Copy link

Changed DBSTATUS to be striped of spaces.
The comparison of DBSTATUS and ERRCODE was changed to a string comparison, because the return value of sqlcmd when DB is not ready is an empty string.

Changed DBSTATUS to be striped of spaces. 
The comparison of DBSTATUS and ERRCODE was changed to a string comparison, because the return value of sqlcmd when DB is not ready is an empty string.
echo "INFO: Waiting for database to be ready..."
sleep 1
fi
done

# Run the setup script to create the DB and the schema in the DB
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -i setup.sql

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -i setup.sql
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $MSSQL_SA_PASSWORD -d master -i setup.sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants