
365 N.W.2d 338 (1985)
BIO-LINE INC., Kyron Michaelson, Respondents,
v.
Harold WILFLEY, et al., Petitioners,
v.
CREATIVE COSMETICS, INC., et al., Additions Counter-Claim Defendants.
No. C5-85-112.
Court of Appeals of Minnesota.
April 9, 1985.
*339 Richard Diamond, Minneapolis, for petitioners.
Kenneth Holker, Monticello, for Bio-Line Inc.
Jack Wilkie, Lakeville, for Kyron Michaelson.
Heard, considered and decided by POPOVICH, C.J., and PARKER and FOLEY, JJ.

OPINION
POPOVICH, Chief Judge.
Petitioners seek a writ of prohibition to prevent the entry of a default judgment and the dismissal of their counterclaim. We stayed all further proceedings in the trial court pending decision on this petition. We grant the writ.

FACTS
Bio-Line, Inc. manufactures and distributes consumer products containing "specially formulated catalyst water." Ellen and Harold Wilfley owned 45 percent of the company's stock and served as corporate officers and directors. In September 1983, the Wilfleys and Bio-Line executed an agreement providing for the Wilfleys' retirement and for various payments and compensation to them.
In May 1984, Bio-Line sued the Wilfleys for breach of fiduciary duty, injunctive relief, contractual interference, disparagement, unfair competition, specific performance of a non-competition agreement, fraudulent diversion of corporate assets, and cancellation of stock. The Wilfleys counterclaimed for payment on promissory notes.
The Wilfleys' depositions were first scheduled in October 1984. By agreement of counsel, the depositions were continued to November 26, 1984. Prior to that date, the Wilfleys sought a protective order allowing their depositions to be taken in Oregon, by telephone, or at the expense of Bio-Line. The motion for a protective order was denied, but no date was set for completion of the depositions. Deposition *340 notices were then served for a different lawsuit involving the parties. Respondents have not shown, however, that they noticed the Wilfleys' depositions in this matter after the trial court refused to grant a protective order.
A hearing was scheduled for January 10, 1985 on the Wilfleys' motion to compel Bio-Line to reply to a request for production of documents. Five minutes before the hearing, the Wilfleys were served with a motion to (1) deny their motion to compel, (2) grant a default judgment or dismiss the counterclaim, (3) dismiss additional counterclaim defendants, (4) extend discovery for 60 days after the Wilfley depositions, (5) set a trial date for May 1985, and (6) for other just relief.
When the trial judge appeared in court, he announced:
I've read the papers. I don't intend to allow argument on these motions. I'm going to dismiss the actions against [the additional counterclaim defendants] for failure of service and order a default on the claims of the Plaintiff and a dismissal of the counterclaim.
Petitioners seek extraordinary relief to prevent the entry of a default judgment and dismissal of their counterclaim.

ISSUE
Did the trial court err in ordering a default judgment and dismissal of the counterclaim?

ANALYSIS
1. Prohibition prevents the exercise of judicial power in excess of lawful authority which may otherwise result in an injury for which there is no adequate remedy at law. Liptak v. State ex rel. City of New Hope, 340 N.W.2d 366, 368 (Minn.Ct. App.1983).
2. "A party, upon reasonable notice to other parties * * * may apply for an order compelling discovery * * *." Minn.R. Civ.P.37.01.[1] If a party fails to appear for his deposition after being served with proper notice, the trial court may make orders in regard to the failure as are just, including striking pleadings, dismissing the matter, or ordering a default judgment against the disobedient party. Minn.R.Civ.P. 37.04, 37.02(2)(c).
We have previously affirmed the dismissal of claims for non-cooperation with discovery. In Williams v. Grand Lodge of Freemasonry, 355 N.W.2d 477 (Minn.Ct. App.1984) pet. for rev. denied, (Minn. Dec. 20, 1984), this court affirmed the dismissal of a complaint noting that the plaintiff was aware of the potential consequences of failing to appear as ordered and had been previously warned by the trial court. Id. at 480.
Similarly, plaintiff's witness in Reichert v. Union Fidelity Life Insurance Company, 360 N.W.2d 664 (Minn.Ct.App.1985) refused to be deposed. The trial court ordered the deposition completed by May 12, 1980. Despite that order, the witness refused to answer any questions. Finally, in March 1983 the action was dismissed for lack of prosecution and for violation of the discovery order. We affirmed the dismissal, but stressed "that dismissal runs contrary to the primary objective of the law, which is to dispose of cases on their merits." Id. at 666 (citing Firoved v. General Motors Corp., 277 Minn. 278, 283, 152 N.W.2d 364, 368 (1967)). Id.
The Wilfleys were never ordered to submit to their depositions within a specified time. They were not served with new deposition notices after the trial court denied their motion for a protective order, and the record before us does not show they were ever warned by the trial court of the consequences of failing to appear. Where no specific date is ordered for compliance with a discovery order, dismissal is an inappropriate sanction. Beal v. Reinertson, 298 Minn. 542, 544, 215 N.W.2d 57, 58-59 (1974). Instead, the trial court should fix a deadline for compliance and *341 provide for dismissal only if compliance does not occur. Id.
3. We also note dismissal of the counterclaim would render respondents' previously filed appeal moot. The trial court retains jurisdiction over matters not involved in an appeal, including discovery, but lacks the power to affect the matters on appeal. See Evans v. Blesi, 345 N.W.2d 775, 780 (Minn.Ct.App.1984). Since a dismissal of the counterclaim and a default judgment would render the appeal moot, the trial court did not retain jurisdiction to dismiss or enter a default judgment.

DECISION
The trial court erred in dismissing the counterclaim and ordering a default judgment. The order for judgment by default is vacated and the counterclaim is reinstated.
Writ of prohibition issued.
NOTES
[1]  Because of our decision on other aspects of this matter, we need not reach the question whether five minutes' notice of a motion to dismiss is reasonable under Rule 37.01.
