I do this very regularly and I've had great results with it, with a bit of careful preparation. For a lot of modern metal, for which I do here quite often, quantizing drums is a given (like it or not), I also do a lot of stuff with pop productions where loops and sequences are dropped in and need to be locked to the kit, and I've done the "we recorded the tracks to the drum machine, can we get real drums on it now?" thing as well, and that's gone pretty well for the most part, if not an ideal situation.
Most of the tutorials I've seen use splitting clips at transients. I really don't like using this method because unless you have a pretty beefy machine, that amount of splits can be really cumbersome to work with, and you run the risk of the cross fades being in places you don't want, or the gaps too wide to do anything useful with.
More annoying is Audiosnap, since SPlat, has been iffy at best when it comes to detecting the transients. It was made better and then the algorithm was changed again which made it slightly worse. There's a couple of tricks to get this over the line, though.
So my steps to getting a good Audiosnap are very similar to John's steps above, but with a few extra steps that I've found to get around some of Audiosnap's shortcomings:
1. Record the drums (duh)
2. Find out which tracks are the main timing guides - usually kick and snare tracks. Clone them.
3. Solo the cloned tracks. On the clones, you want to aggressively gate the hell out of them so you're just getting the initial pop on the start of each hit and nothing else - the track has to be completely silent between hits. It'll sound like garbage, but that's not the point - we're not going to be using these for anything other than our timing guide.
4. Bounce those gated tracks to a new track. That's going to be your guide track now. You can either mute or delete those original cloned and gated tracks now.
5. Enable Audiosnap on all of your tracks, including the new guide track. On the Audiosnap palette, drag the Threshold slider all the way up to 100%. This will make every transient on all of the tracks disappear.
6. On your guide track, lower the Threshold until you get a useful amount of transients turn up. If you're lucky, they'll be on every hit, and if you're even more lucky, you won't need to go in and manually move anything to be on the beat and you're good to go.
7. More than likely things will need adjusting, so zoom in on your guide track with the transients and move, add or delete transient markers until you have one on every hit. Getting your guide right is crucial to this all working well.
8. Right-click the guide track, go to Pool > Add Clip to Pool. All of the transients will turn blue, telling you they've been added to the pool.
9. Select all of the other drum tracks, right click on any one of them and go to Pool > Apply transient pool markers. You'll see transient lines appear on all of the clips that line up with the blue transients in the guide track.
10. Select all of the tracks (including the guide), right click any one of them and go to Quantize and make sure Audiosnap Beats is checked. Quantize to taste.
That should get you 95% of the way there. Mute the guide track and listen back - has the quantizing put beats in the wrong place? You need to go back and manually adjust things. Turn your Snap on, find the beat that's not correct, left-mouse lasso around the transients that are on the wrong beat so they're selected across all of the tracks, and drag to the correct position.
All where it should be? Great! This is using the Online stretch algorithm so it won't sound amazing, so you'll need to bounce all of the tracks to new clips so it uses the better quality Offline algorithm. Delete the guide track and you're done!
Things to consider:
This is locking things up pretty tight. If you don't want things quite as tight, you can play around with groove quantizing and things like that. It's fiddly and results are honestly hit and miss.
The reason I went to the trouble of making these guide tracks is because transient detection currently sucks whenever there's any slight bit of noise other than what you want to detect on a track. It's almost to the point of being unworkable, in fact in the past I've gone through and manually placed transients because it's been quicker doing that than fixing all of the wrong ones SONAR has "helpfully" put in for me. The guide tracks cut out a LOT of unwanted track bleed and DRAMATICALLY help the detection algorithm.
If you need timing from something like a hi-hat or an overhead mic or something, honestly, save yourself the headache and manually put transients in. It'll be about as much work doing that as fixing SONAR's mistakes and you'll likely do a better job at it.
A couple of good examples from my band:
Against The Wind:
https://www.youtube.com/watch?v=6fx1qowWvNs Digital Lies (Extended mix, where you can really hear the drums locked in with the sequences):
https://www.youtube.com/watch?v=Y2T0mssdwOw Good luck!