1

Is it possible to split the Drupal database into multiple databases. For example I have one database having the watchdog table and another database having all the other tables?

I know if I created my own tables I could store them in a separate database and use the following:

How to connect to multiple Databases in Drupal 7?

db_set_active('your_second_db_alias');
$query = db_query("SELECT * FROM your_table");
db_set_active();
  • Can you describe what task you're hoping to achieve this way? – beth Aug 20 '14 at 16:04
0

For watchdog specifically, you could use hook_watchdog to route the message where you need it, and don't use the dblog module (dblog's hook_watchdog) if you don't want it logged to the default database.

For other (core or 3rd party) data, it depends on whether there is an appropriate hook to interrupt the intended functionality.

0

I think you'd be better served using Syslog for logging without cluttering your database.

  • Thanks. Updated the question. It could be any tables that we would move out. (This is not my idea BTW but I have been tasked to look into it) – Bobby Aug 20 '14 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.