Difference between revisions of "Migrating Schema Changes Between Systems"

From SDU
Jump to: navigation, search
m (Reverted edits by Agegeleruvy (Talk); changed back to last version by Kowy)
 
Line 1: Line 1:
----
 
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 
----
 
=[http://ewefobyme.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
 
----
 
=[http://ewefobyme.co.cc CLICK HERE]=
 
----
 
</div>
 
 
__NOTOC__
 
__NOTOC__
 
[[Category:Customizations]]
 
[[Category:Customizations]]
Line 24: Line 16:
  
 
=== Step 2. Extract WSP Tables ===
 
=== Step 2. Extract WSP Tables ===
&lt;source lang=&quot;text&quot;&gt;pdm_extract wsptbl &gt; wsptbl.txt
+
<source lang="text">pdm_extract wsptbl > wsptbl.txt
pdm_extract -f &quot;SELECT column_name,dbms_name,description,display_name,is_cluster,is_descending,is_indexed,is_local,is_not_null,is_order_by,is_required,is_skey,is_unique,is_write_new,is_wsp,last_mod_dt,on_ci_set,on_new_default,schema_name,status,string_len,table_name,type,xrel_table FROM wspcol&quot; &gt; wspcol.txt&lt;/source&gt;
+
pdm_extract -f "SELECT column_name,dbms_name,description,display_name,is_cluster,is_descending,is_indexed,is_local,is_not_null,is_order_by,is_required,is_skey,is_unique,is_write_new,is_wsp,last_mod_dt,on_ci_set,on_new_default,schema_name,status,string_len,table_name,type,xrel_table FROM wspcol" > wspcol.txt</source>
  
 
=== Step 3. Copy Files ===
 
=== Step 3. Copy Files ===
Line 39: Line 31:
 
=== Step 4. Load Extracts ===
 
=== Step 4. Load Extracts ===
 
On the destination server run the following commands:
 
On the destination server run the following commands:
&lt;source lang=&quot;text&quot;&gt;pdm_userload -f wsptbl.txt
+
<source lang="text">pdm_userload -f wsptbl.txt
pdm_userload -f wspcol.txt&lt;/source&gt;
+
pdm_userload -f wspcol.txt</source>
  
 
=== Step 5. Publish Schema changes ===
 
=== Step 5. Publish Schema changes ===
Line 56: Line 48:
  
 
Because content of wsptbl and wspcol tables on destination server is pointless from now, we can purify these tables using this two commands:
 
Because content of wsptbl and wspcol tables on destination server is pointless from now, we can purify these tables using this two commands:
&lt;source lang=&quot;text&quot;&gt;pdm_load -rf wsptbl.txt
+
<source lang="text">pdm_load -rf wsptbl.txt
pdm_load -rf wspcol.txt&lt;/source&gt;
+
pdm_load -rf wspcol.txt</source>

Latest revision as of 05:25, 30 November 2010

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.

Overview

This article provides instructions for easily moving schema changes from one environment to another.

Procedures

Step 1. Make Schema Changes

From your source environment make the desired schema changes via the Schema Designer. Be sure to follow the proper protocol for publishing your schema changes.

Create configuration files using File - Save and Publish in Schema Designer's menu.

Step 2. Extract WSP Tables

<source lang="text">pdm_extract wsptbl > wsptbl.txt pdm_extract -f "SELECT column_name,dbms_name,description,display_name,is_cluster,is_descending,is_indexed,is_local,is_not_null,is_order_by,is_required,is_skey,is_unique,is_write_new,is_wsp,last_mod_dt,on_ci_set,on_new_default,schema_name,status,string_len,table_name,type,xrel_table FROM wspcol" > wspcol.txt</source>

Step 3. Copy Files

Copy the following files from the source to the destination environment:

  • $NX_ROOT/site/mods/majic/wsp.mods
  • $NX_ROOT/site/mods/wsp.altercol
  • $NX_ROOT/site/mods/wsp.altertbl
  • $NX_ROOT/site/mods/wsp_index.sch
  • $NX_ROOT/site/mods/wsp_schema.sch
  • wsptbl.txt (extract from previous step)
  • wspcol.txt (extract from previous step)

Step 4. Load Extracts

On the destination server run the following commands: <source lang="text">pdm_userload -f wsptbl.txt pdm_userload -f wspcol.txt</source>

Step 5. Publish Schema changes

On destination server follow these steps for publishing the schema changes:

  1. Stop the Service Desk service
  2. Run pdm_publish from a command line
  3. Start the Service Desk service

Optional Steps

If you want to save SCH and MOD changes in your own file with better name, follow these steps:

  1. Copy content of wsp.mods file to some *.mod in $NX_ROOT/site/mods/majic
  2. Copy content of wsp_schema.sch file to some *.sch in $NX_ROOT/site/mods
  3. Copy content of wsp_index.sch file to some *.sch in $NX_ROOT/site/mods
  4. Delete wsp.mods, wsp_index.sch and wsp_schema files

Because content of wsptbl and wspcol tables on destination server is pointless from now, we can purify these tables using this two commands: <source lang="text">pdm_load -rf wsptbl.txt pdm_load -rf wspcol.txt</source>