I'd like to know if it's possible for two MODX installations on the same server working in a single database where only difference is modx_site_content database. For example, I want to use my chunks, snippets, etc on another MODX installation but have a different table for content. I am using many different contexts now, but some of this contexts must be physically separated (there is a reason for that). Any possible solutions for this?
I don't think it's possible. AFAIK, each site can only have one database prefix and will always go to prefix_site_content for its resources, so either it would use the wrong site_content table, or it wouldn't be able to find anything else.
It can be done, but you would have to do a lot of extra coding, to open a new PDO connection, use that connection for your queries. The MODX API would be impossible, as the API functions depend on a pre-defined schema including the database, as well as on other tables which would, as BobRay says, not be available. So you would probably need to develop your own custom version of any API to access your database.
[ed. note: sottwell last edited this post 9 years, 3 months ago.]
Hold on. I misread your problem as requiring a separate database. A custom table is another matter altogether. You can make a proper schema and class object out of a custom table very easily. In fact, there are several ways to handle the situation, depending on what exactly you want to do.
You can use MigxDB, either with a TV or with a CMP - http://rtfm.modx.com/extras/revo/migxdb/ (you can also just use the MigxDB utilities to generate the xpdo classes and files without using the rest of MIGx)