My package has been overwritten multiple times

I have a package in SQL Developer that I created. In the body of this package I have multiple procedures. Last week I noticed that when I opened the body and went to one of my procedures I noticed that the new code I had put in was gone and the procedure was back to where it was a few days earlier. I understand how to save the package by itself and not to Save All because I don't want to save all the stuff I have open, I just want to save the work I have recently done. I brushed this off to a possible oversight on my end and got the code back to where it was before I lost my new code.
Now, I work with a guy who has recently been working on another package, in the list with my packages. I went to his desk today and noticed he was still working on modifying an existing package and he had a question that I helped him with. He ended up compiling his code and it worked. I went back to my desk and opened my package that I had finished and was testing. I noticed that I was back to the point I was at the first time I lost my code, about a weeks worth of work....AGAIN!!! Since this guy starting modifying his package I have had these problems. I have a feeling this guy is accidentally overwriting my code somehow. I think the version on his computer is what I keep going back to when Im overwritten. I am only speculating here and I haven't blamed anyone and since the first problem I had, I save my code to notepad, just in case and thank the lord for that because I have about 99% of the code so Im not worried about the code, Im worried about this happening again. Also, when I asked the guy if he is looking at my code and maybe doing a Save All accidentally but he is not the type of guy to admit he did anything wrong. His only response was that I should save my work  locally and all this other stuff. That's when I started to really suspect him. Hes known never to admit fault and will talk in circles until you just are sick of listening, never making the point or admitting anything. Ive seen it happen many times and I just started there last month. My boss actually said when I got overwritten the first time that it may have been him, because he is very green and he had just started working with a package and then we discussed possible version control.  I thought it was me so I started being extra careful and saving my code just in case.
My question is....Is there any way I can find out, maybe a log file or something, when and who may have done the last save to my package? Next, is there a version control that I can easily set up so I don't have this issue again?
Once again, not blaming anyone I just want to stop losing my work.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DavidSenior Oracle Database AdministratorCommented:
In general, developers develop new code in a development instance, using personal schemas (accounts) in which other developers cannot read/write code.  Woe to your shop if multiple people are sharing one common schema.

If necessary, I suppose DDL audit could be turned on to log when objects change -- but frankly, if you all are all logging in as "SCOTT", that's not going to do you any good.

Without hard evidence, please avoid blaming a co-worker.  Those negative relationships will bite you in a release.  Instead, figure out a way to save a copy to a personal drive, possibly with a time/date stamp on the filename.  Or get real good about adding some incremental suffix whenever you want to save a benchmark copy.

So, why are you all sharing the schema?
jknj72Author Commented:
I really went out of my way to say I am not blaming anyone to avoid anyone saying that I shouldn't blame him.
DavidSenior Oracle Database AdministratorCommented:
Agreed, did not mean to imply you did; my thought was of my own past in which I lost a good job.  Apologies.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

slightwv (䄆 Netminder) Commented:
SQL Developer is a simple GUI. It is not a source control or anything like that.

If you open code, it is what is in the database.  If you save code, it is saved back to the database.

If you both open code from the same schema, last one to save gets the write.

Think of it this way:
From a common share drive, you open q.txt in notepad.
I open the same file in notepad.
You type a novel and save.
I don't type anything and save.

What is in q.txt?
johnsoneSenior Oracle DBACommented:
As far as finding out who did it last time, if the database is in archive log mode you could go through the old archives and see who last touched it.

As far as finding out who does it next time, auditing is probably the easiest way to go.

As far as version control, I don't know of anything built into Oracle that will do version real version control.  However, code for procedures and such are text files and are easily stored in any version control system.  I would assume that you already have one, so just add the database code into that.

For what its worth, I always kept a local copy.  Even with version control.  But, I set up the databases and everyone had their own play area, so we didn't have issues like this.  Only DBAs should have the passwords and permissions to put the code into the production schemas.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jknj72Author Commented:
Ok I get it. I just thought I could find out why this is happening. I can almost guarantee that I was overwritten but since I cant prove it, I will just have to suck it up and move on, WITHOUT blaming anyone. Thank goodness I had a copy of my code. Its just very frustrating.
Since you all took the time to read my rant and all made good points I will share the points.

jknj72Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.