Difference between revisions of "Migrating Schema Changes Between Systems"

From SDU
Jump to: navigation, search
m (Schema Changes moved to Migrating Schema Changes Between Systems: Already had a Schema Changes Category. The basis for this document is to detail the procedures for migrating schema changes.)
m
Line 1: Line 1:
== Migrate from development to test/production environment ==
+
__NOTOC__
This is deeply described in Modification Guide, but it that routine you must run Web Screen Painter on the destination production server. Here is step by step manual how to do unattended replication:
+
[[Category:Customizations]]
 +
[[Category:r11]]
 +
[[Category:Schema Changes]]
 +
{{Global Header}}
 +
{{Global Announcement}}
  
# On devel environment open Web Screen Painter and using Schema Designer make your required changes
+
== Overview ==
# Save all changes
+
This article provides instructions for setting up an unattended replications.  
# Select File - Save and Publish in Schema Designer
+
# Extract wspcol and wsptbl tables
+
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
+
# Copy these files from source to destination environment ''(can be done in unattended patch)''
+
## [[$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 ''(extracts from previous step)''
+
## wspcol.txt ''(extracts from previous step)''
+
# On the destination server run
+
pdm_load -if wsptbl.txt
+
pdm_load -if wspcol.txt
+
# Stop Service Desk
+
# Run pdm_publish
+
# Run Service Desk
+
  
=== Optional Steps ===
+
== 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.
 +
 
 +
=== 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_load -if wsptbl.txt
 +
pdm_load -if wspcol.txt</source>
 +
 
 +
=== Step 5. Publish Schema changes ===
 +
{{R11 Publish Schema Change}}
 +
 
 +
== Optional Steps ==
 
If you want to save SCH and MOD changes in your own file with better name, follow these steps:
 
If you want to save SCH and MOD changes in your own file with better name, follow these steps:
 
# Copy content of wsp.mods file to some *.mod in [[$NX_ROOT]]/site/mods/majic
 
# Copy content of wsp.mods file to some *.mod in [[$NX_ROOT]]/site/mods/majic

Revision as of 19:44, 18 September 2008

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 setting up an unattended replications.

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.

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_load -if wsptbl.txt pdm_load -if wspcol.txt</source>

Step 5. Publish Schema changes

Follow these steps for publishing the schema changes:

  1. Save and Publish your Schema changes
  2. Stop the Service Desk service
  3. Run pdm_publish from a command line
  4. 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