versioning stored procedures/PLSQL? - stored-procedures

Is there an efficient way to version store procedures written in PL/SQL? (I only mention PL/SQL because there may exist a particular tool, any answer directed to versioning of stored procedures is ideal).

In my current job , the team is now using the following method to version control the PL/SQL .When compiling the PL/SQL , no matter compile successfully or not , a record will be inserted into the log table . Besides in the mid-night , there is an JAVA agent to be scheduled to run automatically check if the PL/SQL source needed to check into the CVS.
Update
Link to blog now is AMIS TECHNOLOGY BLOG
The following link no longer works
http://technology.amis.nl/blog/846/plsql-source-code-control-inside-the-database-after-compile-trigger-for-automatic-archiving

Can you use a 'regular' version control system? All of our deployed/deployable stored procs are controlled just like application code.
It's been a while since I've dealt with PL/SQL, so I don't have anything to offer on the package definitions.
Granted, this isn't in the database, but...

We built a tool so that we can manage our PL/SQL code in the Oracle Database. It hooks Git to the Oracle database and helps you manage your PL/SQL code base easily. You can do basic Git tasks such as commiting, resetting, branching, cloning, merging, pulling etc... and Gitora automatically updates the PL/SQL code in the database.
You can download it at www.gitora.com.

Oracle's free SQL Developer tool has integration with CVS and Subversion for version control of PL/SQL code.

Related

Respository for Datastage jobs

We are constantly doing changes to the ETL program (IBM Datastage 8.5) and mostly in the same project folder.
There are so many versions of code which confuses the developer at the point of implementation.
What I am looking for is a GitHub thingy for datastage codes..
Can the experts please assist me...
Thanks!
Datastage is pretty terrible when it comes to version control.
Different organizations use different tools to try and get some amount of version control in place.
for example
1. they would store the latest dsx of the code in a server.
2. and from there on use SVN to check in and check out the code.
3. So if you need to work on a code you would first check if anyone has checked it out if not then proceed to extract the latest version of the dsx from SVN ; check out the dsx in SVN ;
4. import and make the changes ;
5. take the export of the changed code ;
6. check it back in at SVN
I know its not a solution really but probably your best bet in large developer environment.
We have InfoSphere Information Server Manager and its available with DataStage installation .
Use InfoSphere Information Server Manager to create deployment packages for
DataStage Components .
and get any good version control Tool to maintain versions .
Example - you can use eclipse SVN Version utility
To start this process , always get latest code from LIVE Env and make the changes in Test Env Or other Env.
before deployment -
use InfoSphere Information Server Manager to create backup package of related DataStage component in Prod and get the version number for that from SVN
create the package for modified jobs and send it to Live Env with out replacing the existing or running code .
get version number for this package from SVN .
Deployment -
Use InfoSphere Information Server Manager replace the existing code with new one .
Rollback the code to previous version if any problem with new deplyment
Currently I'm using the option to export jobs as dsx files do versionate them.
So, when I need to rollback to an previous version, just use the import objects option and select the exported dsx file.
Those following this thread might be interested to know that my organisation's solution for implementing DevOps approaches with DataStage development (called 'MettleCI') has now been announced on the Atlassian Marketplace:
https://marketplace.atlassian.com/plugins/com.datamigrators.atlassian.bitbucket.mettleci/
MettleCI Website
Example of DataStage job in Git

how to migrate tasks from JIRA to TFS 2012

I have been searching the Tool(freeware) for a clean solution on how to migrate tasks from JIRA to TFS2012.
Already i try to setup tfs-jira-synchronizer setup
I've been trying to set this up on a sandbox server however when I ran the installer I didn't get the acl application file in my virtual directory.
The installer completed without errors.
I recently had to migrate from Jira to TFS.
I ended up writing my own utility to do so. I felt this was a good candidate for 'open-sourcing' so have published it on GitHub here:
https://github.com/KilskyreMan/JiraToTfs/releases
(tested against TFS Server 2012, 2013 and 2015)
Utility handles all main and custom templates, links and attachments.
Documentation can be found here: https://github.com/KilskyreMan/JiraToTfs/wiki
Hopefully this can be of use to other people in this situation.
Cheers - Ian.
Try the integration platform.
http://tfsintegration.codeplex.com/
It's buggy, hard to work with, and usually really annoying but it is your best bet.
There is also this: https://marketplace.atlassian.com/plugins/com.spartez.jira.plugins.bork.tfs4jira
for synchronizing the two systems
If you want a one-time migration of data, I don't know of a free tool for that. I'd probably start with looking at the data formats that TFS will accept, then write a tool that parses an XML backup from JIRA to create a file in a suitable format for import. You could even use the JIRA REST API to get the data but that might be slower depending on how much data you want to export from JIRA
Disclosure: at ServiceRocket we do many data migrations into JIRA each year.

Exporting Test Cases and Shared Steps

Is there any way of exporting Test Cases and Shared Steps from one project to another in TFS 2012 using database queries?
I have tried TFS Integration tool, but it did not work as I expected, so I was wondering if there is any way of doing this by connecting to SQL Server and exporting all items directly from and to the databases.
A few days ago I needed an Excel testcase export for a newer version of TFS (TFS 2013). Turns out that there is still no export to Excel function built-in to TFS (in contrast to E-Mail and Printing) and the tools became incompatible over time.
But I found this Revival-Tool that seems to work:
https://github.com/jorupp/ExportTestCases
Just wanted to point that out even if it may not be directly related to this topic with TFS2012.
You shouldn't work directly in the database, because it is not supported by Microsoft and you could harm it a lot.
I used the TFS Integration Platform tools a lot for migrating TFS2010 projects, but never used it for TFS2012. My experience with that were good and it shouldn't be a problem to migrate all Test Cases and Shared Steps into another TeamProject. If you have the same Work Item Type Definitions in both projects, you don't need to create field mappings.
Another option would be to use Excel as "Export" and "Import" cache, but you might loose some information, because not everything could be shown in Excel, e.g. Steps of a TestCase, the history, Work Item Links.
If you are skilled in programming using TFS API, you could write your own small migrator, but this could be a lot of effort.
All in all the TFS Integration Platform should be the easiest and best way, so what have been your expectations that have not been fulfilled?
You can use an alternative methods.
First export all Test cases using "Test case extractor."
Them import them in new project using "Test case import tool."
Adding to the point mentioned above, for exporting the test cases you might find the below link more useful:
http://tfstestcaseexporttoexcel.codeplex.com/
I have given it a try and found it very useful and easy to use.

Can I import version history from Serena into Team Foundation Server?

I'm really asking this on behalf of our sysadmins, so here goes:
We are moving from Serena to Team Foundation Server as our source code repository. It's a done deal (for better or worse) and I'm already aware of "no keyword expansion".
Anyway, the admins are planning to import source as version 1.0 (or whatever it uses for the first one) and forget about the history in Serena. However, it's a very large and fairly old codebase, and the loss of version history means losing a lot of information.
I have a fallback position of generating an ASCII version history files, one per module, and trying to attach them to each module in TFS. I'd much rather find a way to slam the version history in and preserve the version numbering (or something like it) once we're in TFS.
[Not answering the asked question] There's a CodePlex project out there that inserts keyword expansion to the TFS check-in process if you really want it. We use this with our SQL & PowerBuilder code and it seems to work well if you can accept a particular idiosyncrasy.
The project is Log Substitution Policy
There is a tool for migration PVCS source control data to TFS:
http://www.pvcs2tfs.com/

How to easily versioning my solutions (and keep database)?

I'm working on an ASP.NET MVC website. Each time I do important modifications, I copy/paste the entire folder of my solution and rename it something like MySolution v1.1, next time MySolution v1.2, ... In that way, I can always step back easily and keep versions. But I always have problems with the database.
Example:
I work on MySolution v1.1 with the database in the App_Data named MyDB1.mdf
I copy/paste previous version in MySolution v1.2 folder
I cannot run successfully this newly created solution because Visual Studio will try to recreate the database named MyDB1.mdf but this one already exist (in the previous folder).
I had to change database name in the connectionstring of the web.config file and clean the App_Data folder.
This is not a good way of doing things. Furthermore, I lost my data in my DB because I delete it each time.
Does someone can give me advices for versioning my different solutions?
I hope I was clear.
Thanks in advance.
I'd suggest using a revision control system, such as Subversion or Mercurial (using TortoiseHG). This way, you can just revert to a previous version of your code if you don't like the changes you made.
I encourage you to get familar with source control. This is really important and every developer should know about it.
Here some source control systems:
Subversion
GIT
Mercurial
There are other version control systems as well. Personally I prefer Mercurial.
Hope this helps!
Use version control.
If you are working in VS you can use TFS. It has good integration into it and easy to learn (free TFS for open source projects can be found on www.codeplex.com).
Also you can use GIT (www.github.com), TortoiseSVN, etc.
Also you can do versioning for Database. In this case you can store database schema in Database project or create change scripts for database.

Resources