V
10  
Tags
There are no tags for this page.
Attachments
Koha Croatian user group
Brisanje biblio zapisa bez primjeraka

Problem:
treba pobrisati sve bibliografske zapise na kojima nema niti jednog primjerka.

Uz pomoć skripte

scrub_orphaned_biblios.pl

(dodati link na izvor za ovu skriptu !!)

isprobali na koha-dev.rot13.org, ne radi.

ova skripta bi trebala uredno pobrisati zapise, tako da ih sve pospremi u tablice deletedbiblio i deletedbiblioitems
također, trebala bi nešto učiniti sa zebra indeksima.
koristi koha modul C4::Biblio

Ručno

može i ovako, ali tako ništa neće ostati u deleted* tablicama (što je ponekad poželjno)

uđi u bazu:

$ mysql -u _kohauser_ -p  koha

izlistaj sve biblionumbere koje treba obrisati, ovako:

mysql> SELECT biblio.biblionumber, biblioitems.itemtype, items.biblionumber as items_biblionumber 
from biblio 
RIGHT JOIN biblioitems ON biblio.biblionumber = biblioitems.biblionumber 
LEFT JOIN items ON biblio.biblionumber = items.biblionumber 
WHERE items.biblionumber IS NULL ;

započni transakciju:

mysql> begin ;

obriši zapise:

mysql> delete biblio.* from biblio LEFT JOIN items ON biblio.biblionumber = items.biblionumber WHERE items.biblionumber IS NULL ;

pa onda provjeri, npr. ponovo napiši onaj gore select, prebroji koliko sada ima zapisa u tablicama items,biblio i bilioitems i slične stvari..

mysql> select count(*) from biblio ;

nakon toga potvrdi promjene:

mysql> commit;

onda treba rebuld zebra indeksa:

koha@koha-dev:/usr/share/koha/bin/migration_tools$ ./rebuild_zebra.pl -b -a -v -r

 

Upload Files

Click "Browse" to find the file you want to upload. When you click "Upload file" your file will be uploaded and added to the list of attachments for this page.

Maximum file size: 50MB

 
 
 
File Name Author Date Uploaded Size

Save Page As

Enter a meaningful and distinctive title for your page.

Page Title:

Tip: You'll be able to find this page later by using the title you choose.

Page Already Exists

There is already a page named XXX. Would you like to:

Save with a different name:

Save the page with the name "XXX"

Append your text to the bottom of the existing page named: "XXX"

Upload Files

Click "Browse" to find the file you want to upload. When you click "Add file" this file will be added to the list of attachments for this page, and uploaded when you save the page.

 
 
 
Add Tags

Enter a tag and click "Add tag". The tag will be saved when you save the page.

Tag: 

Suggestions: