Two operations, one problem
When your dog swallows something that will not pass, the surgery to retrieve it has one of two names depending on where the object has ended up. Both are performed through the same abdominal approach and both fall under foreign body removal surgery.
Understanding which one your dog is facing helps make sense of the estimate, the risk conversation, and the recovery instructions.

Gastrotomy: opening the stomach
A gastrotomy is an incision into the stomach wall to retrieve an object that has not left it.
This is generally the better scenario. The stomach is large, elastic, and has an excellent blood supply, which means it tolerates an incision well and heals reliably. Objects can sit in the stomach for some time without causing the tissue damage that an intestinal obstruction causes, because there is space around them.
The incision is made in a relatively avascular area of the stomach wall, the object is removed, and the stomach is closed in two layers. The abdomen is lavaged if any contamination has occurred.
Enterotomy: opening the intestine
An enterotomy is an incision into the small intestine. This is what is needed once an object has moved out of the stomach and lodged.
The intestine is narrower, thinner-walled, and has a less generous blood supply than the stomach. An object wedged in it causes two problems simultaneously: nothing can pass, and the pressure against the bowel wall progressively compromises the circulation to that segment.
The affected loop is isolated, an incision is made just distal to the object where the tissue is healthiest, the object is milked out, and the incision is closed in a single layer with fine suture. Closure technique matters enormously here, because leakage from an intestinal closure causes peritonitis.
We always run the entire tract by hand
Dogs who swallow one sock have frequently swallowed two. Checking the full length of the intestine from stomach to colon is standard, not optional.
When resection becomes necessary
If a section of bowel has been obstructed long enough to lose its blood supply, that tissue is no longer viable. It cannot be closed and expected to heal.
Intestinal resection and anastomosis removes the damaged segment entirely and joins the two healthy ends together. It is a longer operation, it carries a higher complication risk, and it costs more.
The variable that decides whether your dog needs an enterotomy or a resection is very often time. This is why we treat obstruction calls as same-day priorities rather than fitting them into the next available slot.
Linear foreign bodies: the worst version
String, thread, ribbon, and tinsel behave differently from solid objects and are considerably more dangerous.
A linear foreign body anchors at one end — usually under the tongue or at the pylorus — while the intestine keeps trying to move the rest along. The bowel bunches up along the string like fabric gathered on a thread, a pattern called plication. Meanwhile the taut string saws through the bowel wall from the inside, creating multiple perforation points.
That is why a linear foreign body may require several enterotomy incisions along the tract, and why we never pull on a visible string. If you can see thread at your dog’s mouth or anus, leave it and call immediately.
What recovery looks like
Food comes back gradually. Small, frequent, bland meals for the first several days, then a graduated return to normal food across the second week. Water in small amounts often rather than a full bowl at once.

Activity is restricted for the full two weeks while the abdominal incision and the gut closure heal. The warning signs that need an immediate call are renewed vomiting, refusal to eat after initially eating, lethargy, a swollen or leaking incision, or a painful abdomen — all of which can indicate leakage from the closure.
Most dogs recover completely and go on to eat something they should not within the year.