
797 So.2d 495 (2001)
Carrol Joe DRISKILL
v.
Grant CULLIVER, Warden.
2000325.
Court of Civil Appeals of Alabama.
April 27, 2001.
*496 Carrol J. Driskill, appellant, pro se.
Submitted on appellant's brief only.
CRAWLEY, Judge.
Carrol Joe Driskill, an inmate in a state penitentiary, appeals the trial court's dismissal of his Rule 27, Ala.R.Civ.P., petition for preaction discovery. Driskill filed his motion to secure discovery concerning a possible civil-rights claim pursuant to 42 U.S.C. § 1983. Although Driskill's petition was captioned as a Rule 27 petition, Grant Culliver, the warden at Holman Prison, filed a Rule 12(b)(6), Ala.R.Civ.P., motion to dismiss. In that motion, Culliver described Driskill's pleading as an actual § 1983 complaint. The trial court granted Culliver's motion to dismiss.
Driskill argues that his Rule 27 petition was improperly treated as an actual § 1983 complaint, and, as a result, was improperly dismissed. We agree. Driskill's petition was not a § 1983 complaint. It was a Rule 27 petition for preaction discovery. Rule 27 reads:
"(1) Petition. A person who desires to perpetuate his own testimony or that of another person or to obtain discovery under Rule 34 or 35 regarding any matter that may be cognizable in any court of this state may file a verified petition in the circuit court in the county of the residence of any expected adverse party. The petition shall be entitled in the name of the petitioner and shall show: (1) that the petitioner expects to be a party to an action cognizable in a court of this state but is presently unable to bring it or cause it to be brought, (2) the subject matter of the expected action and his interest therein, (3) the facts which he desires to establish by the proposed testimony and his reasons for desiring to perpetuate it, (4) the names or a description of the persons he expects will be adverse parties and their addresses so far as known, and (5) the names and addresses of the persons to be examined and the substance of the testimony which he expects to elicit from each, and shall ask for an order authorizing the petitioner to take the depositions of the persons to be examined named in the petition, for the purpose of perpetuating their testimony or to seek discovery under Rule 34 or 35 from the persons named in the petition.
". . . .

*497 "(3) Order And Examination. If the court is satisfied that the perpetuation of the testimony may prevent a failure or delay of justice, it shall make an order designating or describing the persons whose depositions may be taken and specifying the subject matter of the examination and whether the depositions shall be taken upon oral examination or written questions; or shall make an order designating or describing the persons from whom discovery may be sought under Rule 34 and specifying the objects of such discovery; or shall make an order for a physical or mental examination as provided in Rule 35(a). The discovery may then be taken in accordance with these rules. For the purpose of applying these rules to discovery before action, each reference therein to the court in which the action is pending shall be deemed to refer to the court in which the petition for such discovery was filed."
In his petition, Driskill properly stated the "subject matter of the expected action," see Rule 27(a)(1)(2), as "discrimination against the blind and the handicapped in violation of Title I and II of the Americans with Disabilities Act of 1990 [42 U.S.C. § 12101 et seq.]," thus signifying that he anticipated filing a § 1983 action. He sought the production of various rules and regulations, internal memoranda and correspondence, and medical records pertaining to the prison policies on the treatment of, and the provisions for, handicapped inmates. The trial court's duty was to determine if discovery of the requested information might "prevent a failure or delay of justice." See Ex parte Anderson, 644 So.2d 961, 963 (Ala.1994).
The Anderson court, after considering the differences between Alabama's Rule 27 and its federal counterpart, explained the purpose of Rule 27:
"Although Alabama Rule 27 does not give a potential plaintiff `carte blanche' to `fish' for a ground for filing an action, it nonetheless provides for preaction `discovery under Rule 34,' regardless of any need to perpetuate evidence, provided that the requirements of the rule are met and that the trial court is satisfied that such discovery might serve to prevent a failure or delay of justice. As previously noted, relief under Rule 27 is discretionary with the trial court, and a trial court's ruling on a Rule 27 petition will not be reversed in the absence of an abuse of discretion."
Anderson, 644 So.2d at 964.
The trial court did not deny Driskill's Rule 27 motion. Instead, it granted Culliver's Rule 12(b)(6) motion to dismiss. Rule 12(b)(6) has no application to a petition for preaction discovery. A Rule 12(b)(6) motion serves to "test[ ] the sufficiency of the pleadings to determine if the plaintiff has stated a claim upon which relief can be granted." Public Relations Counsel, Inc. v. City of Mobile, 565 So.2d 78, 81 (Ala.1990). To review a ruling on a motion to dismiss, this court must
"`examine the allegations contained therein and construe them so as to resolve all doubts concerning the sufficiency of the complaint in favor of the plaintiff. In so doing, [we do] not consider whether the plaintiff will ultimately prevail, only whether he has stated a claim under which he may possibly prevail.'"
Armstrong v. Brown Service Funeral Home West Chapel, 700 So.2d 1379, 1381 (Ala.Civ.App.1997) (quoting Fontenot v. Bramlett, 470 So.2d 669, 671 (Ala.1985)) (internal citations omitted). We cannot possibly apply this standard of review to a Rule 27 petition for preaction discovery because that pleading is not one stating a claim, but is instead one seeking preaction discovery to determine whether the plaintiff *498 has a reasonable basis for filing an action. See Anderson, 644 So.2d at 965. Therefore, we reverse the order dismissing Driskill's Rule 27 petition and instruct the trial court on remand to apply the appropriate standard in determining whether to grant or deny Driskill's motion.
REVERSED AND REMANDED WITH INSTRUCTIONS.
YATES, P.J., and THOMPSON, PITTMAN, and MURDOCK, JJ., concur.
