I want to apply Change Data Capture(CDC) to database DB1's tables and want to log everything in DB2.
So, could it be possible to capture table DB1's changes to DB2?
No, it will only work within the same database. After all, what do you expect to happen if the second database goes offline, gets dropped, becomes corrupt, has permissions changes, etc.?
Now, once the CDC tables are created, I guess one potential workaround would be to place INSTEAD OF INSERT triggers on them, and divert the data to identical tables in another database that you manually create. But I haven't tested this, it would hardly be supported, and you would also lost a lot of the inherent CDC functionality (think about all the LSN-based functions that would now obviously not work). And again, I don't know what would happen when the other database goes offline, gets dropped, etc...
While it is not possible with SQLserver CDC directly, there are commercial tools out there which can readily perform this task.
I work for Attunity, which has a full featured 'Replicate' product. Define a source DB; define a target; include or exclude desired tables (wildcards); optionally define some per-table or global transformations; and 'click' to replicate. There is also an SSIS / BIDS based option for more complete control and more ETL options.
Disclaimer: I work for Attunity.