Import MYSQL Dump

  • Daily I get an MySQL Dump in severeal UTF-8 Files (*.csv) and (*.sql).

    I strated to import the files with SSIS, but it costs a lot of time. I don't want to install an MySQL-Server.

    How can I import the files daily into an SQL-Server 2008R2 most easily?

  • Are the .csv file's just data or do they contain some DDL?

    SSIS would be the perfect solution for automating this task either way - this is what it was designed for.

    You could however create a batch/powershell script to use osql?

  • The .csv files contain only data like this:

    id|identifier|order|activity

    1|Not set|1|\N

    2|Business Unit|2.0010|1

    3|Rent|2.0020|2

    4|Trade|2.0040|4

    '\N' is NULL.

    DDL-Commands are in seperate .sql files like this:

    DROP TABLE IF EXISTS `activities`;

    /*!40101 SET @saved_cs_client = @@character_set_client */;

    /*!40101 SET character_set_client = utf8 */;

    CREATE TABLE `object_identifier_of_activities` (

    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,

    `identifier` varchar(50) NOT NULL,

    `order` varchar(50) NOT NULL,

    `activity` int(10) unsigned DEFAULT NULL,

    PRIMARY KEY (`id`),

    KEY `idx_activity` (`activity`),

    ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

    /*!40101 SET character_set_client = @saved_cs_client */;

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply