Skip to Main Content

Breadcrumb

May 4th

Question and Answer

Connor McDonald

Thanks for the question, Shibaji.

Asked: June 25, 2018 - 3:13 pm UTC

Last updated: June 26, 2018 - 3:08 am UTC

Version: Oracle 11G

Viewed 10K+ times! This question is

You Asked

Hi,

I wanted to know that if there is any way by which we can create versions of the latest copy of pl/sql stored procedures/packages each time we compile.

If yes , could you please provide a sample code for the same as currently we do not have any version control tool available for maintaining versions of pl/sql codes.

Thanks
Shibaji

and Chris said...

While most developer IDEs allow you to edit PL/SQL source code directly in the database, NEVER DO THIS!

To version control your PL/SQL, you must save your code in a file. On your computer.

Then it's up to you which source control system you use. SQL Developer integrates with SVN and git:

https://www.thatjeffsmith.com/archive/2014/06/managing-scripts-in-oracle-sql-developer/

Steven version control processes for PL/SQL further at:

https://stevenfeuersteinonplsql.blogspot.com/2016/09/plsql-101-save-your-source-code-to-files.html

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Another method

Iudith Mentzel, June 25, 2018 - 4:29 pm UTC

Hello All,

If you are interested to backup your previous versions of PL/SQL code in the database,
you can find a nice method from Connor McDonald here:

https://connor-mcdonald.com/2016/02/02/auto-backups-of-plsql-source/

Best Regards,
Iudith Mentzel

Connor McDonald
June 26, 2018 - 3:08 am UTC

Thanks for the link

Shibaji De, June 25, 2018 - 8:29 pm UTC

This seems to be an useful answer.
Connor McDonald
June 26, 2018 - 3:08 am UTC

It seems that I'm glad we could help :-)

Example with subversion in sqldeveoper

HIMANSHU KUMBRE, February 26, 2022 - 11:25 am UTC

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library