HI ALL,
i would like to know the version of sql server that is running on the client system before doing the main operation.
Can any one help me out in getting over this problem
Thanks in advance.
HI ALL,
i would like to know the version of sql server that is running on the client system before doing the main operation.
Can any one help me out in getting over this problem
Thanks in advance.
Try query,
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
Regards,
Inder.
Hi Inder,
thank you for the reply.
My requirement is little different than whatever you suggested. And thanks for the T-SQL tip to get the version info.
But I would like to know the sql server version installed from the .net framework.
Like i have written some code to execute, but the code is different for different version of sql server.
Is there any class available in .net framework that can dynamically tell me the version of SQL Server.
And i also want to load the assembly corresponding to the version of sql server dynamically.
Any help or suggestions are most welcome.
Thanks
Hello anikonave,
If you want to do this task within .NET codes, you can use SqlDataSourceEnumerator class.
Please check the following sql article http://www.kodyaz.com/articles/sql-server-instances-SqlDataSourceEnumerator.aspx for a sample which also returns the target instance version.
I hope that helps,
Eralper
You must log in to post.