The Galaxy Tab 2 7.0 was released late last month and developers have already found a way to install ClockworkMod Recovery onto it. ClockworkMod is a custom recovery that allows for backing up your device, installing custom ROMs, rooting and more.
Step 1: Download the Odin from XDA
Step 2: Download recovery.tar.md5
Step 3: Boot your Galaxy Tab 2 7.0 into Download Mode by holding the volume down button while your tablet just turns on. Then press volume up to select Download Mode and volume down to continue. You can also use ADB to boot into Download Mode.
Step 4: Open Odin and plug your Galaxy Tab 2 7.0 into your computer.
Step 5: Click PDA and select the recovery.tar.md5 file you downloaded earlier.
Step 6: Click start.
I am not 100% sure if that is how you boot into Download Mode on the Galaxy Tab 2 7.0 because I do not have access to one, but that is how it works on the Galaxy Tab 10.1. The alternative is way is more complicated only because you have to set up ADB, but there are many tutorials on how to do that on the internet.
Now that you have ClockworkMod Recovery, you can root your tablet using this tutorial.
Source: Rootz Wiki