How to create MARC records from ISBNs and import into Koha using MarcEdit

How to create MARC records from ISBNs and import into Koha using MarcEdit

  1. Download and install MarcEdit from http://marcedit.reeset.net
  2. Compile the list of ISBNs for which you want MARC records in a text file, one ISBN per line (you can also use book titles, author etc. but ISBN is the one best able to give you an exact match

  3. Open MarcEdit and open the Z39.50/SRU Client tool


  4. Select Batch Search and open the text file (.txt) with the ISBNs from the step above. Make sure the search parameter is set to ISBN.


  5. Select the database from which you want to download the MARC records. I recommend using U.S. Library of Congress (UTF 8) but you can use any one, or add your own if you have the database credentials).

  6. Click the green arrow to start the download. You will be prompted to save the MARC file
  7. The script will start running and query the chosen database for MARC records matching the ISBNs. For each match, a response will be returned stating “1 records found in database…”. If no record is found, the response will state “0 records found in database”. In this example, 7 out of the 10 ISBNs were matched and the MARC records downloaded to the file you created in the step above. If you are not satisfied with the success rate, change the database and try again.


  8. Open the MARC file in which the results were saved. Select the default character encoding (usually either MARC-8 or UTF8). Check the “Translate to UTF8” option. Then click “Execute” and then “Edit Records”


  9. To import the MARC records into Koha correctly, you will need to add at least two additional fields and related subfields, namely:
    1. 942$c (bibliographic item type) and
    2. 952
      1. Subfield $a (branch code for the home branch),
      2. Subfield $b (branch code for the holding branch),
      3. Subfield $y (Koha item type),
      4. Subfield $p (Koha item barcode), and
      5. Subfield $o (Classification number – in this tutorial, we will simply copy the classification number from field 082$a. More editing will need to be done after import to insert the full call number)
  10. To make it easier, sort the fields by going to Tools > Sort by > Sort fields within the record by > Sort All Fields
  11. Add field 942$c first. Go to Tools > Add/Delete Field. “BK” represents the Koha Item type (in this case BK stands for Books/Workbooks/Booklets. Make sure this matches the item type of your particular set of MARC records. If you are working on different item types, it is better to group them (in step 2 preferrably) and compile the MARC records in batches.
  12. Close the Add/Delete Field dialogue
    1. Under field/sub-field, enter a random number (one that will not be confused with any of the existing fields. In this case, I used 999 because I’m pretty sure it doesn’t conflict with any existing records. And it must have 3 characters. We are going to delete this field eventually, so don’t worry!).
    2. For number prefix, put a prefix that matches the one you will be using for all your other records, including ones which you are going to create directly in Koha.
    3. If this is your first batch, it’s safe to put “1” as your Start Digit. Otherwise, make sure you continue your existing bar-code sequence.
    4. Make sure your Digit Length also matches all your existing bar-codes.
    5. Select the first 3 options (Always insert, Insert in new records, Generate in current file).
    6. Click OK. All your records should now have field 999$a with bar-codes in the format {prefix}{xxxx} (if you chose to use a prefix that is. In this tutorial, it looks like this: KOHA0003).

  13. Next, you want to create bar-codes for the records and place them in field 952 (under sub-field “p”). Go to Tools > Generate Control Numbers.
  14. Next, you want to add field 952. This has more subfields, and in this example, we are only going to add 5 (you can add more should you need to – please refer to this article for more info https://wiki.koha-community.org/wiki/Holdings_data_fields_(9xx)). In this tutorial, the home branch code is KOHA, the holding branch code is KOHA, the Koha item type is BK, the barcode is in the format KOHAxxxx, and the call number will be copied from field 082$a.
  15. Go to Tools > Build New Field and enter the following in the “Pattern” field – =952 \\$aKOHA$bKOHA$yBK$o{082$a}$p{999$a} (remember to replace the variables in the subfields with your own branch specific data). Click process and close the dialogue box.


  16. All your records should now have a field 952 populated with subfield data.


  17. Now you can delete the arbitrary field 999 created earlier. Go to Tools > Add/Delete Field. Input 999 under “Field” and click “Delete Field”. Close the dialogue


  18. Compile the records into MARC records. Go to File > Compile File into MARC. Choose a location in which to save the .mrc file and enter the file name. Under “Save as type”, select UTF8-MARC file (unless you are using another format).
  19. Open your Koha admin page and go to Tools >Catalog > Stage MARC records for import
  20. Choose the file you save in the step above and click “Upload file”
  21. On the next page, select the options you want. If you are not sure what to choose, leave everything as default. It’s a good idea to fill in the “Comments about this file” section – use concise but adequate description that will help you to identify the sort of MARC records being staged for future reference.
  22. Click “Stage for import” then, on the next page, click “Manage staged records”
  23. Select the correct framework for the new records and click “Import this batch into the catalog”
  24. You have successfully created MARC records using ISBNs and MarcEdit!

Installing Koha – Local vs. Cloud-based setup

Koha: Local vs. Cloud-based Setup

So, you’ve decided that Koha Integrated Library System is the best software for your library. The next logical question you should ask is, “what’s the best way to implement it?”. There are two ways to setup Koha, either locally on a server/computer that is physically located somewhere at your premises, or on a cloud-based environment (either your own, or via a Koha hosting company such as BiblioTech Libraries). There are pros and cons to both approaches, and in this article, we will list some of the major ones.

Local, self-hosted Koha setup: Pros and Cons

Pros

  • Fewer on-going costs –  You generally only need to purchase/upgrade hardware once every few years
  • Faster system access over a LAN – cloud-based installations necessarily require a fast and reliable connection to the internet. If your LAN is setup properly, access to your system will generally be faster

Cons

  • High setup costs – you will need to purchase or acquire new, dedicated (highly recommended) hardware and possibly reconfigure your LAN. You will also need to find space for the server(s)
  • Costs accumulate overtime – hardware will eventually need to be replaced or upgraded. This cost may be very high in the event of a catastrophe, such as theft/physical, fire or water damage
  • Low Reliability – your system is subject to power-outages, internet cuts and of-course, hardware failure.
  • Time cost – Your server hardware will require regular maintenance and upgrades, which will prove costly
  • Data loss is a constant danger– even with regular backups, if your server packs up (or is stolen or damaged), you will need to reinstall and reconfigure your base (Linux) system and Koha environment, which will result in days/weeks/months of downtime, depending on how quickly you can secure a replacement.
  • No remote access – unless you have a dedicated IP/remote access software that allows for your system to be accessed off-site, you will likely need to be physically present at your server in order to do any problem-solving or regular maintenance. If you have outside technical support, this may take a fairly long time. A cloud-server on the other hand, allows you to access your system at any time, from anywhere
  • Limited access to your software – locally installed systems generally only allow for access if you are connected to the LAN network. This means your students/patrons will only be able to access your library resources when they are physically on the premises. This will hamper your patrons’ learning experience.

Cloud-based Koha setup: Pros and Cons

Pros

  • Generally costs less to setup – no new hardware is required since you will be using your hosting companies servers, and hosting is often very cheap.
  • Offers Best, fastest hardware – cloud-hosting companies will make sure that you have the best hardware (RAM, processors, storage such as fast Solid State Drives) available.
  • Easy hardware upgrades – with cloud-servers, increasing your RAM, storage and computing power is very easy. It literally takes the click of a button.
  • Great Up-time, High reliability – most cloud server providers offer up-time guarantees of over 99.99%, which means your system will always be online and ready to be accessed
  • Rapid resolution to tech issues – even if you are not on your school or library premises, if anything goes wrong, you can access your cloud server at any time from anywhere as long as you have access to the internet. If you are using external support, such as BiblioTech Libraries, their technicians can do maintenance and updates during the “graveyard” hours, which will result in far less downtime.
  • Plug and play – you will not need to make any changes to your LAN network to accommodate a new server(s). All you need is an internet connection to access your Koha system on the cloud-server from any device and from anywhere.
  • Remote, global access to your Koha system – your patrons can access your library’s resources from anywhere, at any time via the internet. This will make your library a far more attractive, exciting and useful learning experience.
  • Easy backups – many cloud-hosting providers come with easy backup solutions, including entire system image backups and multiple geo-redundant servers.

Cons

  • Ongoing costs – you will have to pay a monthly/yearly subscription to the hosting provider, although even this will turn out to be cheaper when you factor in hardware and time costs
  • Security – because your Koha system is accessible via the internet, you are more susceptible to hacking/data leaks. Measures such as firewalls, port security etc. are crucial
  • Internet access is required – unlike the local system which is access via the LAN network, you need a reliable internet connection to access your cloud-based Koha system. Koha, however, comes with a number of offline tools that will help you to continue functioning if your internet connection goes down.
Z39.50 Search Fails On Koha 17 – Separate Application and Database Server [Solved]

Z39.50 Search Fails On Koha 17 – Separate Application and Database Server [Solved]

Background

I’m testing out a new setup for my Koha installations – using separate servers for the applications and the databases. After a lot of headbutting, i finally got it working – until i tried to copy catalogue using the z39.50 search.

(Btw, running Koha 17.05.03.000 on Ubuntu 16.04LTS 64Bit, my application server is running MySQL Ver 14.14 Distrib 5.7.19, and my database server is running MariaDB Ver 15.1 Distrib 10.2.8-MariaDB)

All my z3950 searches were returning empty results.

I added new targets (the default ones are Columbia and Library of Congress), but the error kept recurring. When i checked the error logs, here’s what came up

sudo nano /var/log/koha/sample/intranet-error.log 

[Mon Sep 25 17:15:20.857869 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:                                                          record_type, encoding, z3950random): /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode=

[Mon Sep 25 17:15:20.858260 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:                                     VALUES (?, ?, ?, ?, ?, ?, ?)" with ParamValues: 0='1', 1=36, 2="00593nam a22001935a 4500001000600000005001700006008004100023035002100064906004500085955002600130010001700156040001300173050002400186245004800210250002800258260008100286300002500367922000700392\x1e31484\x1e19900511111633.2\x1e900511s1989    mnu           000 0 eng  \x1e  \x1f9(DLC)   90154590\x1e  \x1fa7\x1fbibc\x1fcorignew\x1fd2\x1fencip\x1ff19\x1fgy-gencatlg\x1e  \x1faby34 to bc00 05-11-90\x1e  \x1fa   90154590 \x1e  \x1faDLC\x1fcDLC\x1e00\x1faIN PROCESS (ONLINE)\x1e00\x1faGuide to criminal law & procedure research.\x1e  \x1faWESTLAW law student ed.\x1e  \x1faSt. Paul, MN (P.O. Box 64526, St. Paul 55164-1003) :\x1fbWest Pub. Co.,\x1fcc1989.\x1e  \x1faiii, 20 p. ;\x1fc28 cm.\x1e  \x1faco\x1e\x1d", 3="<?xml version="1.0" encoding="UTF-8"?>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode=

[Mon Sep 25 17:15:20.858373 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl: <collection: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.858488 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215:

[Mon Sep 25 17:15:20 2017] z3950_search.pl:   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance": /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode=

[Mon Sep 25 17:15:20.858638 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:   xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd": /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.858747 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215:

[Mon Sep 25 17:15:20 2017] z3950_search.pl:   xmlns="http://www.loc.gov/MARC21/slim">: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.858838 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl: : /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.858931 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215:

[Mon Sep 25 17:15:20 2017] z3950_search.pl: <record>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.859060 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:   <leader>00593nam a22001935a 4500</leader>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.859167 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215:

[Mon Sep 25 17:15:20 2017] z3950_search.pl:   <controlfield tag="001">31484</controlfield>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.859284 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:   <controlfield tag="005">19900511111633.2</controlfield>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode=

[Mon Sep 25 17:15:20.859471 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:   <controlfield tag="008">900511s1989    mnu           000 0 eng  </controlfield>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.859608 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:   <datafield tag="035" ind1=" " ind2=" ">: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode=

[Mon Sep 25 17:15:20.859718 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:     <subfield code="9">(DLC)   90154590</subfield>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.859816 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:   </datafield>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.859930 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215:

[Mon Sep 25 17:15:20 2017] z3950_search.pl:   <datafield tag="906" ind1=" " ind2=" ">: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.860034 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:     <subfield code="a">7</subfield>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode=

[Mon Sep 25 17:15:20.860138 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:     <subfield code="b">ibc</subfield>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.860243 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:     <subfield code="c">orignew</subfield>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.860346 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215:

[Mon Sep 25 17:15:20 2017] z3950_search.pl:     <subfield code="d">2</subfield>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.860450 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:     <subfield code="e">ncip</subfield>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode=

[Mon Sep 25 17:15:20.860553 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:     <subfield code="f">19</subfield>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.860658 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:     <subfield code="g">y-gencatlg</subfield>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.860753 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215:

[Mon Sep 25 17:15:20 2017] z3950_search.pl:   </datafield>: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.860858 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:   <datafield tag="955" ind1=" " ind2=" ">: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.860983 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl:     <subfiel...", 4='biblio', 5='UTF-8', 6=0] at /usr/share/koha/lib/C4/ImportBatch.pm line 1568.: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode= [Mon Sep 25 17:15:20.862919 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215:

[Mon Sep 25 17:15:20 2017] z3950_search.pl: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_sample`.`import_biblios`, CONSTRAINT `import_biblios_ibfk_1` FOREIGN KEY (`import_record_id`) REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE) [for Statement "INSERT INTO import_biblios (import_record_id, title, author, isbn, issn) VALUES (?, ?, ?, ?, ?)" with ParamValues: 0='0', 1="Guide to criminal law & procedure research.", 2=undef, 3=undef, 4=undef] at /usr/share/koha/lib/C4/ImportBatch.pm line 1607.: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode=

[Mon Sep 25 17:15:20.950248 2017] [cgi:error] [pid 46441] [client xxx.xxx.xxx.xxx:xxxx] AH01215: [Mon Sep 25 17:15:20 2017] z3950_search.pl: DBD::mysql::st execute failed: Field 'marcxml_old' doesn't have a default value [for Statement "INSERT INTO import_records (import_batch_id, record_sequence, marc, marcxml, : /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode=

The Problem

These last two lines seem to be where the issue lies.

z3950_search.pl: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_sample`.`import_biblios`, CONSTRAINT `import_biblios_ibfk_1` FOREIGN KEY (`import_record_id`) REFERENCES `import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE) [for Statement "INSERT INTO import_biblios (import_record_id, title, author, isbn, issn) VALUES (?, ?, ?, ?, ?)" with ParamValues: 0='0', 1="Guide to criminal law & procedure research.", 2=undef, 3=undef, 4=undef] at /usr/share/koha/lib/C4/ImportBatch.pm line 1607.: /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode=

z3950_search.pl: DBD::mysql::st execute failed: Field 'marcxml_old' doesn't have a default value [for Statement "INSERT INTO import_records (import_batch_id, record_sequence, marc, marcxml, : /usr/share/koha/intranet/cgi-bin/cataloguing/z3950_search.pl, referer: http://xxx.xxx.x.xx:xxxx/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=0&frameworkcode=

To be honest, i’m on shaky ground when it comes to MySQL, the problem seems to be with the table import_biblios and the foreign constraint key import_biblios_ibfk_1. I’ll leave it for the SQL gurus to explain.

The Solution

Anyway, it took me a long time to find the solution, partly because i was being thick, and partly because i’m using an unfamiliar setup. I eventually found the solution on this list https://lists.katipo.co.nz/pipermail/koha/2016-November/046591.html

To resolve, edit the MySQL configuration file (my.cnf) file on the database server (which, in my case, is using MariaDB. At first i did this on both servers, but i found it only has an effect on the database server.)

sudo nano -Bu /etc/mysql/my.cnf

(the options -Bu allow me to backup the original file and undo edits. You don’t need to use them, but its a good idea)

Add the following line under [mysqld] section, create it  (the [mysqld] section) at the end of the file if it doesn’t exist.

sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

So your /etc/mysql/my.cnf will look like this:

# # The MySQL database server configuration file.

# # You can copy this to one of:

# - "/etc/mysql/my.cnf" to set global options,

# - "~/.my.cnf" to set user-specific options. # # One can use all long options that the program supports. # Run program with --help to get a list of available options and with

# --print-defaults to see which it would actually understand and use. # # For explanations see # http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients # It has been reported that passwords should be enclosed with ticks/quotes # escpecially if they contain "#" chars... # Remember to edit /etc/mysql/debian.cnf when changing the socket location.

# Here is entries for some specific programs # The following values assume you have at least 32M ram
!includedir /etc/mysql/conf.d/

[mysqld]

sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

(sorry if i’m over-explaining things, but i find with a lot of tutorials on the net, they assume you know a lot, when often, the opposite is true. But, i digress…)

Then restart MySQL

sudo service mysql restart

Now try to search using z3950 again. It should work.

You can check the error logs on the application server in real time, while you are attempting the z3950 search, by doing the following:

sudo tail -f /var/log/koha/sample/intranet-error.log

If there are any further problems, you should see them on the output.

Final Thoughts

I didn’t immediately think of the above solution, which is mentioned in the Koha installation wiki https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages#Ubuntu_MySQL_Security_Tweak, because i thought the issue only affects MySQL and not MariaDB.

And it doesn’t help that there are several MySQL and MariaDB configuration files (/etc/mysql/my.cnf, /etc/mysql/mysql.cnf, /etc/mysql/conf.d/mysql.cnf, /etc/mysql/conf.d/mariadb.cnf).

But, as i was writing this, i realized that i’m running MySQL 5.7 on the application server, and MariaDB 10.2 on the database server. So maybe that’s why i’m still encountering the problem? I’ll upgrade MySQL 5.7 on the application server to MariaDB 10.2 to check if the problem still occurs if i remove the above tweak. But, that’s a battle for another day. Right now, my brain is fried and I have a date with my gf 🙂

5 Reasons Why A Library Should Use A Library Management System

A library management system is important to a library in the following ways;

1. It increases efficiency
A library management system (LMS or ILS, integrated library system) enhances the efficiency of the librarians and library users. A good library management system enables librarians to easily catalog books and keep proper records of books issued, reissued, and those not returned. On the other hand, library users can easily check the availability of any book that they need.

2. It reduces the cost of managing a library
A library management system reduces the cost of management. The system eliminates the need to employ many workers and keep different manual files thereby reducing the cost. Additionally, one librarian can accomplish what more than what other several others can achieve at a given time. One computer can also store a lot of data eliminating the need for many manual files.

3. It saves time
Time is of the essence for both librarians and patrons. The librarian can easily record and go through the history of individual library users. On the other hand, the library users can know the location and availability of a particular book faster than before. Both the librarian and the student can accomplish more with less time.

4. It increases the productivity of library workers
Automating your day to day processes will to increase the productivity. An ILS ensures that the workers spend their time doing what is important. Due to the growing ease of doing their work, workers can engage in other important activities in the library without the library incurring any additional cost.

5. It enhances the presentation of the library
A library should be as much about the looks as it is about the books.  A library with a good management system looks tidy and attractive. The librarians can arrange the available books in good order, while the students can locate them easily. It, therefore, increases the comfort and enjoyment of the librarians and the library users.

What Is An Integrated Library System?

An integrated library management system, or “ILS” for short is an electronic program that help librarians and users to circulate and catalogue items, manage patron activity, track item movement as well as interact with databases from other libraries or institutions, amongst other functions. An ILS (sometimes abbreviated LMS) is meant to increase the output and efficiency of a library, and improve access to resources for its patrons, by automating the processes that would otherwise have been done manually.

An integrated library management system has several main features, which include:

  • A database – this is where all the information belonging to a library is stored, such as MARC (MAchine Readable Cataloguing) records, patron information etc.
  • Cataloguing module – allows librarians to add materials to the database
  • Circulation module – checks items in and out, keeping track of the location and status of the library’s resources
  • Patron management – this enables you to add, delete and manage your library’s patrons.
  • Staff interface – this is the interface through which a librarian manages the ILS. Modern library management systems have web-based interfaces which are accessible through a local network or the internet via a web-browser
  • OPAC – The Online Public Access Catalogue. This is the interface through which your patrons can search for books and other items, access their accounts, place holds, track their circulation history, make payments for fees and fines etc.
  • Reports – the ability to run various reports on item movement as well as staff and patron activities.

The benefits of using a library system are immediate and obvious. By automating processes that would otherwise have been done manually, an ILS can exponentially increase the productivity of your library. Use of modules such as copy cataloguing means a librarian can simply import existing MARC records from other institutions into their database, rather than doing the whole process from scratch. Circulating items becomes a matter of scanning barcodes, rather than laborious manual writing on library cards and date stamps.

Patrons will also enjoy the ability to do simple and advanced searching using the OPAC, which will save both them and the librarian precious time. They can also make holds and purchase requests via their accounts, as well as get notifications by email, phone or text messages when they check books in or out, or if an item they had previously reserved becomes available. All of this means that a library can operate much faster and efficiently at a much lower cost than if it was to try and achieve the same by hiring more employees.

Open source library systems are of great value to both large and small libraries. In previous years, the latter have often been unable to adopt an integrated library management system largely due to the cost and complexity of previous software. But with the advent of highly scalable open source software with great support,any institution can now modernize their libraries at very low costs, regardless of the size of their holdings.

Some of the advantages of opting for open-source ILSs such as Koha and Evergreen include:

  • No purchasing cost
  • Low cost setups
  • High scalability – both large and small libraries can use the same system
  • Great community support
  • Frequent upgrades and updates
  • Active librarians within the development and user communities
  • No vendor lock-in – several support companies exist from which a library can choose.

Whether you opt for an open source or paid management software, your library should seriously consider getting an integrated library system for the benefit of both your staff and patrons. For more information on how an integrated library system can be of use to you, please contact us here.

How To Use The Koha Library System Offline Circulation Plugin

How To Use The Koha Library System Offline Circulation Plugin

How To Use The Koha Offline Circulation Plugin

What do you do if your power or internet connection goes down, or your Koha library system is slow or inaccessible? Go back to the dark ages and start writing with pen and paper? Surely not!

Koha has a very useful feature call Offline Circulation which allows you to continue processing check-ins and check-outs even when you can’t access your system. There are two tools it offers, one being a desktop application and the other a Mozilla Firefox plugin. In this article, I am going to show you how to setup and use the Mozilla Firefox Koha offline circulation plugin. You simply enter your staff page access parameters and credentials, and continue circulation offline until access to your system is restored.

I also strongly recommend using this method when you have a particularly busy period. The plugin is very fast, and you can upload and process items directly to the system when things quieten down again.

To Configure Plugin Parameters

  • Open Mozilla Firefox

  • Open the Koha offline circulation plugin (top right corner)

 

  • Param (parameters) and enter the following details (you only need to enter the first two – Server and Library Code – once).

Close and open Koha Offline Circulation Plugin again to save parameters

To checkout an item

  • Open the “Checkout” Tab

  • To confirm that the transaction has been accepted, open the “Log” tab

To Check In

  • Open the “Check In” tab

To Upload Circulation Transactions To Koha

Open the “Log” tab and confirm the transaction has been accepted

  • Open the “Log” tab

  • Click the “Commit to Koha” tab to upload circulation transactions to Koha system for review. The status will change from “Local” to “Added” when the upload is successful.

To process the offline circulation actions in Koha, log in to your Koha staff page, and go to Home > Circulation > Pending Offline Circulation Actions and process or delete transactions as you see necessary.

That’s it! Using the offline circulation system is a very easy and straightforward process that will save you tons of time and keep your library running even when you can’t access your system. Questions? Comments? Leave them below!