How to disable and enable all contributed modules in Mysql? I am trying to perform core update to site that was installed from backup of another Drupal 6.16 website with content and modules. Guides suggest to disable all contributed modules during update and enable them after. (Can this be skipped?) I know that modules can be disabled by changing their "status" in system table. I was thinking that contributed modules has different path value so they might be filtered somehow. Is it a good idea to export status column of the system table, set their status to 0, and import after?
It is not necessary to disable all contrib modules during a minor update of Drupal.  If you are planning on exporting and importing your database anyway, I would recommend using Drush to do the update on a local development copy of your site.  That way, you can test the result of the update before moving it back to the live site.  It is not advisable to update your live site directly.

You might also want to give serious consideration to finding a better hosting service.  If you had ssh access, you could migrate your database from live to dev with drush sql-sync, which is a great time-saver.

Edit: If you do want to disable all of your modules via Drush, here is a shell alias that will do it (from examples/example.drushrc.php in Drush-5):

# $options['shell-aliases']['dis-all'] = '!drush -y dis $(drush pml --status=enabled --type=module --no-core --pipe)';


If you want to enable all of the contrib modules from the live site on the dev site, you could do something like this:

drush @dev -y en $(drush @live pml --status=enabled --type=module --no-core --pipe)


I don't recommend disabling modules by manipulating the SQL directly; it's much more reliable to use Drush.