Thursday, 29 May 2014

Writing to a MySQL database from SQL server using SSIS

I was unable to use the ADO.NET destination to insert data into my mysql database.

For the ADO.NET Destination to work properly, the MySQL database needs to have the ANSI_QUOTES SQL_MODE option enabled. This option can be enabled globally, or for a particular session. To enable it for a single session:
  1. Create an ADO.NET Connection Manager which uses the ODBC driver
  2. Set the connection manager’s RetainSameConnection property to True
  3. Add an Execute SQL Task before your data flow to set the SQL_MODE – Ex. set sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,ANSI_QUOTES'
  4. Make sure that your Execute SQL Task and your ADO.NET Destination are using the same connection manager.
Setting the RetainSameConnection property to True will ensure that your Execute SQL Task and ADO.NET Destination are in the same session.

1 comment:

  1. Excellent demonstration of linear regression using SGD in Spark! Your approach of filtering out header rows, creating LabeledPoint objects, and training the model with 100 iterations is very methodical. The evaluation with MSE and accuracy thresholds (within ±20%) shows how to think about model performance practically. For data scientists looking to advance their careers, I've been researching Gen AI and Agentic AI certification cost in Electronic City 2026 to understand the market value of AI skills. Your note about continuing iterations until convergence is a key insight—model training is often about iterative improvement. The live data prediction example at the end ties everything together nicely!

    ReplyDelete