Hello,
I need to detect whether the computer has SQL Server 2000 SP3 installed
before
attempting to connect to it, for example during my custom setup program. Wha
t
is the recommended way of doing this?
TIA,
A.SELECT TOP 0 NULL AS Property , NULL AS Variable
UNION ALL SELECT 'Version' , SERVERPROPERTY( 'ProductVersion' )
UNION ALL SELECT 'Level' , SERVERPROPERTY( 'ProductLevel' )
UNION ALL SELECT 'Engine Edition' , SERVERPROPERTY( 'Edition' )
"Abbey" <Abbey@.discussions.microsoft.com> wrote in message
news:1D2E126E-B6FE-411C-B157-FD3BBB49CE82@.microsoft.com...
> Hello,
> I need to detect whether the computer has SQL Server 2000 SP3 installed
> before
> attempting to connect to it, for example during my custom setup program.
What
> is the recommended way of doing this?
> TIA,
> A.
>|||HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Mi
crosoft SQL
Server\MSSQLServer\MSSQLServer\CurrentVe
rsion\
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Mi
crosoft SQL Server\<instance
name>\MSSQLServer\CurrentVersion\
Key name = CSDVersion (not CurrentVersion).
"Abbey" <Abbey@.discussions.microsoft.com> wrote in message
news:1D2E126E-B6FE-411C-B157-FD3BBB49CE82@.microsoft.com...
> Hello,
> I need to detect whether the computer has SQL Server 2000 SP3 installed
> before
> attempting to connect to it, for example during my custom setup program.
> What
> is the recommended way of doing this?
> TIA,
> A.
>|||This won't work "before attempting to connect to it"... you have to be
connected to the server to run your query...
> SELECT TOP 0 NULL AS Property , NULL AS Variable
> UNION ALL SELECT 'Version' , SERVERPROPERTY( 'ProductVersion' )
> UNION ALL SELECT 'Level' , SERVERPROPERTY( 'ProductLevel' )
> UNION ALL SELECT 'Engine Edition' , SERVERPROPERTY( 'Edition' )|||Hello Aaron,
Thanks for that suggestion - I'll try it and let you know...
Regards,
Abbey
"Aaron Bertrand [SQL Server MVP]" wrote:
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Mi
crosoft SQL
> Server\MSSQLServer\MSSQLServer\CurrentVe
rsion\
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Mi
crosoft SQL Server\<instance
> name>\MSSQLServer\CurrentVersion\
> Key name = CSDVersion (not CurrentVersion).
>
> "Abbey" <Abbey@.discussions.microsoft.com> wrote in message
> news:1D2E126E-B6FE-411C-B157-FD3BBB49CE82@.microsoft.com...
>
>|||Is there any harm in opening a connection to check the database version?
If it's the wrong version you can always run "wrong version" code and
disconnect the connection.
"Rebecca York" <rebecca.york {at} 2ndbyte.com> wrote in message
news:4362481f$0$134$7b0f0fd3@.mistral.news.newnet.co.uk...
> SELECT TOP 0 NULL AS Property , NULL AS Variable
> UNION ALL SELECT 'Version' , SERVERPROPERTY( 'ProductVersion' )
> UNION ALL SELECT 'Level' , SERVERPROPERTY( 'ProductLevel' )
> UNION ALL SELECT 'Engine Edition' , SERVERPROPERTY( 'Edition' )
>
> "Abbey" <Abbey@.discussions.microsoft.com> wrote in message
> news:1D2E126E-B6FE-411C-B157-FD3BBB49CE82@.microsoft.com...
> What
>sql
Wednesday, March 21, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment