Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 452
  • Last Modified:

Version Control for Oracle Database objects


We recently installed Microsoft Team Foundation Server(TFS) and we would like to use for Version Control of the source code for the Oracle Database objects.
Am kind of new to this whole process. I understand that we will have to checkout the previous version and check-in the latest one.

Can someone guide me how we can put packages in the TFS. Do we have to put the package specification and package body together as a script or each of it seperately.

I have this question because..
Eg:    What if I have added some public variables in the package spec and that variable is not being used in package body.. then can I check-out only the  package spec not the package body.

Another qn: If I make changes in the procedures in package body, can I check in script the package body only.. for this to happen, do I have to maintain procedures/functions in the package bodies separately or should I maintain the whole package body script together.



Your valuable suggestion is appreicated. Please help. Quick reply is appreciated!
0
d27m11y
Asked:
d27m11y
1 Solution
 
BawerCommented:
I am using VSS for the control, don;t have exp  on TFS, as far as objects are concerned, you need to keep all objects separately this is only to keep better tracking, specs and bodies shall be separate and other objects procedure, functions, triggers shall be separate. Also create a proper comment list while making any change to objects, and maintain date wise including the name of the admin doing the change and the purpose.
0
 
ajexpertCommented:
We combine the package specs and package body in a single .sql file.  No matter, if we change package specs or body, the whole object is checked out and checked in.

I believe this is the best way to maintain the consistency.

HTH
0
 
d27m11yAuthor Commented:

Thanks all for the response.

@Bawer:
If I make a change in the procedure in the package body, do I have to checkout and check-in the spec and body of the package. Please suggest!

0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
swadhinrayCommented:
@d27m11y: yes you need to check-in and out if you make any changes in your package body
0
 
BawerCommented:
If you are making changes in p-body its not necessary to make changes in package unless required. I hope i understood you question properly.
0
 
d27m11yAuthor Commented:

@Bawer:

If I make changes only in one of the procedures in the package body and not in package spec, do I have to check-in and check-out both the spec and body to maintain consistency across versions and compile..

Please suggest!
0
 
AkenathonCommented:
You don't have to mess with the spec if you only change something in the body. One of the advantages of using packages is precisely that: you can change the implementation (i.e. body) without invalidating dependent objects if you don't change the interface (i.e. specification). Of course, you must only compile the body in the DB... if you compile the spec everything will get invalidated :-)
0
 
BawerCommented:
Seems to be my earlier reply is not posted properly due to internet issues,

Regarding the last questions its not required to do C-in and C-out of spec in order to maintain the consistency as changing the required unit shall have the check-in and check-out so you can have proper records, if you do for dependent objects even those have not received any change then simply it will be confusing.
0
 
d27m11yAuthor Commented:
Resolved the issue!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now