Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Having some Problems Reading A SQL File to Import a Database

  1. #1

    Question Having some Problems Reading A SQL File to Import a Database

    Hello,

    I'm new here and I'm tying to read a SQL file with the SQL step in Job to import a database, but it seems to be unable to do so. I constantly get SQL errors. Do anyone know what is the problem?

    My SQL File:
    Code:
    -- phpMyAdmin SQL Dump-- version 3.5.3
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Apr 21, 2014 at 08:21 AM
    -- Server version: 5.5.29
    -- PHP Version: 5.4.11
    
    
    SET SQL_MODE = `NO_AUTO_VALUE_ON_ZERO`;
    SET time_zone = `+00:00`;
    
    
    
    
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;
    
    
    -- --------------------------------------------------------
    
    
    --
    -- Table structure for table `addressBook`
    --
    
    
    CREATE TABLE IF NOT EXISTS `addressBook` (
      `idAddressBook` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `idCustomer` int(10) unsigned DEFAULT NULL,
      `titleRecipient` varchar(255) NOT NULL,
      `firstName` varchar(32) NOT NULL,
      `lastName` varchar(32) NOT NULL,
      `email` varchar(255) NOT NULL,
      `phone` varchar(32) NOT NULL,
      `mobile` varchar(32) DEFAULT NULL,
      `address` text NOT NULL,
      `city` varchar(128) NOT NULL,
      `zipCode` varchar(16) NOT NULL,
      `idProvince` int(10) unsigned DEFAULT NULL,
      `idCountry` int(10) unsigned DEFAULT NULL,
      `createdDate` datetime NOT NULL,
      `modifiedDate` datetime NOT NULL,
      PRIMARY KEY (`idAddressBook`),
      KEY `idCustomer` (`idCustomer`,`idProvince`,`idCountry`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=44 ;
    The errors I'm having:
    Code:
    2014/04/25 16:08:54 - SQL - ERROR (version 5.0.4, build 1 from 2014-02-17_08-03-10 by buildguy) : An error occurred executing this job entry : 2014/04/25 16:08:54 - SQL - Couldn't execute SQL: SET SQL_MODE = `NO_AUTO_VALUE_ON_ZERO`
    2014/04/25 16:08:54 - SQL - 
    2014/04/25 16:08:54 - SQL - Syntax error in SQL statement "SET SQL_MODE[*] = ""NO_AUTO_VALUE_ON_ZERO"" "; expected "@, AUTOCOMMIT, MVCC, EXCLUSIVE, IGNORECASE, PASSWORD, SALT, MODE, COMPRESS_LOB, DATABASE, COLLATION, CLUSTER, DATABASE_EVENT_LISTENER, ALLOW_LITERALS, DEFAULT_TABLE_TYPE, CREATE, HSQLDB.DEFAULT_TABLE_TYPE, PAGE_STORE, CACHE_TYPE, FILE_LOCK, DB_CLOSE_ON_EXIT, AUTO_SERVER, AUTO_RECONNECT, ASSERT, ACCESS_MODE_DATA, OPEN_NEW, RECOVER, SCHEMA, DATESTYLE, SEARCH_PATH, SCHEMA_SEARCH_PATH, LOGSIZE"; SQL statement:
    2014/04/25 16:08:54 - SQL - SET SQL_MODE = `NO_AUTO_VALUE_ON_ZERO` [42001-131]

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Your SQL job entry is connected to a MySQL server, that doesn't like a SQL_MODE enclosed in backticks.
    Try a suitable compatibility setting when exporting with PhpMyAdmin.
    So long, and thanks for all the fish.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.