我在SybaseIQ 15.4上使用命名管道执行大容量加载时遇到了问题。代码是C++并打开Windows。
在大容量的末尾,在刷新缓冲区(FlushFileBuffers)之后,当我试图断开命名管道(DisconnectNamedPipe)时,正在运行的LOAD TABLE query崩溃了一个"I/O Error on file \\.\pipe\pipename",尽管医生说:
"The pipe writer must call FlushFileBuffers( ) and then DisconnectNamedPipe( ). (If you do not, Sybase IQ reports an exception from hos io::Read( ).) This issues a PIPE_NOT_CONNECTED error, which notifies Sybase IQ that the pipe was shut down in an orderly manner rather than an uncontrolled disconnect"
请注意,如果删除DisconnectNamedPipe,则大容量加载是可以的。
这是代码的简历,谢谢你的帮助
hPipe = CreateNamedPipe(strPipeName, PIPE_ACCESS_OUTBOUND, PIPE_TYPE_BYTE, 255, 65536, 65536, 100, NULL);
ConnectNamedPipe(hPipe, NULL);
// in another thread: LOAD TABLE myTable (...) USING CLIENT FILE strPipeName ...
WriteFile(hPipe, ...);
FlushFileBuffers(hPipe);
DisconnectNamedPipe(hPipe); // I/O Error on file \\.\pipe\pipename
CloseHandle(hPipe);发布于 2012-10-26 09:19:50
是Sybase的智商缺陷。使用15.2或15.4的最后一个EBR,DisconnectNamedPipe工作正常
https://stackoverflow.com/questions/12373408
复制相似问题