in reply to Re^3: speedup sqlserver insert
in thread speedup sqlserver insert

what should this look like to turn autocommit off?
$dbh = DBI->connect("dbi:ODBC:Driver={SQL Server};Server=xxxxx\\yyyy; +UID=$user;PWD=$password, { RaiseError => 1, AutoCommit => 0 } ") or die "\t\t\nCannot +connect to SQLServer... $!";

Replies are listed 'Best First'.
Re^5: speedup sqlserver insert
by Corion (Patriarch) on Sep 12, 2014 at 13:59 UTC

    Did you paste that connect string from your program or did you retype it?

    That connect string is highly dubious, because it includes some strings that should be Perl code if you follow the documentation of DBI.

    Update: Maybe you should follow the documentation of DBI closer:

    $dbh = DBI->connect($dsn, $user, $password, { RaiseError => 1, AutoCommit => 0 });

    If you take that piece of code, all that remains is to fill in the three variables $dsn, $user and $password:

    my $user='fionbarr'; my $password='secret'; my $dsn= '...'; $dbh = DBI->connect($dsn, $user, $password, { RaiseError => 1, AutoCommit => 0 });
      this is what I am currently using successfully:
      $dbh = DBI->connect( "dbi:ODBC:Driver={SQL Server};Server=xxx\\yyy;UID=$user;PWD=$password" ) or die "\t\t\nCannot connect to SQLServer... $!";

        So what you showed previously was not actual code but your interpretation of the documentation?

        If you get errors, please tell us that you get errors and also show us these errors instead of making us guess.

        As the next step forward, please use the example I took from the documentation and adapt it to your program.