Narrative:

I was cleared for the buchanan 9 departure (departed runway 19R) (basically left turn after takeoff then direct ccr) and then pitts intersection; linden VOR on course. After takeoff; my gear failed to stow completely; I cycled gear 2 times and extinguished gear light (cessna is aware of a fleet problem). Then the second problem developed; i.e.; hydraulic light would not extinguish; so that was traced back to flap switch. (I cycled a few times and it went out). By then I had missed the direct to ccr (I did turn left after takeoff) and had wandered slightly into an area with a lower MSA altitude; and was advised of an altitude alert and to climb immediately. I advised of VFR conditions and I had all ground obstacles in sight. No further problems occurred. I had advised departure to stand by as I was having a hydraulic event.

Google
 

Original NASA ASRS Text

Title: CE525 pilot reports gear and hydraulic problems departing CCR. These distractions led to a track deviation from the published departure procedure and a low altitude call from departure control.

Narrative: I was cleared for the Buchanan 9 departure (departed Runway 19R) (basically left turn after takeoff then direct CCR) and then PITTS Intersection; Linden VOR on course. After takeoff; my gear failed to stow completely; I cycled gear 2 times and extinguished gear light (Cessna is aware of a fleet problem). Then the second problem developed; i.e.; hydraulic light would not extinguish; so that was traced back to flap switch. (I cycled a few times and it went out). By then I had missed the direct to CCR (I did turn left after takeoff) and had wandered slightly into an area with a lower MSA altitude; and was advised of an altitude alert and to climb immediately. I advised of VFR conditions and I had all ground obstacles in sight. No further problems occurred. I had advised Departure to stand by as I was having a hydraulic event.

Data retrieved from NASA's ASRS site as of April 2012 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.