The Alexandria Police Department is investigating whether a narcotics officer disrupted a drug probe by tipping off targets and whether his commander ignored allegations against the officer, law enforcement sources said yesterday.

The officer, David B. Goldberg, 30, resigned from the force Aug. 7 after declining to take a polygraph test, sources said.

Sources said Goldberg, who was on the Alexandria force nearly five years, had participated in an ongoing drug investigation being conducted by officers from several Northern Virginia agencies and agents of the federal Drug Enforcement Administration.

Police officials are also investigating whether Lt. Arthur L. Bratcher, head of the department's vice and narcotics unit, failed to pursue allegations against Goldberg for several months. Sources said that Bratcher became aware of questions about Goldberg's conduct in May but that an investigation by the department's internal affairs division did not begin until July.

Lucy Crockett, a police spokeswoman, confirmed yesterday that Goldberg quit after learning he was the subject of an internal review and that police are also probing "other events that led up to Goldberg's resignation." She declined to discuss details of the investigation.

Goldberg could not be reached, and Bratcher declined to comment.

According to law enforcement sources, members of the drug investigation task force became alarmed this spring when several targets of the probe came forward and told police they knew they were being investigated.

Task force members, believing that information had been leaked from inside the group, began to suspect Goldberg, who was acquainted with one of the probe's targets, sources said. Goldberg and the target participated in sports activities together, according to sources.

Members of the task force told Bratcher about the connection and asked him to look into it in late April or early May, sources said. But the Alexandria Police Department's internal affairs division did not become aware of the allegations until July, sources said.

Soon after they became involved, internal affairs investigators asked Goldberg to submit to a polygraph test, and he resigned, sources said.

Although Bratcher is being investigated for possibly failing to act on the allegations about Goldberg, there have been no allegations that Bratcher leaked information about the probe, sources said.

The narcotics task force, which has focused for several months on drug trafficking in Northern Virginia, has produced no arrests.

The inquiry into Goldberg and Bratcher marks the second time in three years that the police department has faced questions regarding its handling of drug investigations. In 1985, Chief Charles T. Strobel was accused of short-circuiting a probe of drug use among prominent citizens.

Strobel was eventually exonerated of that charge and of charges of lying to the grand jury that investigated him. But the allegations hung over Strobel for two years, crippling his ability to run the department and causing morale to plummet.

Strobel announced early this year that he would step down Dec. 3, the first day he is eligible for retirement. The city has begun a nationwide search for a new chief but, as of early August, had attracted only 18 applicants, a number officials have called disappointing.