Friday, October 19, 2012

Upgrading a RedPrairie(tm) Environment - The right way

How should we approach a RedPrairietm WMS (DCS) upgrade - from a technical perspective?  Should I put the CD in and let the installer's upgrade do the magic?  In this post I will explain my perspective on this.  My approach is as follows:
  1. Never use the RedPrairietm installer's upgrade option
  2. Always do a new install into an empty database
  3. Then use the RedPrairie provided upgrade script.

Why not use the installer's upgrade option?

This is a general suggestion for all products that when we are approaching an upgrade, at that time we must keep in mind the possibility that the upgrade may fail.  If and when it fails, we want to be able to quickly fall back to the previous version.  Upgrades also take some time and during that time we do not want the environment to be unavailable.  When troubleshooting an upgrade, it is important to understand if the issue is with the upgrade or with the install itself.

How are RedPrairietm upgrade scripts organized?

Every sub-product in RedPrairietm; for example MOCA, MCS, SAL, DCS, etc. has a "db" sub-folder and within that we have following sub-folders:

FolderDescription
ddlDDL scripts for creating tables, indexes, sequences
datamload and slexp files
UpgradeThis folder has multiple sub-folders based on versions that contain scripts to upgrade the database

When we are doing a new install the scripts from "ddl" folders are used to create the objects.  When we are doing an upgrade the scripts from the "upgrade" folder are used.  So we definitely have two separate code paths.

If you look at this folder, you will also notice that by definition you should be able to upgrade from any version to the latest version.  So if someone is trying to go from 2005 to 2012.1.4 - that should work.  You should not have to go through intermediate versions.  Unfortunately sometimes RedPrairietm does not keep them straight so we run into issues.  For example what could happen is that say 2008 to 2009.1.4 upgrade scripts had an issue - but understand that RedPrairietm product group is working on 2010 version at that time as well.  So what should have happened is that the fix to the upgrade scripts should have been merged to with the active development branch - but it is possible that it was not done.  In such cases you may have to go through intermediate versions - but from an architecture standpoint that was not needed.

What is the "RedPrairietm provided upgrade script"?

If you go to the RedPrairie environment folder (parent directory of %MOCADIR%), it has a folder called "install" and then a subfolder "database".  In version prior to 2010, there was a "dupgrade.pl".  Now we have a "dbupgrade.jar".  This script is responsible for going through all the sub-products and running all the upgrade scripts.  Those upgrade scripts will create new tables, modify existing tables, and change data as needed.  The installer also runs this same script to do the upgrade.


How does RedPrairietm determine the current version?

Every sub-product has a special table called [product]_dbversion; for example moca_dversion, dcs_dbversion, etc.  This table has a single column and single row that has the exact version that this database was create with or upgraded to.  The upgrade scripts look at this version and compare to the current version (as reported by, for example, "list library versions") and figures out which upgrade directories to process.  When it is done with the upgrade process it updates this table.

Why install to an empty database first?

As we can see that upgrade is a different code path, installation will most likely have a better chance of success than an upgrade.  Then we will have a clean database to compare an upgraded environment to.  For example in one case when I upgraded from 2008 to 2012.1.4 there were over 1000 differences between that database and a clean database.  If I did not have a clean database to compare to, I would be constantly fighting battles to figure out what is going on.  Before any testing starts we should compare the upgraded schema to this clean schema and make sure it is ok.

I recommend that this pristine environment is kept permanently.  This provides a place where we can check if the issue is due to a customization or is in standard code.  If we are able to reproduce an issue in the standard code it will be much easier to obtain support from RedPrairietm.

So the exact steps are:

  1. Create an empty database.  I always call them with embedded version#, e.g. PRSWM201214.  "PRS" stands for pristine.
  2. Run the installer and choose "new" install.  Name it differently from the other environment on this server.
  3. Install this into the newly created database.
  4. Load the base data as well
  5. Check to make sure the instance looks good
  6. Now change the "registry" and point the "database" settings to the database that you want to upgrade.
  7. Run the dbuprade from the command line
    1. If version is less than 2010, run "perl -S dbupgrade.pl"
    2. If version is after 2010, run "java -jar dbupgrade.jar"
  8. Change the port in the registry if you want the existing clients to not change their connection.
You can choose some other variants to this approach as well, e.g.
  • In step #6, do not point to exactly the same database but a copy of it.  This way you could keep both the old environment and the new environment running in parallel.  In this case in step #8 if port in the  registry for the new environment is changed, also change it in the old environment.
  • You could install it twice one to keep the pristine environment running and one to upgrade.  This may not be necessary because it is very easy to create new environment from the same install - I will explain that in a separate blog post.

Conclusion:

RedPrairietm solutions are very intuitive once we understand the concepts and details behind them.  By taking this simple approach the task of upgrading will become simpler and more importantly if when the first attempts to upgrade fail we would not have created a mess for existing environments.





11 comments:

  1. I agree and follow a similar process for the TMS side of things also...

    ReplyDelete
    Replies
    1. As a newbie to crypto, I lost a lot of money up to $170,000 I would like to express my gratitude to Innovations recovery Analyst for their exceptional assistance in recovering my funds from a forex broker. Their expertise and professionalism in navigating the complex process were truly commendable. Through their guidance and relentless efforts, I was able to successfully retrieve my funds of $170,000, providing me with much-needed relief. I highly recommend them on - INNOVATIONSANALYST@ GMAIL. COM or Message + 1 424 285 0682 to anyone facing similar challenges, as their dedication and commitment to helping clients are truly impressive. Thank you, for your invaluable support in resolving this matter.















      As we can see that upgrade is a different code path, installation will most likely have a better chance of success than an upgrade. Then we will have a clean database to compare an upgraded environment to. For example in one case when I upgraded from 2008 to 2012.1.4 there were over 1000 differences between that database and a clean database. If I did not have a clean database to compare to, I would be constantly fighting battles to figure out what is going on. Before any testing starts we should compare the upgraded schema to this clean schema and make sure it is ok.

      Delete
  2. JDA WFM Consultants are usually the ones who have to worry about RedPrairie software and it's upgrades. This software is a crucial part of warehouse management. In order to properly optimize your supply chain the software you integrate must be updated as often as possible.

    ReplyDelete
  3. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in RedPrairie, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on RedPrairie. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com



    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. I long does it usually take to install and configure a single instance of RedPrairie without any warehouse specific modification?

    ReplyDelete
  6. Aceasta a fost o mare binecuvântare în viața mea. Faptul că l-am cunoscut pe Dr. Reethesh a fost unul dintre cele mai bune lucruri care mi s-au întâmplat vreodată. Iubitul meu s-a întors la mine după ce am apelat la ajutorul Dr. Reethesh. El a ajutat la eliminarea influenței negative a unei terțe persoane care ne afecta relația. Astăzi, soțul meu mă iubește din nou, iar relația noastră a fost restabilită. Sunt cu adevărat recunoscătoare pentru sprijinul și îndrumarea primite în această perioadă dificilă. Vă mulțumesc, Dr. Reethesh, pentru că ați ajutat la readucerea fericirii în viața mea. Recomand cu căldură să luați legătura cu el pentru a vedea dacă îndrumarea sa vă poate ajuta și pe dumneavoastră. WhatsApp +2349012999010 sau reethesh60@gmail.com

    EL LUCREAZĂ ȘI LA MULTE ALTE CAZURI, PRECUM:

    Vrăji pentru a deveni faimos
    Vrăji pentru o dezvoltare extraordinară a afacerii
    Vrăji pentru a obține un loc de muncă
    Vrăji pentru a găsi un soț
    Vrăji pentru a câștiga un proces în instanță
    Vrăji pentru a scoate persoanele dragi din închisoare
    Vrăji pentru promovare la locul de muncă
    Vrăji de protecție
    Vrăji pentru câștig la loterie / Vrăji pentru a rămâne însărcinată

    ReplyDelete
  7. Mulțumiri DR. WALE. Căsnicia mea fericită se transforma în tristețe. Totul mergea prost între mine și soțul meu. Eram frustrată și nu știam ce să fac. Soțul meu m-a părăsit pentru o altă femeie. Am făcut tot ce mi-a stat în putință să-l recâștig, dar totul a fost în zadar. Abia după ce cumnatul meu mi-a spus să-l contactez pe DR. WALE, mi-a spus că doar DR. WALE mă va putea ajuta să-mi recuperez soțul. L-am contactat pe DR. WALE și i-am povestit tot ce se întâmplă în căsnicia mea. Mi-a spus să-i trimit soțului meu o poză și a mea și alte câteva lucruri. Am plătit și pentru materialele necesare pentru a face vraja. DR. WALE mi-a spus că în trei zile soțul meu se va întoarce la mine. Spre cea mai mare surpriză a mea, soțul meu s-a întors două zile mai târziu. DR. WALE este cel mai bun vrăjitor. Dacă aveți nevoie de ajutor cu oricare dintre iubiții voștri, DR. WALE este omul potrivit de contactat. Îl puteți contacta prin WhatsApp SAU Viber: +2347054019402 SAU Email: drwalespellhome@gmail.com

    ReplyDelete
  8. Pe când eram însărcinată, nu am știut nicio clipă că soțul meu și bona aveau o aventură. Nu am bănuit niciodată că așa ceva se întâmpla pe la spatele meu. Ceea ce am observat a fost că bona îmi ignora constant deciziile ori de câte ori încercam să o corectez; se uita la mine cu dispreț și nu-mi lua niciodată cuvintele în serios. Situația a continuat așa. Într-o zi, am încercat să o întreb despre comportamentul ei necorespunzător în casă, dar, înainte să apuc să spun ceva, a explodat, cerându-mi să nu-i mai pun la îndoială acțiunile. În acel moment, mi s-a încețoșat privirea, iar ea m-a împins violent. Când soțul meu s-a întors de la serviciu, i-am povestit ce s-a întâmplat, dar el nu a făcut nimic. Când am încercat să-mi susțin punctul de vedere, soțul meu și bona m-au atacat. Apoi, soțul meu a intrat în camera noastră, mi-a făcut bagajele și m-a dat afară din casă, spunându-mi că nu mai este interesat de mine. Am plecat din casă plângând și suferind, întrebându-mă unde a greșit totul. Anterior, citisem pe internet despre un anume DR REETHESH, care primise recenzii foarte bune. I-am luat numărul de telefon și i-am explicat prin ce trec. Mi-a cerut să plătesc pentru materialele necesare, lucru pe care l-am făcut. DR REETHESH a efectuat un ritual spiritual și a descoperit că bona punea o substanță malefică în mâncarea și apa soțului meu, cu scopul ca acesta să se poarte urât cu mine și să mă alunge de acasă. Din fericire, DR REETHESH mi-a sărit în ajutor. Bona a fost demascată, iar planurile ei diabolice au eșuat. Astăzi, soțul meu și cu mine ne-am întâmpinat copilul și trăim din nou fericiți împreună. Vă sfătuiesc să luați legătura cu DR REETHESH dacă aveți probleme care vă frământă. Îl puteți contacta prin WhatsApp la +2349012999010 sau prin e-mail la reethesh60@gmail.com

    ReplyDelete
  9. M-am căsătorit în anul 2020, iar totul mergea de minune. Din căsnicia noastră au rezultat doi copii minunați. Trăiam fericiți, ca o familie unită. Însă, iată cum lucrurile au început să ia o întorsătură neplăcută: am fost transferat într-un alt oraș pentru o misiune specială. În orașul respectiv, petreceam de obicei trei sau patru săptămâni înainte de a mă întoarce acasă, la familia mea. După patru-cinci luni, am început să observ un comportament ciudat din partea soției mele, de fiecare dată când mă întorceam acasă. Ea mi-a spus că nu mai putem continua căsnicia. Am făcut niște investigații și am descoperit că soția mea începuse o relație cu un alt bărbat, pe ascuns. Am fost șocat când am aflat adevărul, cu ajutorul lui DR WALE. Îi sunt recunoscător lui DR WALE; el a realizat o vrajă miraculoasă datorită căreia soția mea s-a întors la mine și la copii. Dacă mariajul sau relația voastră nu este stabilă, vă sfătuiesc să-l contactați pe DR WALE chiar astăzi pentru a găsi cea mai bună soluție și a obține rezultatul pe care îl meritați. Îl puteți contacta pe DR WALE prin WhatsApp/Viber la numărul +2347054019402 sau prin e-mail la: drwalespellhome@gmail.com

    ReplyDelete
  10. DR REETHESH, îți mulțumesc pentru tot! Apreciez enorm toate lucrurile bune pe care le-ai făcut pentru familia mea. Dacă nu ați fi fost dumneavoastră, nu aș fi fost aici astăzi. Vă mulțumesc că l-ați ajutat pe tatăl meu să se pună din nou pe picioare. Vă mulțumesc că l-ați vindecat pe tatăl meu după accidentul vascular cerebral care aproape că i-a curmat viața. De asemenea, vreau să vă mulțumesc că ne-ați ajutat să identificăm persoana care se opune progresului familiei noastre. Vă mulțumesc și pentru că ați ajutat-o ​​pe verișoara mea și pe soțul ei să se împace. După o lungă separare, astăzi sunt din nou împreună și fericiți. Vreau să vă mulțumesc și pentru că l-ați ajutat pe fratele meu să câștige cel mai mare premiu la loterie; l-ați ajutat să obțină cea mai mare sumă de bani din viața lui. DR. REETHESH, vă sunt recunoscătoare și pentru ajutorul uriaș acordat prietenei mele în câștigarea unui proces. Prietena mea aproape că renunțase, dar ați intervenit dumneavoastră și ați făcut o minune; judecătorul a decis totul în favoarea ei. Și eu vă voi fi veșnic recunoscătoare pentru ziua în care v-am întâlnit. Mi-ați adus soțul înapoi și l-ați ajutat să obțină un contract de muncă pe care își dorea foarte mult să-l primească. Vă mulțumesc pentru toate minunile extraordinare pe care le-ați săvârșit în viața familiei mele. Și dumneavoastră îl puteți contacta pe DR. REETHESH pe WhatsApp, la numărul +2349012999010, sau prin e-mail la reethesh60@gmail.com

    ReplyDelete