0

I have a question that you guys may have an answer to. At our project we have to test our functionality with different types of data (in this case, converted data) and to do that, we produce test data (anonymized production data) where we simulate a real conversion of data. To transfer the data from our physical environment onto the testers environment we are currently using a Jenkins pipeline, which copies our instance of Oracle and deploys it onto the test environment.

This method has proven error prone and tedious for various reasons, which is why we are investigating an alternative method. This is where you come into the picture.

Do some of you have experience with creating PKG's that can automate the creation and deploy of data using the "Cart" in Oracle?

As I understand the Cart just creates my test data as INSERT statements, but I would like to know if this process could be done in a PKG as to automate the process and just call this PKG when having to copy and deploy the data for testing.

Any help on the subject would be greatly appreciated.

// Daniel

William Robertson
  • 15,273
  • 4
  • 38
  • 44
  • What do you mean by package, a plsql one or something for Jenkins? – thatjeffsmith Apr 22 '20 at 11:51
  • 1
    What is "Cart"? PKG? is someting in PL/SQL language? – alvalongo Apr 24 '20 at 01:57
  • When I write PKG i mean "plsql stored procedure". @thatjeffsmith has a good blog on where you can find information on the CART, but basically it's a UI "shopping cart" where you can drag'n'drop table across schemas and db's and use that to create INSERT statements or just copying it to another destination. Super handy for us when we create test data, but we would like to be able to "call" the cart and update the content automatically which I don't seem to be able to find any information on yet – Daniel Mærsk Apr 24 '20 at 06:48
  • You can call it from a bat/sh script via our cli ... But calling it from the DB via plsql isn't really a good idea – thatjeffsmith Apr 24 '20 at 11:23
  • @DanielMærsk *When I write PKG i mean "plsql stored procedure".* Procedures and packages are two different things. It is better to say clearly which one you are referring to, rather than using invented abbreviations which can cause confusion. – William Robertson Apr 26 '20 at 11:04
  • @thatjeffsmith, why is it not a good idea to call it form the DB via plsql? What do you mean when you write bat/sh? Shell script? I'm not very well into "SQLDeveloper lingo" – Daniel Mærsk Apr 28 '20 at 17:43
  • @thatjeffsmith how would that look like if I was to run a shell script updating an existing Cart run from the Command Line (which I guess you were referring to in your earlier comment. – Daniel Mærsk Apr 28 '20 at 17:56
  • SQL Developer is a java application with a GUI...asking the db to fork a OS process to run that would be less than ideal. What makes more sense is to have a shell script that uses our command line interface to do these things for you .. unfortunately you update the CART via the GUI today, save that to an XML file, then call it from the CLI. So no way to update a cart purely from the CLI – thatjeffsmith Apr 28 '20 at 20:01
  • @thatjeffsmith thank you for the clarification. It is however very unfortunate that the update can't be automated. It makes it much less of a powerful tool than we had hoped. Thank you for all the help ;) – Daniel Mærsk Apr 30 '20 at 12:57
  • updating the cart could be automated if you want to look at the XML file that represents the content of your cart – thatjeffsmith Apr 30 '20 at 13:36
  • @thatjeffsmith I have already extracted the XML file that represents this content. How would it work updating this automatically? Does the XML not only represent table, condition, DB-connection string etc.? The point is to update the content of the export from the cart and not the tables, connections, global where clauses etc. Would that still be a valid option? It would be greatly appreciated if you could provide an example of how this would work. – Daniel Mærsk May 04 '20 at 13:45
  • @thatjeffsmith would the above be possible? i.e. automating the export of data from the cart leaving the XML untouched? – Daniel Mærsk May 20 '20 at 10:06

0 Answers0