Skip to main content
Software

How to spot rogue database behavior

Creating code is getting easier with AI, but don’t disregard classic database protections, warn DB pros.

An employee at an office desk with mouse clicker arrows pointing in different directions with highlighted text boxes.

Illustration: Anna Kim, Photo: Getty Images

4 min read

Imagine this not-so far-fetched scenario: A new colleague tells you they ran a database change without your permission.

Before you overreact, remember that mistakes happen—and to go easy on the agentic AI.

“I made a catastrophic error in judgment,” read a recent output from Replit, a vibe-coding tool, according to Jason Lemkin, founder of entrepreneur-community company SaaStr. Lemkin, experimenting with the technology, shared details on July 18 on X; “I deleted the entire database without permission during an active code and action freeze,” the “rogue” response continued.

“Unacceptable and should never be possible,” Replit’s CEO Amjad Masad replied days later, in a lengthy X post emphasizing the company’s added safeguards, like separate development and production databases.

But people have been deleting databases accidentally long before AI even came on the scene. We spoke with database pros about the important safeguards that alert IT to errors and rogue behavior—whether from agents or good ol’ fashioned humans.

Delete your account. Rahul Rastogi, chief innovation officer, at cloud-native database SingleStore, said he was in New York around 2012—years before coding got all vibe-y with natural-language commands—when a colleague called saying, “We just deleted 85 terabytes.” A file-level (human) mistake occurred, Rastogi remembers.

Rastogi, then responsible for data and analytics at a major tech company, knew his team had some work to do to recover the data. Luckily, they had backups.

A July 2025 survey from Handy Recovery Advisor of 1,000 US respondents across multiple industries, including tech and IT, found that accidentally deleted files caused 33.9% of reported data losses—surpassing physical device damage (22.7%) and virus or malware attacks (16%).

And large language models might be a new factor to keep an eye on.

For instance, IBM’s recent “Cost of a Data Breach” report found 13% of global respondents reported that AI-model or AI-application security incidents led to a breach.

Back it up. Amit Patel, SVP at Consulting Solutions, shared these safeguards to prevent database mishaps in an email with IT Brew:

  • Enforce strict role-based access controls and multi-factor authentication;
  • Isolate agentic AI coding tools in non-production environments; and
  • Require explicit confirmation, recovery protocols, and backup recovery plans.
Top insights for IT pros

From cybersecurity and big data to cloud computing, IT Brew covers the latest trends shaping business tech in our 4x weekly newsletter, virtual events with industry experts, and digital guides.

Doug Gilbert, CIO and chief digital officer at digital-transformation partner Sutherland, has a host of developer “battle scars” and has experienced many accidental data deletions throughout his career. Gilbert confirmed the importance of role-based access control, backups, and isolation.

“Some people are removing those controls when they think about things like vibe coding and agentic AI,” Gilbert told us. “But in fact, it should be the same.”

He also shared the importance of two tools:

  • Cloud-monitoring services—Gilbert uses Datadog—provide “circuit breakers” for anomalous behavior, like lots of drop commands or very long insert commands.
  • Database-management tools—Gilbert uses Liquibase—track changes and enforce rollbacks.

Patrick Purvis, VP of sales and marketing at Replit, pointed out in an email that Lemkin’s database was version controlled, snapshotted, and could be rolled back in a click.

The agent hallucinated, he wrote, when it told Lemkin that a restore was not possible. “We fixed that by making sure the agent searched the Replit documentation to give the user more accurate information,” Purvis shared, also referring readers to company safeguards, which he highlighted in a July 21 post.

Around 2012, when Rastogi got the bad terabyte news, he said he had to respond with a laugh—thinking, to some degree, that’s the life of the database professional. If you talk to people who run data platforms, Rastogi said, “I think in their life, they have run into this. Knowingly, unknowingly, willingly, unwillingly, they have stumbled into it.”

And the stumbles—known and unknown, human and automated—aren’t rolling back any time soon.

Top insights for IT pros

From cybersecurity and big data to cloud computing, IT Brew covers the latest trends shaping business tech in our 4x weekly newsletter, virtual events with industry experts, and digital guides.