Bug 32481: Limit prefetch size for background jobs worker
[koha.git] / misc / exportauth.pl
1 #!/usr/bin/perl
2 ## This script allows you to export a rel_2_2 bibliographic db in 
3 #MARC21 format from the command line.
4 #
5
6 use strict;
7 #use warnings; FIXME - Bug 2505
8
9 use Koha::Script;
10 use C4::Context;
11 use C4::Auth;
12 my $outfile = $ARGV[0];
13 open(my $fh, '>', $outfile) or die $!;
14 my $dbh=C4::Context->dbh;
15 #$dbh->do("set character_set_client='latin5'"); 
16 $dbh->do("set character_set_connection='utf8'");
17 #$dbh->do("set character_set_results='latin5'");        
18 my $sth=$dbh->prepare("select marc from auth_header order by authid");
19 $sth->execute();
20 while (my ($marc) = $sth->fetchrow) {
21     print $fh $marc;
22  }
23 close($fh);