1 / 3

[Option] Debug: DB2 ON Netezza 1/3

[Option] Debug: DB2 ON Netezza 1/3. DB2 SP can run Netezza tables by Federation Server, it is for testing only. DB2. >CREATE WRAPPER ODBC; >CREATE SERVER NZSQL2 TYPE ODBC VERSION '3.0' WRAPPER ODBC OPTIONS( ADD NODE ' NZSQL ', ADD DBNAME ' LABDB ');

ulric-wells
Download Presentation

[Option] Debug: DB2 ON Netezza 1/3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. [Option] Debug: DB2 ON Netezza 1/3 DB2 SP can run Netezza tables by Federation Server, it is for testing only DB2 >CREATE WRAPPER ODBC; >CREATE SERVER NZSQL2 TYPE ODBC VERSION '3.0' WRAPPER ODBC OPTIONS( ADD NODE 'NZSQL', ADD DBNAME 'LABDB'); > create USER MAPPING FOR nzuser SERVER NZSQL2 OPTIONS ( ADD REMOTE_AUTHID 'ADMIN', ADD REMOTE_PASSWORD 'password') ; > CREATE NICKNAME nzuser.orders FOR NZSQL2.labadmin.ORDERS ; -- NZ TABLE >SELECT O_ORDERKEY, O_CUSTKEY, O_ORDERSTATUS FROM user.orders fetch first 10 rows only O_ORDERKEY O_CUSTKEY O_ORDERSTATUS ------------- ------------ ---------------- 3 123314 F ..

  2. [Option] Debug: DB2 ON Netezza 2/3 Run DB2 SP and converted Netezza SP on each NZ DB , then compare results. DB2 Netezza create or replace procedure db2ins20() p1: begin declare v_no int; set v_no = 0; while (v_no < 10 ) do set v_no = v_no+1; insert into emptest (empno) values (v_no); end while; end p1 / call db2ins20() select count(*) from emptest; CREATE OR REPLACE PROCEDURE INS20 ( ) RETURNS int LANGUAGE NZPLSQL AS BEGIN_PROC DECLARE V_NO bigint ; BEGIN V_NO :=0 ; WHILE ( V_NO < 10 ) LOOP V_NO := V_NO +1; INSERT INTO emptest (empno) VALUES (V_NO); END LOOP; END; END_PROC; >nzsql labdb -c "call ins20()" >nzsql labdb -c "select count(*) from emptest" Federation on DB2 > create USER MAPPING FOR administrator SERVER NZSQL20 OPTIONS ( ADD REMOTE_AUTHID 'ADMIN', ADD REMOTE_PASSWORD 'password') ; >CREATE NICKNAME administrator.emptest FOR NZSQL20.admin.emptest ;

  3. [Option]Debug: DB2 ON Netezza 3/3 1.Copy tables or Netezza databases -- refer to nz_migrate utility 2.Setup Federation Server between DB2 and Netezza. 3.RUN DB2 SP on LABDB2 and Netezza SP on other LABNZ 4.After running SP, compare results data sets between each Netezza database 5.RUN nz_migrate again to initiate DB or copy tables from Original DB DB2 SP Netezz SP NZ Tables LABDB1 NZ Tables LABDB2 (test) NZ Tables LABNZ (test) NZ Tables LABDB (origianl)

More Related