How to additionally clean-up Kodi MySQL database from unwanted entries

If you are like me using Kodi (XBMC) library to manage all your multimedia files you are probably used to updating and cleaning your library after adding or deleting new files.

My library at the moment consists of 15121 files total, but after examining it in PHPMyAdmin I have noticed that files table contains also some entries that point to non-existing idPath from path table and other files that are pointing to a path that is non-local (HTTP or plugin instead of regular system path). Continue reading “How to additionally clean-up Kodi MySQL database from unwanted entries”

Shrink databasename_Log.LDF file on Microsoft SQL

Since I administer a very high load news site, I noticed that MSSQL log file of the site database is growing enormously. Database itself devided into 2 files one 330MB and the other 721MB, but log files grew to 5GB for the first file, and 20GB for the second file.

Since Microsoft doesn’t recommend that you delete these files, you need to shrink them to smaller files. To do this you have to backup your database (f.e. acctfiles) log files with truncate_only option. Continue reading “Shrink databasename_Log.LDF file on Microsoft SQL”