Feed on
Posts
Comments

Archive for the ‘SQL Error Messages’ Category

I have received following question nearly 10 times in last week though emails. Many users have received following error while connecting to the database. This error happens when database is dropped for which is default for some of the database user. When user try to login and their default database is dropped following error shows [...]

Read Full Post »

Recently I have got two desktop computers at home and both of them are very powerful machine.
Machine 1 : Windows Vista SP1 with SQL Server 2008
Machine 2 : Windows 2003 with SQL Server 2005 with SP2
When I was trying to connect from SQL Server 2008 to SQL Server 2005 using Windows Authentication I was getting [...]

Read Full Post »

I have seen developer confused many times when they receive following error message.
Msg 325, Level 15, State 1, Line 7
Incorrect syntax near . You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the stored procedure sp_dbcmptlevel.
The reason for this error is [...]

Read Full Post »

While attending conference SQLAuthority Author Visit - Microsoft Student Partner Conference, some developers informed me that SQL SERVER 2008 cannot be connected to Visual Studio 2008 and error displays as MS does not support SQL Server version. I was surprised initially as I could not believe that two MS products are not compatible. When trying myself [...]

Read Full Post »

Download SQL Server 2008 Interview Questions and Answers Complete List
Interview is very important event for any person. A good interview leads to good career if candidate is willing to learn. I always enjoy interview questions and answers series. This is my very humble attempt to write SQL Server 2008 interview questions and answers. SQL Server [...]

Read Full Post »

SQL SERVER - 2008 - Interview Questions and Answers Complete List Download
How can we rewrite sub-queries into simple select statements or with joins?
Yes we can write using Common Table Expression (CTE). A Common Table Expression (CTE) is an expression that can be thought of as a temporary result set which is defined within the execution [...]

Read Full Post »

If Microsoft Office SharePoint Server (MOSS) and your database (MS SQL Server) are running together on same physical server, changing the name of the server (computer) using operating system may create non-functional SharePoint website.
When you change the physical server name the SharePoint is already connected to the SQL instance of old computer name (OldServerName/SQLInstance) and [...]

Read Full Post »

This is a very common error faced by so many people and I get lots of questions regarding this error. This error occurs due to many reasons and I have already posted few solutions on this error, see if you can find your solution here
SQL SERVER - Fix : Error : 40 - could [...]

Read Full Post »

Everyday I get lots of question regarding error :
An error has occurred while establishing a connection to the server when connecting to SQL server 2005, this failure may be caused by the fact that under default settings SQL server does not allow remote connection. ( provider: Named Pipes Provider, error: 40 - could not open [...]

Read Full Post »

Loyal reader of this blog and “Great SQL Expert” Imran Mohammed always have good attitude towards any problem. Many times his answers very interesting to read and details are very accurate. I came across his two interesting comment on this blog and I would like to share this all of you.
Priyank asked following question.
Can u [...]

Read Full Post »

If you are receiving following error:
TITLE: Connect to Server
——————————
Cannot connect to Database Server.
——————————
ADDITIONAL INFORMATION:
An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: [...]

Read Full Post »

ERROR : 9004 An error occurred while processing the log for database.
If possible, restore from backup.
If a backup is not available, it might be necessary to rebuild the log.
If you receive above error it means you are in great trouble. This error occurs when database is attempted to attach and it does not get attached. [...]

Read Full Post »

If you face following error the solution of this is very simple.
Error : 9692 The _MSG protocol transport cannot listen on port because it is in use by another process.
Above error comes up with Service Broker. Service Broker is used to send Database Emails. Read more about SQL SERVER - Introduction to Service Broker.
Solution/Fix/WorkAround:
Option 1:
Run [...]

Read Full Post »

Few days ago, one of our application was crashing IIS application pool because of unhandled exception. After researched we figured out the case of it was orphaned MS DTC transaction.
When multiple connections are operating over one MS DTC transaction, this problem sometime shows up. As many connection are working none of them try to roll [...]

Read Full Post »

Following email is received from SQL Server Expert Roy Cheung. He faced issue of creating and running distributed queries from a 64-bit SQL Server 2005 client to a linked 32-bit SQL Server 2000 server. He has found solution and would like to share with SQLAuthority Blog Readers.

Hi Pinal,
Recently, I’ve a problem on create and [...]

Read Full Post »

Following error is very generic error and I have previously written SQL SERVER - FIX : Error : 3702 Cannot drop database because it is currently in use.
Msg 3702, Level 16, State 3, Line 2
Cannot drop database “DataBaseName” because it is currently in use.
One of the reader Dave have posted additional information in comments. [...]

Read Full Post »

I am very pleased to write my 500th post. After 500 posts, I still have same feeling when I wrote first post on this blog. I would like to thank my family for their continuous support in writing this blog. Most of all I want to thank all of YOU for being wonderful readers of [...]

Read Full Post »

One of my friend sent me query asking me how to generate dynamic case statements in SQL. Everytime he tries to run following query he is getting Error 156 : Incorrect syntax near the keyword. He was frustrated with following two queries. There are two different ways to solve the problem when user want to
Incorrect [...]

Read Full Post »

In SQL Server 2005 while testing Indexes I had created a table with one non clustered index only. I did not create any clustered index on table. After that I ran SELECT statement, it gave me following error. I was very surprised when I looked at error. It says Msg 0, what it means is [...]

Read Full Post »

Jr. Developer asked me other day how to escape single quote?
User can escape single quote using two single quotes (NOT double quote).
Following T-SQL Script will give error
USE AdventureWorks
GO
SELECT *
FROM Person.Address
WHERE City = ‘Villeneuve-d’Ascq’
GO
Resultset:
Error: 105 Unclosed quotation mark after the character string ‘
To fix the error mentioned above, escape single quotes with two single quotes [...]

Read Full Post »

Older Posts »