SQL server shows different versions when seen from about screen and from query - sql

I had to see version of my sql server management studio, I went to Help --> About, it showed me following screen:
link to image: About Screen of my SQL Server Management Studio
It clearly shows that SQL Server is R2 with version 10.50.1600.1.
But when I run query
Select ##version, It returns me this:
Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (Intel X86) Mar 29 2009 10:27:29 Copyright (c) 1988-2008 Microsoft Corporation Express Edition on Windows NT 5.1 (Build 2600: Service Pack 3)
Which shows it is not R2, also version is changes i.e 10.0.2531.0
I am not getting why is this? Can someone explain why both enquiries return different versions. Although I installed R2 in it.
And if it is not R2 then how to upgrade it to R2. Please help

You can see version of SQL Server on local computer by using Help\About. but when run select ##Version, you see version of SQL Server database engine that login on it. In other word you run SSMS from local computer and Help\About show version of SSMS. and then login to sql server database engine of your server, Select ##Version show version of sql server on the server.

Related

Can't Attach Northwind database as it's version 661. Server supports 612 and earlier [duplicate]

When trying to attach a database file to:
Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (X64) Sep 16 2010 19:43:16 <X64> (Build 7600: )
I get this error message:
The database cannot be opened because
it is version 661. This server
supports version 662 and earlier. A
downgrade path is not supported.
Any idea why? and how to solve it?
SQL Server 2008 databases are version 655. SQL Server 2008 R2 databases are 661. You are trying to attach an 2008 R2 database (v. 661) to an 2008 instance and this is not supported. Once the database has been upgraded to an 2008 R2 version, it cannot be downgraded. You'll have to either upgrade your 2008 SP2 instance to R2, or you have to copy out the data in that database into an 2008 database (eg using the data migration wizard, or something equivalent).
The message is misleading, to say the least, it says 662 because SQL Server 2008 SP2 does support 662 as a database version, this is when 15000 partitions are enabled in the database, see Support for 15000 Partitions.docx. Enabling the support bumps the DB version to 662, disabling it moves it back to 655. But SQL Server 2008 SP2 does not support 661 (the R2 version).
To clarify, a database created under SQL Server 2008 R2 was being opened in an instance of SQL Server 2008 (the version prior to R2). The solution for me was to simply perform an upgrade installation of SQL Server 2008 R2. I can only speak for the Express edition, but it worked.
Oddly, though, the Web Platform Installer indicated that I had Express R2 installed. The better way to tell is to ask the database server itself:
SELECT ##VERSION

There was an unknown error applying the filestream settings. check the parameters are valid

I am getting the following error while trying to configure FileStream in SQL server 2012.
There was an unknown error applying the filestream settings. check the parameters are valid. (0x80041008)
I am configuring it using SQL server configuration manager.
Where as I am able to setup it for SQL server 2008 R2.
I had this same problem just yesterday.
In my case it was because I had a 64-bit Windows and a 32-Bit SQL Server.
You do not see the exact error, but if you try to do it with T-SQL, then the proper error comes up in SQL, telling you something about "WOW64" not supporting filestream.
I just uninstalled and installed the right bit version of SQL, and all worked 100% again.
In my case the problem I was running the SQL Server 2014 configuration manager. While this usually shouldn't cause problems, in my case it did. Configuring FILESTREAM using the SQL Server 2012 configuration manager worked.
If it still doesn't work, make sure you're up-to-date. SQL Server 2012 has received quite a lot of patches (SP2, SP3, and some updates).
TL;DR
I simply installed Service pack 2 (SP2) patch of SQL Server 2008 R2 and everything started working for me.
Read on if you want to know more. Configuration wise my box was all correct and the file stream feature should have been working on my default instance of SQL Server 2008 R2. Here are my box details:
Operating System: Windows 7 Ultitmate SP1 (64 Bit)
SQL Server Version: SQL Server 2008 R2 SP1
On SQL Server if I run this query select ##version it was returning following details:
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Apr 2 2010 15:48:46 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
Whenever I opened SQL Server 2008 Configuration manager I will face this issue. Luckily I also had SQL Server 2014 installed on my machine. So I tried enabling File Stream feature from configuration manager GUI of SQL Server 2014 but it started giving error mentioned in current post.
I simply installed Service pack 2 (SP2) patch of SQL Server 2008 R2 and everything started working for me. SQL Server Configuration manager for 2008 R2 also works fine and I'm able to enable File Stream feature also without any trouble. SQL Server 2008 R2 SP2 can be downloaded from here.

'EOMONTH' is not a recognized built-in function name- SQL Server 2012

I installed the SQL Server 2012- Developer edition. When I apply SELECT ##version, I get:
Microsoft SQL Server 2005 - 9.00.5000.00 (Intel X86)
Dec 10 2010 10:56:29
Copyright (c) 1988-2005 Microsoft Corporation
Express Edition on Windows NT 6.1 (Build 7601: Service Pack 1)
But when I go to help, then about, It shows that it's SQL Server 2012.
I'm trying to use the EOMONTH function and I'm getting an error that the EOMONTH is unrecognizable built in function. Can anybody please help me understand what's going on? Thanks!I'm fairly new to T-SQL.
You might be connecting to an instance of SQL Server 2005 from SSMS 2012.
Make sure you select correct server/instance while connecting to Database Engine.

Is it possible to install SQL Server 2005 (enterprise edition) on Windows Server 2008?

Is it possible to install SQL Server 2005 (Enterprise Edition) on Windows Server 2008?
Sure, why shouldn't it be possible to do that???
Just do it! I don't see any reasons why you should have any issues with this setup.
Go ahead and try it - if you run into any actual problems, come back (but preferably to http://Serverfault.com) and ask for help.
Yes. The SQL Server version doesn't have to match the operating system version, as it is for example with the IIS.
Yes.
What does the MS site for SQL Server 2005 say? (my bold)
SQL Server 2005 on Windows Server 2008
and Windows Vista
In an effort to provide customers with
more secure products, Microsoft
Windows Server 2008 and Microsoft
Windows Vista are supported by SQL
Server 2005 Express Edition Service
Pack 1 (SP1), and for all other
editions will be supported by SQL
Server 2005 Service Pack 2 (SP2) or
later when it becomes available.
Earlier versions of SQL Server,
including SQL Server 2000 (all
editions including Desktop Engine
edition, a.k.a MSDE), SQL Server 7.0,
and SQL Server 6.5, will not be
supported on Windows Server 2008 or
Windows Vista.

Programmatically detect SQL Server Edition

I'm using C# with SMO and attempting to detect what edition of SQL Server (e.g., enterprise, standard) I'm connecting to. I know how to get the version information, but that only tells me what version of SQL Server (e.g., SQL Server 2008 vs SQL Server 2005).
Does anyone know how to get the actual product edition (e.g., enterprise, standard)?
I need this information because some SQL Server features are only enterprise. Thus, I could just try to call them and catch the exception, but I'd much prefer an upfront detection.
Thanks!
SELECT SERVERPROPERTY('productversion'),
SERVERPROPERTY ('productlevel'),
SERVERPROPERTY ('edition')
on my system returns
9.00.1399.06, RTM, Express Edition
It seems this technique only works on SQL Server 2000 or later, if any of your databases are 7.0 or less, you'll have to use ##Version and manipulate the results as others have posted
It looks like you might be able to do it via SMO and the Server object. There are properties like Information.Edition which looks like it should do what you want.
I've always used ##Version (eg. SELECT ##Version and manipluted the result in code), but this article looks pretty handy;
http://support.microsoft.com/kb/321185
The only issue with using SERVERPROPERTY, as per the link... is that this won't work with older version of SQL Server.
select ##version
Returns version and which edition. Here:
Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86)
Nov 24 2008 13:01:59
Copyright (c) 1988-2005 Microsoft Corporation
Developer Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
Check the registry. This question had a good method you could adapt from the PowerShell script:
How do I check for the SQL Server Version using Powershell?