I'm using SQL Server 2012 (localhost only) and SQL Server management Studio (SSMS) to view a table picture that contains binary values (pictures), 928 rows in size which is not large. And only that table has the problem.
It shows the below error, both locally and from another PC, even after restarting SQL Server:
Msg 233, Level 20, State 0, Line 0
A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
I would start by checking the consistency of your data. Run a DBCC CheckDB against your DB. You may have corruption in the table. You can also try selecting against msdb.dbo.suspect_pages
To comment on the accepted answer, running DBCC CheckDB highlighted various errors in the table I couldn't select from. Then DBCC CheckTable(TableName) confirmed it. To fix:
DBCC CheckTable(TableName,repair_allow_data_loss)
However, you'll need the database in Single User mode: right click the database in Object Explorer, Properties, Options, (scroll to bottom), State, Restrict Access -> SINGLE_USER will do this.
It is clearly stating transport level error.... SO in protocols for the same instance check whether 'Named pipes' is enabled or disabled... if Disabled , enable it and restart the services, issue will be resolved. If enabled , restart the services as it does not take into effect until and unless services are restarted
Make sure your firewall is not blocking the Distributed Transaction Coordinator(in and Out)
I've seen this error today while I was running my SP.
I was able to figure out by analyzing what has changed.
I added an insert statement and the reason for above hard error was because I accidentally switch two fields: VARCHAR and DATETIME, like this:
INSERT INTO Table
(Id, UserName, UpdatedOn)
VALUES (1, GETDATE(), 'user')
-- values should have been in 1, 3, 2 order
I'd imagine SQL server should have catch this in a nicer manner, but end up with
A transport-level error has occurred when receiving results from the
server. (provider: Shared Memory Provider, error: 0 - No process is on
the other end of the pipe.)
Anyway, posting as someone may find it helpful.
Related
I recently managed to lock up our SQL Server database with a query like this (simplified for clarity):
SELECT *, NULL AS extraColmn
INTO #tempTable
FROM sourceTable
IF ##ROWCOUNT > 0
BEGIN
BEGIN TRANSACTION;
DELETE FROM sourceTable
INSERT INTO sourceTable
SELECT * FROM #tempTable;
COMMIT TRANSACTION;
DROP TABLE #tempTable
END
There are two obvious problems with this. First, the INSERT/SELECT statement should have the columns explicitly listed. Second, when doing that INSERT, the source and destination tables had a different number of columns. As expected, this caused an error:
Msg 213, Level 16, State 1, Line 1
Column name or number of supplied values does not match table definition.
And the query simply failed on our production server.
But strangely, when I ran this same query in SQL Server Management Studio, it gave that error, but then locked up the entire database, to the point where I had to restart the database server.
Why? Is it the transaction? I'm a newbie at those, but I understood that if an error is encountered in a transaction, it's simply rolled backāthat's the point. (Note that sourceTable is fairly heavily used on this site, so there would probably have been a few concurrent attempts to access it while this was running.)
Why would this only occur in SQL Server Management Studio?
IIRC, the default settings in SSMS mean that an error will cause the rest of the batch (until the next GO or the end of the commands) to be skipped. So the transaction would still be open and bound to your SSMS window's session. So if you don't either close the session window or else explicitly rollback the transaction in that window, it will stay open until you do (or you restart the server).
This is what I assume happened to you. The simple fix is normally to just disconnect or close the SSMS session window where the error was thrown. Alternatively you can manually execute a ROLLBACK command in that session so that you don't lose the window or have to re-connect.
A client program receiving this error will usually end up closing the connection (either through error-handling or because it crashes), thus ending the session and it's transaction.
Our customer faces an issue with a corrupted database caused by a 3rd party software. Unfortunatelly they found out too late and no longer have a valid backup to return to. Fixing views etc. is easy but there are couple tables that are unaccessible and contain important data.
When trying to select data from corrupted tables I receive this error:
SQL Server detected a logical consistency-based I/O error: incorrect
pageid (expected 1:7733; actual 114:7667823). It occurred during a
read of page (1:7733) in database ID 5 at offset 0x00000003c6a000 in
file 'C:\Program Files\Microsoft SQL
Server\MSSQL10_50.SQL2008\MSSQL\DATA\aspe_bad1.MDF'. Additional
messages in the SQL Server error log or system event log may provide
more detail. This is a severe error condition that threatens database
integrity and must be corrected immediately. Complete a full database
consistency check (DBCC CHECKDB). This error can be caused by many
factors; for more information, see SQL Server Books Online.
Running DBCC CHECKDB gives this error
Check terminated. A failure was detected while collecting facts. Possibly tempdb out of space or a
system table is inconsistent. Check previous errors.
Running DBCC CHECKTABLE gives the same error as select does.
When running DBCC PAGE I get Metadata: ObjectId = 0, meaning:
If you see the ObjectId is 0, that means there was no metadata found.
This could be because:
The table that the page was part of has been deleted since the page corruption was logged
The system catalogs are corrupt in some way
The page is corrupt and so incorrect values were used to look up the metadata
Checking SQL Server Logs contains only 1 different error and that is:
SQL Server detected a logical consistency-based I/O error: unable to
decrypt page due to missing DEK. Itoccurred during a read of page
(1:7727) in database ID 5 at offset 0x00000003c5e000 in file
'C:\Program Files\Microsoft SQL
Server\MSSQL10_50.SQL2008\MSSQL\DATA\aspe_bad1.MDF'. Additional
messages in the SQL Server error log or system event log may provide
more detail. This is a severe error condition that threatens database
integrity and must be corrected immediately. Complete a full database
consistency check (DBCC CHECKDB). This error can be caused by many
factors; for more information, see SQL Server Books Online.
Honestly I'm at my wits end. Can anyone help me fix this issue? Is it even possible to repair to at least some extent?
Thanks,
Z
My linked server was fine until now and i was selecting data using some join statement for filtering the but suddenly its returning following error. i cannot execute any query against my linked server.
Linked server is still available as i tried a TEST CONNECTION from server object and it was successful
Msg 65535, Level 16,State 1, Line 0
Sql Server Interface:Error Loading Server/Instance Specified
(xfffffff)
oledb provider sqlnc111 for linked server "MSNAC/MSDB5" returned an
error " A login time out expired
A network-related or instance-specific error has occurred while
establishing a connection to SQL Server. Server is not found or not
accessible. Check if instance name is correct and if SQL Server is
configured to allow remote connections. For more information see SQL
Server Books Online.
How to solve this issue ?
If nobody has made any configuration changes, your queries may be timing out because of a big data change. Try to, at least temporarily, set the following option:
USE Yourdatabase;
GO
EXEC sp_configure 'remote query timeout', 0;
GO
RECONFIGURE;
GO
If it goes fine with these settings, your queries were simply timing out because of the set limit. Experiment a bit with your queries, see what is an appropriate limit to put in this properties (leaving it to infinity isn't a good idea) and reconfigure once again.
NOTE: the number is in seconds.
To read up more on this issue, check the documentation for remote query timeout.
My server is shutting down because the electrical. And when I opened my database in SSMS, database is recovery pending.
I checked my ERROR LOG, the message are :
4 transactions rolled forward in database 'POSDW' (14:0). This is an
informational message only. No user action is required.
restoreHkDatabase: DbId 14, Msg 41313, Level 16, State 1, The C
compiler encountered a failure. The exit code was 2.
[ERROR] Database ID: [14] 'POSDW'. Failed to load XTP checkpoint.
Error code: 0x82000009.
(d:\sql12_main_t\sql\ntdbms\hekaton\sqlhost\sqlmin\hkhostdb.cpp : 3126
- 'RecoverHkDatabase') Error: 41313, Severity: 16, State: 1.
I already tried to take offline but when I bring online I get error.
Can you guys help me.
Thanks
It looks like corruption. You can try one of the following options:
Restore from existing backup
Try enter the database into emergency mode and run DBCC CHECKDB. according to the results you can see if you can restore the pages from existing backup (in some cases) or run DBCC CHECKDB .
If you have functional replica of the data take the data from there.
Hope this helps.
You were able to move the database files while they were in "Recovery Pending" mode because that status means SQL couldn't open the database files for some reason. It also means it couldn't lock the files as well.
Setting a database to "offline" is similar because it unlocks the underlying files (that's why you can move database files while it's offline).
I'm pretty sure that if you'd try setting all these databases to "online" you'd get the error message you talk about or something similar.
ALTER DATABASE MyDB SET ONLINE
You can use the above statement to try and activate databases that are "offline" or are in "Recovery Pending" mode. If there's some kind of problem, SQL Server will let you know at that moment.
You can also read this thread: How to fix Recovery Pending State in SQL Server Database?
Ok, so I am trying to create a procedure that call an extended procedure. I am getting the following error:
Msg 121, Level 20, State 0, Line 0
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)
Even with the simplest test I get that error:
CREATE PROCEDURE Test
AS
BEGIN
EXEC xp_cmdshell 'dir *.exe'
END
However if I just run xp_cmdshell 'dir *.exe' by itself it works.
This is running on a clustered SQL 2005 server. Any help is appreciated.
Are you getting the error when you CREATE the procedure or when you EXECUTE it?
If you get it when you execute it, then there could be some issue with permissions. Since in later versions of sql server calling xp_cmdshell is tightly locked down and by default not enabled in the surface area configuration, I could see a potential for this.
How are you calling the SP? If you're using dynamic SQL, then know that it executes with the privileges of the caller, not the SP creator.
Do you need to prefix the SP with master as in master.dbo.xp_cmdshell?
Have you tried EXECUTE AS either in the SP creation or in the SP execution?
Also, in my experience, transport-level errors are sometimes not due to a problem with the server but a problem with the client caching its connection object past the time when the server has dropped it (thus invalidating the connection object). Given that you're presumably running this within just a short time of initially connecting, it doesn't sound like that is the exact problem, but could you be having some kind of proxy/firewall/net filter issue that is dropping packets because of detecting certain keywords in the packets? I know this is a long shot but I had to ask...