﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Teradata Database  / Insufficient memory when I perform a command / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Sat, 21 Nov 2009 14:36:28 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Insufficient memory when I perform a command</title><link>http://www.teradata.com/teradataforum/Topic16005-9-1.aspx</link><description>The DataAdapter.InsertCommand.CommandText must be a single-row parameterized query:   Insert Into Table1(Field1) Values (?)The DataTable, which serves as input parameter rows, must hold X rows. In your case 5000 rows. See: http://www.teradata.com/teradataforum/Topic11803-11-2.aspxNote I am not sure if DBS will accept 5000 rows in one query. There are other limits which govern how many rows can be send in one Query. .NET Data Provider will divide the Batch Update into one or more queries when UpdateBatchSize is set to 0. However it is very easy to experiment with different Batch Sizes.</description><pubDate>Mon, 06 Jul 2009 13:38:25 GMT</pubDate><dc:creator>NetFx</dc:creator></item><item><title>RE: Insufficient memory when I perform a command</title><link>http://www.teradata.com/teradataforum/Topic16005-9-1.aspx</link><description>Hi guys!Thanks for help me!I got the same problem (Insufficient memory) referencing my 5000 inserts to the DataAdpter's property InsertCommand.This is sheet of the programming:[b]DataSet dataSet = new DataSet();adapter.Fill(dataSet);//_sbComandos is a StringBuilder. It contains the 5000 insert commands splitted by ';'command.CommandText = _sbComandos.ToString();adapter.InsertCommand = (TdCommand)comando;adapter.InsertCommand.UpdatedRowSource = UpdateRowSource.None;dataSet.Tables[0].Rows.Add("0");adapter.UpdateBatchSize = 0;              adapter.Update(dataSet);[/b]What should I do to can use the 5000 insert in Update Batch Size?Or is there another solution?Thanks,Anderson</description><pubDate>Mon, 06 Jul 2009 09:20:37 GMT</pubDate><dc:creator>aolympio</dc:creator></item><item><title>RE: Insufficient memory when I perform a command</title><link>http://www.teradata.com/teradataforum/Topic16005-9-1.aspx</link><description>.NET Data Provider for Teradata supports batch updates.See documentation for DbDataAdapter.UpdateBatchSize in MSDN:  http://msdn.microsoft.com/en-us/library/aadf8fk2.aspx  http://msdn.microsoft.com/en-us/library/system.data.common.dbdataadapter.updatebatchsize.aspx</description><pubDate>Thu, 02 Jul 2009 14:00:13 GMT</pubDate><dc:creator>NetFx</dc:creator></item><item><title>RE: Insufficient memory when I perform a command</title><link>http://www.teradata.com/teradataforum/Topic16005-9-1.aspx</link><description>Hi Anderson,you're submitting a huge multi-statement request, too huge to parse it as a single block.- split it into several smaller batches- Or better check if iterated request are available for .NET and use that. In JDBC it's addbatch &amp; executebatch.Dieter</description><pubDate>Thu, 02 Jul 2009 13:52:20 GMT</pubDate><dc:creator>dnoeth</dc:creator></item><item><title>Insufficient memory when I perform a command</title><link>http://www.teradata.com/teradataforum/Topic16005-9-1.aspx</link><description>Hi guys!I'm facing the following problem:I need to run at about 5000 INSERT commands at the same time.I programmed it in C#/.Net:[b]command.CommandText = strInserts;command.ExecuteNonQuery();[/b]Into the variable string strInserts I have these values:[b]"INSERT INTO TABLE1(FILED1) VALUES(0);INSERT INTO TABLE1(FILED1) VALUES(1);...INSERT INTO TABLE1(FILED1) VALUES(4999);"[/b]When the command is performed, this error message appears:"[Teradata Database] [3710] Insufficient memory to parse this request, during Resolver phase."Please, what can I do to resolve this problem?Thanks for help,Anderson</description><pubDate>Thu, 02 Jul 2009 10:57:11 GMT</pubDate><dc:creator>aolympio</dc:creator></item></channel></rss>