IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Loading selected portion of production database to test data


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
umed

New User


Joined: 13 May 2005
Posts: 38

PostPosted: Wed Jul 19, 2006 11:30 pm
Reply with quote

Hi,

We want to refresh our test region databse so that we can get the
image copy of production database in test region.But in this case we are not having sufficient space so that we can load complete production databse. Please let me know if there is any way to load only a small version of prod databse to test region.

Thanks in advance.

Regards,
Amol
Back to top
View user's profile Send private message
umed

New User


Joined: 13 May 2005
Posts: 38

PostPosted: Thu Jul 20, 2006 12:19 am
Reply with quote

Here suppose production database is having 10000 records I want to upload only 1000 Records in Test region so please let me know how can we achive this.
Back to top
View user's profile Send private message
Muthukumar.PLindia

New User


Joined: 03 Jul 2006
Posts: 51
Location: Chennai

PostPosted: Thu Jul 20, 2006 1:30 am
Reply with quote

Try with this query

Insert into test.table1
select * from prod.table1 fetch first 1000 rows only
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Jul 20, 2006 1:31 am
Reply with quote

Amol,

How many tables are you talking about?

Can you do a selective UNLOAD of your Production Table(s), then LOAD to the Test system?

Dave
Back to top
View user's profile Send private message
umed

New User


Joined: 13 May 2005
Posts: 38

PostPosted: Thu Jul 20, 2006 4:59 am
Reply with quote

Hi,
yes Dave ,you are absolutely right.I want to do selective unload from
Production table and then want to upload the same records to the Test database. For this time I want to do it for 3/4 tables as initial basis. But I don't want to unload all the records from the table.I want some of them so that I can fulfill the space requirement for those in Test region.

Regards,
Amol
Back to top
View user's profile Send private message
umed

New User


Joined: 13 May 2005
Posts: 38

PostPosted: Thu Jul 20, 2006 5:02 am
Reply with quote

Hi,
I think now everyone is cllear with my problem.I just want to do selective unload from production database but I don't know how to do that
Can anyone tell me that. Thanks in advance.

Regards,
Amol
Back to top
View user's profile Send private message
Hanfur

Active User


Joined: 21 Jun 2006
Posts: 104

PostPosted: Thu Jul 20, 2006 10:05 am
Reply with quote

Can't you use DSNTIUAL utility specifying PARM as SQL and give SQL to fetch only limited or sleected records..Searc this forum if you want the JCL for this.

-Han.
Back to top
View user's profile Send private message
trevor_rebelo

New User


Joined: 18 Aug 2005
Posts: 17

PostPosted: Fri Jul 21, 2006 6:29 pm
Reply with quote

Hi,

Try using the INCURSOR option in LOAD jobs...

In the Cursor give the Query which will select data from production table and load to test table...
Back to top
View user's profile Send private message
vijayamadhuri

Active User


Joined: 06 Apr 2005
Posts: 180

PostPosted: Sat Jul 22, 2006 12:33 am
Reply with quote

TRy using QMF.

u can give the data records that have to be selected using
select * from
.........

when the qury runs u can store it in u r temp database (generally would be a vsam file allocated by the dba)
as
STORE DATA AS SQL1(the query that yoy would run be would be stored in the temp database as userid.sql1.
then u run another query to insert the retreived data into test using the query as

INSERT INTO table name
(SELECT * FROM T0666VR.sql1)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts What database does Jobtrac use CA Products 4
Search our Forums:

Back to Top