In the event log we get the error
The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. If you believe you have received this message in error, contact Customer Support Services for more information.
Its a Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)
Apr 2 2010 15:48:46
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: ) (Hypervisor)
I need to catch what is causing the problem. It's the only option to set up a sql server trace to get the errors? Or are the any startup parameters to the server that i can use? Or alternative method. That not effects the servers performance or need a restart of the server.
We solved it checking the event log on all calling application servers for the error. After that we find the system that was causing the error and contacted the vendor of the problem.
Related
I have a sql server instance on a machine that I want to open up to being accessible over the network. However, I think there's multiple issues at play here and I'm not sure which one is the real contributing factor.
The version I'm using is:
select ##version
Microsoft SQL Server 2014 - 12.0.2269.0 (X64) Jun 10 2015 03:35:45 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 (Build 14393: )
I believe I need to enable network configuration in the SQL Server Configuration Manager, but when I look into my manager, I don't see anything of use:
Is there anything that clearly leaps out as to why this would be blank? Am I going about this the right way?
Re-install SQL Server and/or OS as necessary.
See similar questions here and here. What version is your OS? This is possibly an architecture mismatch - 64-bit SQL on 32-bit machine? Or version mismatch. SQL Enterprise installed on Windows Home edition?
Yes, you may be able to troubleshoot and fix, but SQL installs do some heavy lifting. The best and most thorough solution here is clean up and start fresh. It will provide you peace of mind.
We had a recent release in which we deployed ~100 Stored Procedures and we started getting available worker thread low alert for the past couple days(almost 100% of the threads are being used). Is there a way to debug this further and find root cause for the same? I would really appreciate any insight on this.
Version:
Microsoft SQL Server 2008 R2 (SP3) - 10.50.6000.34 (X64)
The error message is,
(In dialog box:)
This program has compatibility issues
Microsoft SQL server(2008 and 2008R2)
Microsoft
you can get help online and see more information about this program's compatibility issues.
SQL Server 2008 is supported on Windows 8/Windows Server 2012 but
requires a minimum of Service Pack 3.
Select Run this program (ignore the warning) and then install SQL Server 2008 SP3 http://www.microsoft.com/en-us/download/details.aspx?id=27594.
See http://blogs.msdn.com/b/psssql/archive/2012/09/01/installing-sql-server-on-windows-8.aspx
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.
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?