We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Error while extracting from DbDataReader slowly using Vetica ADO.Net — Vertica Forum

Error while extracting from DbDataReader slowly using Vetica ADO.Net

I have no problem usually while retrieving data from vertica. But when I try to debug while extracting from DbDataReader or the reading process is slow, I found an error.
The slow process I'm doing is to extract data and save it into an ACCESS file ( speed @ 50 records per second).
When I extract data to text file there is no problem (speed @ 1000 records/ second)
 The error it self doesn't give any hint about what is happening:

Exception Type: Vertica.Data.VerticaClient.VerticaException

Exception Message: [0]  Int32 offset, Int32 size, SocketFlags socketFlags)   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.IO.BufferedStream.Flush()
   at Vertica.Data.Internal.IO.VStream.flush()
   at Vertica.Data.Internal.IO.ProtocolStream.Flush()

Inner Exception: Vertica.Data.Internal.DotNetDSI.DSIException

Inner Exception Message:  Int32 offset, Int32 size, SocketFlags socketFlags)   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   --- End of inner exception stack trace ---
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.IO.BufferedStream.Flush()
   at Vertica.Data.Internal.IO.VStream.flush()
   at Vertica.Data.Internal.IO.ProtocolStream.Flush()

looks like the underlying vertica network logic failed, but not sure.
---------------------------------------------------------------------------------------------------------------
Driver file: Vertica.Data.dll
Dll Version: 6.1.3.0
Description: Vertica ADO.NET Data Provider

----------------------------------------------------------------------------------------------------------------
Basically I have the following code (.Net 4.5):

 DbConnection connection = null;
try
{
 string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["vertica"].ConnectionString;          
 connection = new Vertica.Data.VerticaClient.VerticaConnection(connectionString);
DbCommand command = connection.CreateCommand();                            command.CommandText = singleQuery;
command.CommandTimeout = 600;      
DbDataReader reader = command.ExecuteReader();
while(reader.Read())
{
   <reading logic>//Error happens here
}
reder.Close();
command.Dispose();
connection.Close();
}
catch(Exception ex)
{

}

Comments

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file