July 5, 2009 at 10:35 pm
Hi,
I have a script task in SSIS that connects to the database and reads from a table. This task used to run fine for more than a year till yesterday when it started failing with the following error message:-
/*****************Error Message*************/
Code: 0x00000000
Source: st_update_Load_Exec_Table
Description: BANCS_LOAD_EXEC_TABLE:Failed in ScriptMain => Void Main():The type initializer for 'System.Transactions.Diagnostics.DiagnosticTrace' threw an exception.
/****************************************/
The script fails while trying to open a connection to the database. A snippet of the code is as follows:-
/*****************************************/
Dim tableName As String = "BANCS_LOAD_EXEC_TABLE"
Dim chqQuery As String = Nothing
Dim oledbConn As OleDbConnection
Dim oledbselectDateCmd As OleDbCommand
Dim oledbDataReader As OleDbDataReader
Dim ODSConnectionString As String = "Provider=SQLOLEDB;Server=10.0.224.137;database=TEST_DB;User ID=username;Password=*******"
Dim i, cnt As Integer
oledbConn = New OleDbConnection(ODSConnectionString)
oledbConn.Open()
chqQuery = "SELECT BusinessDate,Status,LoadExecutionID FROM BANCS_LOAD_EXEC_TABLE WHERE LoadExecutionID = (SELECT MAX(LoadExecutionID) FROM BANCS_LOAD_EXEC_TABLE)"
MsgBox(oledbConn.ConnectionString.ToString)
oledbselectDateCmd = New OleDbCommand(chqQuery, oledbConn)
oledbselectDateCmd.CommandTimeout = 600
oledbDataReader = oledbselectDateCmd.ExecuteReader
oledbDataReader.Read()
If oledbDataReader.HasRows Then
MsgBox(oledbDataReader(0).ToString)
Else
MsgBox("No data")
End If
/*****************************************/
Please advise as a search on google or ssis forums for this error message did not provide us any definitive answers.
July 7, 2009 at 3:01 pm
July 7, 2009 at 3:41 pm
Hi cozyroc,
There is nothing special about that table. Just to prove this, I changed the query to "SELECT * FROM SYS.objects" and it still gave the same error.
Regards,
Prakyath
July 7, 2009 at 3:46 pm
July 7, 2009 at 3:51 pm
I am running the ETL on the server as a domain admin. The only error message that it posts is as follows:-
-----------------------------------------------------------------------------------------
The type initializer for 'System.Transactions.Diagnostics.DiagnosticTrace' threw an exception.
-----------------------------------------------------------------------------------------
The funny thing is when I try running the same ETL from my machine and connect to the database on the same server, I am able to do so with no issues.
July 7, 2009 at 3:54 pm
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply