Aug 12, 2010 5:13 PM
To refresh data from one NPS system (production) to another NPS system (development)
-
Like (0)
To refresh data from one NPS system (production) to another NPS system (development) which will be easy and less time consuming method nz_backup or nz_migrate?
Note: We don’t need to migrate user / Group privileges.
nz_migrate works well and is very efficient - I've used this very successfully to do such a migration.
D.
You can selectively move tables and data using external tables (or remote external tables).
nz_migrate exports data in internal compressed format from the source system and pipes this directly to nzload processes on the target system - it automatically does this in parallel streams for large tables, and you can selectively migrate tables or schemas.
D.
Thanks for your replies.
Please share the syntax to use nz_migrate with selective tables & selective time periods?
The best thing to do is to run nz_migrate -? which will give documentation on the current available switches
D.
As David said go onto nz_migrate -h or nz_migrate -? to look for all available options. This is just a sample script I am attaching. -tuser is optional, of not suppliec it will migrate the entire database.
nz_migrate -shost <SourceHost> -thost <TargetHost> -format binary -sdb <SourceDatabase> -tdb <TargetDatabase> -suser <SourceUser> -tuser <TargetUser> -t <tableName> -threads 4 -cksum Yes -TruncateTargetTable Yes -CreateTargetTable Yes -genStats Full
In my case, I am using nzbackup (differential) to 'refresh' data from production to development. I am not sure if nz_migrate can perform 'differential'.
You cannot perform incremental (differential/cimmulative) migrate using nz_migrate. You can use nz_migrate as one time migration utility for specific or all databases.
-AmbarishDon
Well, nz_migrate can't do it out of the box, but it's just a script. Lot's of people customize it to do what they need. All of the nz uilities are scripts that you can tailor.
As David said, nz_migrate is just a script. It does already have a feature built in to supply a WHERE condition (read the documentation in the script). So it is pretty easy to build a wrapper around it that first deletes the last few weeks of data from the development system and then runs nz_migrate to recopy the last few weeks of data over to development.
Can the nz support tool kit be installed on a AIX client? We dont have access to the host..It seems like the contrib tool kit is not part of the AIX CLI package
Anybody?
It was designed to run on the host but many parts of it will work fine on another system as long as you have installed the standard Netezza client software that includes nzsql and the other commands. The nz_migrate script in particular will not work from a remote host..

