Home » Other » Client Tools » PL/SQL Code Prevent overwrite (9i, 10g)
PL/SQL Code Prevent overwrite [message #327966] Wed, 18 June 2008 08:07 Go to next message
ehegagoka
Messages: 493
Registered: July 2005
Senior Member
Hi,
Just want to inquire if you know any tool that provides locking of pl/sql codes? like the csv in eclipse for locking java codes. I know it's kind of difficult in pl/sql because the code are store in the database. I came to ask this question because recently we've been having problems with the code/package/procs etc being overwritten by each developer. Please advise of any tool to avoid this. Thank you very much.

Regards,
Rhani
Re: PL/SQL Code Prevent overwrite [message #327972 is a reply to message #327966] Wed, 18 June 2008 08:26 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Create a trigger on DDL to prevent from any modification from developer.

Regards
Michel
Re: PL/SQL Code Prevent overwrite [message #327973 is a reply to message #327972] Wed, 18 June 2008 08:30 Go to previous messageGo to next message
ehegagoka
Messages: 493
Registered: July 2005
Senior Member
Hi,
Thank you so much for the reply. You mean like raise an exception if another user is using it or compiled it? Could you provide some keywords as to what "topic" should i search on? Thanks again.

update :

just want to clarify is that what if two developers have been editing the package, how do we control it so that the work of each other wont get overwritten.

Regards,
Rhani

[Updated on: Wed, 18 June 2008 08:40]

Report message to a moderator

Re: PL/SQL Code Prevent overwrite [message #327975 is a reply to message #327973] Wed, 18 June 2008 08:46 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Yes this what I meant. Have a look at
Database Application Developer's Guide - Fundamentals
Chapter 9 Coding Triggers

Quote:
just want to clarify is that what if two developers have been editing the package, how do we control it so that the work of each other wont get overwritten.

You can't. The last one to write it is the current version.
There is no versioning, this is just like a variable, if you set it to a value, the previous one no more exists.
Remember that the database is NOT a versioning tool.

Regards
Michel

[Updated on: Wed, 18 June 2008 08:48]

Report message to a moderator

Re: PL/SQL Code Prevent overwrite [message #327984 is a reply to message #327975] Wed, 18 June 2008 09:13 Go to previous messageGo to next message
ehegagoka
Messages: 493
Registered: July 2005
Senior Member
Hi,
Thanks again for the reply. I guess we just have to coordinate much often who's changing what package =) Thanks again.

Regards,
Rhani
Re: PL/SQL Code Prevent overwrite [message #328033 is a reply to message #327966] Wed, 18 June 2008 12:10 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Oracle SQL Developer V1.5 supports both cvs & subversion

http://www.oracle.com/technology/products/jdev/collateral/papers/11/newfeatures/index.html

Subversion Support

Team development working in JDeveloper is enhanced through

    * Upgraded support to Subversion release 1.4.3
    * Branch/Tag, Switch and Merge files, projects and applications versioned in an SVN repository
    * Support for Versioned Properties including svn:ignore
    * Incoming Changes to working copy now visible in the Pending Changes window

Enhanced Merge Conflict Resolution for Subversion and CVS

JDeveloper now provides an enhanced XML-aware interactive GUI to browse and update unresolvable conflicts reported during the merge process.

[Updated on: Wed, 18 June 2008 12:11] by Moderator

Report message to a moderator

Re: PL/SQL Code Prevent overwrite [message #328597 is a reply to message #328033] Fri, 20 June 2008 11:01 Go to previous messageGo to next message
ehegagoka
Messages: 493
Registered: July 2005
Senior Member
Hi,
Thank you very much. I'll check this.

Regards,
Rhani
Re: PL/SQL Code Prevent overwrite [message #329009 is a reply to message #327966] Mon, 23 June 2008 13:11 Go to previous messageGo to next message
Kevin Meade
Messages: 2103
Registered: December 1999
Location: Connecticut USA
Senior Member
I seem to recall seeing also, that someone posted a trigger (or set of triggers) that would copy the old version of some plsql component to a "save" table when ever it got compiled. It provided a crude form of versioning.

Too bad I can't find these anywhere. Any body remember seeing this also?

Also, anyone have comments on the idea? Or maybe even did it?

Thanks, Kevin
Re: PL/SQL Code Prevent overwrite [message #329076 is a reply to message #329009] Tue, 24 June 2008 00:21 Go to previous messageGo to next message
Frank
Messages: 7901
Registered: March 2000
Senior Member
I think it's a bad idea.
First of all, your development schema is not meant to act as a source-versioning system.
Secondly, I wouldn't want to keep each and every version I (try to) compile. It would clutter up the versions that do matter.
Also, I think it is a good thing that check-outs/check-ins are something you have to explicitly think about. Makes young developers more aware of the 'software-cycle'.
Finally, it doesn't provide any sort of locking mechanism, so you can overwrite other peoples' changes.
Re: PL/SQL Code Prevent overwrite [message #329197 is a reply to message #327966] Tue, 24 June 2008 08:26 Go to previous messageGo to next message
Kevin Meade
Messages: 2103
Registered: December 1999
Location: Connecticut USA
Senior Member
all true. Still, I did say it was a crude method. And if in fact you are looking at some kind of SOX source code management, a database centric solution would have to trap every attempt to change code in a production environment.

I don't use it myself. But it does seem interesting. Suggests too that oracle will be comming out with some kind of RDBMS enhancement to do it one of these days, assuming I have not missed it in either the 10g or 11g releases.

I like most what you said about, giving younger developers more appreciation of the software lifecycle. Wish they taught me this kind of stuff in school. For all I know they did and I was just too inexperienced to appreciate it.

Thanks, Kevin
Re: PL/SQL Code Prevent overwrite [message #330184 is a reply to message #327966] Fri, 27 June 2008 16:13 Go to previous messageGo to next message
coleing
Messages: 213
Registered: February 2008
Senior Member
I beleive in 11g you can have unlimited flashback on a table, so that would go for the sys tables as well I presume, so it probably already has it.
Re: PL/SQL Code Prevent overwrite [message #330196 is a reply to message #329076] Fri, 27 June 2008 19:35 Go to previous message
ehegagoka
Messages: 493
Registered: July 2005
Senior Member
the problem arise when we had this package which just contains procedures which has a out parameter of a ref cursor, this cursors are then used by in-house software which reads that cursor then produces it to a "report view". the problem is that other developers are also using that package to modify their own procedures in there from time to time, so there are instances that over-writing occurs. since we can't have a concrete solution for that now, we just tried now moving some of the procedures to a schema level, also for the new procs added. thanks again for the replies =)
Previous Topic: PL/SQL Developer Debugging Hangs
Next Topic: Regarding Power Builder
Goto Forum:
  


Current Time: Sun Dec 22 15:07:10 CST 2024