113
gnog
5y

Well... My fist table drop in prod... Cheers 🍻
Fuck.

Comments
  • 1
    How old/recent is your backup, if any?
  • 4
    First but not the last.. :p
  • 25
    Been there. Got fired for it.
  • 19
    Might as well as drop the rest
  • 5
    @asgs
    The most recent backup is from the beginning of 2018, so that is so much that is lost.
    I laugh to not cry haha
  • 2
    Also, hopefully you have backups that are current
  • 8
    Shit... I will not get fired, but I'm dying slowly inside
  • 1
    but how?
  • 4
    @bahua how did that happen? Wasn't it an accident?
  • 5
    @boese @alexbrooklyn

    Funny story: I switched the "where Id =..." to "Id <>...".
    Fuck 😭
  • 1
    Hory shet ... And you already commited the transaction?
  • 5
    @boese What's a transaction (/s)
  • 6
    @alexbrooklyn A transaction is the propagation of one or more changes to the database. E.g., if you are deleting a record from the table, then you are performing a transaction on that table. Most clients like sqldeveloper can rollback that transaction. But if its commited its commited.
  • 5
    @boese I meant it as a joke, but thanks for the explanation :p (hence the /s)
  • 8
    @alexbrooklyn i'm not familiar with your syntax then :P
  • 4
    @boese

    haha Basically erased all recruiters' jobs done.
    Kinda fucked all the recruiters from the company.
  • 3
    @gnog shit :) anyways how can we cheer you up?
  • 4
    Ugh, I'm lucky I've only crashed cars so far and not tables yet.
  • 13
    Fuck recruiters anyways
  • 3
    Lemme guess. Not an ORA, i.E. No flaskback? :)
  • 9
    @alexbrooklyn

    Yes it was an accident. I was preparing for weekend maintenance that would be performed on some production storage volumes, and screwed up a copy and paste. That screw-up blew away said production volumes during business hours.

    A highly placed executive made the decision to fire me. I never met him.
  • 3
    @gnog
    But does it have logs?!
  • 2
    @rutee07
    Shit! I haven't thought about that. You gave me a little breath of possibility.

    @scor
    At the beginning of this year I implemented it, and it was a little relief to recover that part. I hadn't thought of db log (I don't think it is enabled), but I will check.

    Ty for remembering me about that!
  • 1
    Hey, @bahua. How did you feel about it?
  • 2
    @netikras
    probably does not have ORA. I have to search what that is :P junior dev, here
  • 2
    Ty, @boese :) you guys here are awesome! I'm thinking in how to deal with it tomorrow
  • 5
    @gnog oh, in that case.. Flashback on ORACLE DB saved my ass once. It allows you to run queries like

    `select * from USER as of timestamp SYSTIMESTAMP - 1/24`

    to see what the table looked like X time ago (1hour ago in my example).

    In your case `FLASHBACK TABLE HR.REG_HIST TO BEFORE DROP;` could be handy :)

    ref.: https://docs.oracle.com/database/...

    It's one of the reasons I actually like Oracle DB
  • 2
    @gnog

    I mean, not great. But I liked the jobs I had since then much better. That was over ten years ago.
  • 2
    @gnog btw since we're talking about mistakes... i once forgot the where clause in my update statement :D luckily auto-commit was enabled ^^
  • 1
    @boese
    shit... My heart got cold just thinking of it
  • 0
    @bahua

    Haha that made me feel better :P ; to get the mind on the time as ephemeral
  • 5
    Maybe this was the table drop by an intern that @netikras was talking about earlier? 🤔
  • 8
    Well, start thinking about how to explain that a hacker went into the system and did some mess, but u saved all the tables in this database but only one... And that u will finally be able to fix that security hole, thanx to this hacker lol

    After all those goodnews, u can tell them that, infortunately, some collateral damage include loss of content of recreuiters
    Fuck hackers
  • 3
    @gnog tbh, this might lead them to a better backup policy than annually...
  • 1
    What rdbms are you using? It sounds kinky to drop a fist table. Didn't know there are dbs out there that support fisting tables.
  • 1
    We need some sort of git for dbs. XD
    I know theres some similar elements to git in some db management systems. It would be cool to review the changes before commiting and having the ability to revert changes. There's problems ofc: big changes (tons of rows) and all real time changes would have to go trough this git-like system automatically, making it a mess to revert basically concurrent changes in high traffic dbs.

    Anyone know of any system like that?

    Please tag me if you have any insight!
  • 0
    Does your server have any kind of recovery points? Like the one that windows got? I'm an absolute noob with server stuff but thats what I would thinking about
  • 0
    @Condor haha nop. Doesn't seem so
  • 0
    If you get the sense they aim to replace you for that - just drop the recruiter's data again.
  • 0
    Did it dieded completely ?
Add Comment