File tree Expand file tree Collapse file tree
samples/features/sql-big-data-cluster Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,8 +41,7 @@ if NOT EXIST tpcxbb_1gb.bak (
4141set SQLCMDSERVER = %SQL_MASTER_INSTANCE%
4242set SQLCMDUSER = sa
4343set SQLCMDPASSWORD = %SQL_MASTER_SA_PASSWORD%
44- for /F " usebackq" %%v in (`sqlcmd -I -b -h-1 -Q " print RTRIM((CAST(SERVERPROPERTY('ProductLevel') as nvarchar(128))));" `) do SET CTP_VERSION = %%v
45- if /i " %CTP_VERSION% " EQU " CTP2.4" (set MASTER_POD_NAME=mssql-master-pool-0) else (set MASTER_POD_NAME=master-0)
44+ for /F " usebackq" %%v in (`sqlcmd -I -b -h-1 -Q " print @@SERVERNAME;" `) do SET MASTER_POD_NAME = %%v
4645
4746REM Copy the backup file, restore the database, create necessary objects and data file
4847echo Copying sales database backup file to SQL Master instance...
Original file line number Diff line number Diff line change 5151 $DEBUG curl -G " https://sqlchoice.blob.core.windows.net/sqlchoice/static/tpcxbb_1gb.bak" -o tpcxbb_1gb.bak
5252fi
5353
54- CTP_VERSION=$( sqlcmd -S $SQL_MASTER_INSTANCE -Usa -P$SQL_MASTER_SA_PASSWORD -I -b -h-1 -Q " print RTRIM((CAST(SERVERPROPERTY('ProductLevel') as nvarchar(128))));" )
55-
56- if [ " $CTP_VERSION " == " CTP2.4" ]
57- then
58- MASTER_POD_NAME=mssql-master-pool-0
59- else
60- MASTER_POD_NAME=master-0
61- fi
54+ MASTER_POD_NAME=$( sqlcmd -S $SQL_MASTER_INSTANCE -Usa -P$SQL_MASTER_SA_PASSWORD -I -b -h-1 -Q " print @@SERVERNAME;" )
6255
6356echo Copying sales database backup file...
6457$DEBUG kubectl cp tpcxbb_1gb.bak $CLUSTER_NAMESPACE /$MASTER_POD_NAME :var/opt/mssql/data -c mssql-server || (echo $ERROR_MESSAGE && exit 1)
You can’t perform that action at this time.
0 commit comments