fixed database variable
This commit is contained in:
parent
ad466c35db
commit
15fa9d1b7b
|
@ -28,11 +28,11 @@ def executeSQLscriptUnix(sqlfile, conn_options, dbname):
|
|||
# This is a workaround because sqlcmd in Unix does not support -v option for variables.
|
||||
# It inserts setvar dbname into the beginning of a temp .sql file
|
||||
tmpFileName = sqlfile[0:-4] + '_tmp.sql'
|
||||
redirect_string = '(echo :setvar dbname {0}) > {2}; cat {1} >> {2}; '
|
||||
redirect_string = '(echo :setvar dbname {0}) > {2}; cat {1} >> {2}; cat {2}; '
|
||||
sqlcmd = 'sqlcmd ' + conn_options + ' -i ' + tmpFileName
|
||||
|
||||
print ('display contents of tmpFileName')
|
||||
show_cmd = 'cat ' + tmpFileName
|
||||
show_cmd = 'sqlcmd ' + conn_options + ' -Q select @@Version '
|
||||
executeCommmand(show_cmd)
|
||||
|
||||
inst_command = redirect_string.format(dbname, sqlfile, tmpFileName) + sqlcmd
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
$PhpDriver = "Microsoft SQL Server Driver for PHP";
|
||||
|
||||
$server = 'TARGET_SERVER';
|
||||
$dbName = 'TARGET_DATABASE';
|
||||
$database = 'TARGET_DATABASE';
|
||||
$userName = 'TARGET_USERNAME';
|
||||
$userPassword = 'TARGET_PASSWORD';
|
||||
|
||||
|
|
Loading…
Reference in a new issue