Skip to content

Commit

Permalink
faster mssql startup
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Nov 7, 2024
1 parent fea273f commit 8bb1941
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/mssql/configure-db.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/usr/bin/env bash

# Wait 60 seconds for SQL Server to start up
sleep 60
# Wait for SQL Server to be ready for connections
until /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -Q "SELECT 1;" -No
do
echo "Waiting for SQL Server to be ready..."
sleep 1
done

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

0 comments on commit 8bb1941

Please sign in to comment.