"SSIS debug Host has stopped working" this was production issue I encountered couple of days back.  After lots of comments in my DLL  I was able to trace that it was XmlDocument.InnerXml
which was causing this problem.
 
  Following is error detail :
 
  Description:
  Stopped working
Problem signature:
  Problem Event Name:                          APPCRASH
  Application Name:                                 DtsDebugHost.exe
  Application Version:                              2009.100.1600.1
  Application Timestamp:                       4bb67978
  Fault Module Name:                             kernel32.dll
  Fault Module Version:                          6.0.6001.18215
  Fault Module Timestamp:                   4995354a
  Exception Code:                                     e053534f
  Exception Offset:                                   000000000002619d
  OS Version:                                            6.0.6001.2.1.0.274.10
  Locale ID:                                               1033
 
  If you get such type of error just check for XmlDocument.InnerXml.
  this is strange but i was not able to figure it out, what was actual
  reason which causes XmlDocument.InnerXml to APPCRASH.
Monday, December 6, 2010
Search anything in your data base with Sql search a red gate free tool
Red Gate has give free SQL search tool.SQL search is good tool for  searching part of word in table ,SP,view in almost all objects in MS  SQL.
Following is screen shot of search performed.

It also opens up the object found by just double clicking on it.

I found this tool use full you can try by downloading it from
http://www.red-gate.com/products/SQL_Search/
 
Following is screen shot of search performed.
It also opens up the object found by just double clicking on it.
I found this tool use full you can try by downloading it from
http://www.red-gate.com/products/SQL_Search/
Bulk insert by SqlBulkCopy
SqlBulkCopy is great option provided by microsoft to insert bulk records with flexibilty to define BatchSize and BulkCopyTimeout. I have used it ,it is really very fast as it does not write logs in database.
following is example for SqlBulkCopy.
private void BulkInsertData(DataSet objDS)
{
if (objDS != null)
{
if (objDS.Tables[0] != null)
{
DataTable sourceData = objDS.Tables[0];
using (SqlConnection destinationConnection = new SqlConnection(connectionString))
{
// open the connection
destinationConnection.Open();
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(destinationConnection.ConnectionString))
{
bulkCopy.BulkCopyTimeout = 0; //sets no time limits
bulkCopy.BatchSize = 5000;
// column mappings
bulkCopy.ColumnMappings.Add("A", "A");
bulkCopy.ColumnMappings.Add("B", "B");
bulkCopy.ColumnMappings.Add("C", "C");
bulkCopy.ColumnMappings.Add("D", "E");
                      
bulkCopy.DestinationTableName = "DestinationTableName";
bulkCopy.WriteToServer(sourceData);
}
}
sourceData.Clear();
sourceData.Dispose();
}
}
}
Map the columns required for bulk insert and provide data in datatable to function WriteToServer which will do work of bulk insert to MSSql table.
following is example for SqlBulkCopy.
private void BulkInsertData(DataSet objDS)
{
if (objDS != null)
{
if (objDS.Tables[0] != null)
{
DataTable sourceData = objDS.Tables[0];
using (SqlConnection destinationConnection = new SqlConnection(connectionString))
{
// open the connection
destinationConnection.Open();
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(destinationConnection.ConnectionString))
{
bulkCopy.BulkCopyTimeout = 0; //sets no time limits
bulkCopy.BatchSize = 5000;
// column mappings
bulkCopy.ColumnMappings.Add("A", "A");
bulkCopy.ColumnMappings.Add("B", "B");
bulkCopy.ColumnMappings.Add("C", "C");
bulkCopy.ColumnMappings.Add("D", "E");
bulkCopy.DestinationTableName = "DestinationTableName";
bulkCopy.WriteToServer(sourceData);
}
}
sourceData.Clear();
sourceData.Dispose();
}
}
}
Map the columns required for bulk insert and provide data in datatable to function WriteToServer which will do work of bulk insert to MSSql table.
Subscribe to:
Comments (Atom)
 
 
 
 Posts
Posts
 
