CAL. CCP. CODE § 1985 : California Code - Section 1985

(a) The process by which the attendance of a witness is required is the subpoena. It is a writ or order directed to a person and requiring the person's attendance at a particular time and place to testify as a witness. It may also require a witness to bring any books, documents, electronically stored information, or other things under the witness's control which the witness is bound by law to produce in evidence. When a county recorder is using the microfilm system for recording, and a witness is subpoenaed to present a record, the witness shall be deemed to have complied with the subpoena if the witness produces a certified copy thereof.

(b) A copy of an affidavit shall be served with a subpoena duces tecum issued before trial, showing good cause for the production of the matters and things described in the subpoena, specifying the exact matters or things desired to be produced, setting forth in full detail the materiality thereof to the issues involved in the case, and stating that the witness has the desired matters or things in his or her possession or under his or her control.

(c) The clerk, or a judge, shall issue a subpoena or subpoena duces tecum signed and sealed but otherwise in blank to a party requesting it, who shall fill it in before service. An attorney at law who is the attorney of record in an action or proceeding, may sign and issue a subpoena to require attendance before the court in which the action or proceeding is pending or at the trial of an issue therein, or upon the taking of a deposition in an action or proceeding pending therein; the subpoena in such a case need not be sealed. An attorney at law who is the attorney of record in an action or proceeding, may sign and issue a subpoena duces tecum to require production of the matters or things described in the subpoena.