|
| |
| |
|
WISE
SCRIPTS - SQL VERSION
Find out what SQL version your server is running.
|
-
- Rem ***** Start - SQL Server version
- Rem ***** http://www.mcdbadirectory.com - by mark
wehmhoefer 10/26/2000
- Rem ***** WISE script for finding the SQL Server version
- Rem ***** Build the commands to get the SQL version
- Delete File(s) %TEMPINFILE%
- Insert Line "set nocount on" into Text File %TEMPINFILE%
- Insert Line "select @@version" into Text File %TEMPINFILE%
- Insert Line "go" into Text File %TEMPINFILE%
- Insert Line "set nocount on" into Text File %TEMPINFILE%
- Rem *****Use ISQL with the above tempinfile commands and
output to
- tempoutfile
- Rem ***** %ISQLSWITCHES could be thee values:
- Rem ***** trusted connection = -Syourserver -n -w300 -E
- Rem ***** sql login connection = -Syourserver -n -w300 -E -Usa
-Pyourpsw
- Execute isql %ISQLSWITCHES% -h-1 -i%TEMPINFILE% -o%TEMPOUTFILE%
-
- Rem *****Loop through the ISQL output text file tempoutfile
for the version
- string
- Set Variable SQLVERSION to
- Read Lines of File %TEMPOUTFILE% into variable SQLIN start
block
- If SQLIN contains "SQL Server" then
- If SQLIN contains "6.50" then
- Set Variable SQLVERSION to 6.50
- elseif SQLIN contains "2000" then
- Set Variable SQLVERSION to 2000.00
- Elseif SQLIN contains "7.00" then
- Set Variable SQLVERSION to 7.00
- elseif SQLIN contains "6.00" then
- Set Variable SQLVERSION to 6.0
- elseif SQLIN contains "4.20" then
- Set Variable SQLVERSION to 4.2
- else
- display message "SQL Server Version Unknown"
- exit installation
- End Block
- End Block
- End Block
- Rem *****End - SQL Server version
-
-
|
|
|
|
|