Commits

Sean Ryan  committed 5d903bf

LENA - scripts to dump the new database from temp db + script to deploy LING sql when in Odin.

  • Participants
  • Parent commits 32420e9

Comments (0)

Files changed (3)

File scripts/clear_output_files_LING_InOdin.bat

+SETLOCAL
+SET PATH_TO_NEW_SQL_DIR=%PATH_TO_COMREG%\LING\sql\database_scripts\
+
+del %PATH_TO_NEW_SQL_DIR%\originalSqlObjects.sql 
+del %PATH_TO_NEW_SQL_DIR%\newSQLresults.txt 

File scripts/run_deploySQL_LING_InOdin.bat

+@ECHO OFF
+
+SETLOCAL
+
+
+REM using a relative path, which will work on an Odin dev box, AND in production (as build script uses the same relative path)
+SET PATH_TO_NEW_SQL_DIR=%PATH_TO_COMREG%\LING\sql\database_scripts\
+
+SET PATH_TO_DUMP_OUT=%PATH_TO_NEW_SQL_DIR%originalSqlObjects.sql
+SET PATH_TO_NEW_RESULTS=%PATH_TO_NEW_SQL_DIR%newSQLresults.txt
+
+REM WinXP + SQL SERVER 2005:
+REM SET PATH_TO_SQLCMD_DIR=c:\Progra~1\MI6841~1\90\Tools\Binn\\
+
+REM SQL Server 2008 client:
+SET PATH_TO_SQLCMD_DIR=c:\Program Files\Microsoft SQL Server\100\Tools\binn
+
+REM for Windows7 + SQLSERVER2008:
+REM SET PATH_TO_SQLCMD_DIR=c:\Progra~1\MICROS~4\100\Tools\Binn\\
+
+REM Settings for dev database:
+SET SERVER=192.168.0.203\SQL2005DEV
+REM SET SERVER=SERVER\SQLSERVER_2005
+SET DBNAME=licensing_dev
+
+echo deploying SQL scripts:
+DeploySQL.py  %SERVER% %DBNAME% licensing %PATH_TO_NEW_SQL_DIR%\..\scripts\list_of_SQL_scripts_to_deploy.csv   %PATH_TO_DUMP_OUT%		%PATH_TO_NEW_SQL_DIR%		%PATH_TO_NEW_RESULTS%		"%PATH_TO_SQLCMD_DIR%"
+IF %ERRORLEVEL% NEQ 0 (GOTO ERROR_LABEL)
+
+REM echo backup of original SQL:
+REM type %PATH_TO_DUMP_OUT%
+REM IF %ERRORLEVEL% NEQ 0 (GOTO ERROR_LABEL)
+
+GOTO DONE
+
+:ERROR_LABEL
+error_occurred!
+
+REM type %PATH_TO_DUMP_OUT%
+
+:DONE

File scripts/sqlDump/run_dumpSql_test_LENA.bat

+@ECHO OFF
+setlocal
+
+set PYTHONPATH=..
+
+SET DEBUG_ON=-d
+
+REM comment this out, to turn on debugging:
+SET DEBUG_ON=
+
+REM SET OUTDIR=..\..\..\..\hg_eLicensing_DB_and_common\hg_eLicensing_DB\database\eLicensing_DOWN_FromWEB\database_scripts
+SET OUTDIR=..\..\..\..\hg_LING_main\LINGandLicensing\LING\sql\database_scripts
+
+SET DBNAME=test_LENA
+
+SET PATH_TO_PS=C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe
+
+echo _________________________________________
+echo .
+echo Dumping %DBNAME% database to disk ...
+echo .
+
+if not exist %OUTDIR% (dir_not_found)
+IF %ERRORLEVEL% NEQ 0 (GOTO ERROR_LABEL)
+
+time /t
+
+dumpSqlObjectsToDisk.py  %DEBUG_ON% 192.168.0.203\SQL2005DEV %DBNAME% licensing %OUTDIR% "c:\Program Files\Microsoft SQL Server\100\Tools\binn" %PATH_TO_PS%
+IF %ERRORLEVEL% NEQ 0 (GOTO ERROR_LABEL)
+
+time /t
+
+GOTO DONE
+
+echo _________________________________________
+echo .
+echo Results:
+echo .
+tree /f %OUTDIR%
+
+GOTO DONE
+
+:ERROR_LABEL
+error_occurred!
+
+REM type %PATH_TO_DUMP_OUT%
+
+:DONE
+echo .
+echo _________________________________________