- Community Home
- >
- Servers and Operating Systems
- >
- NonStop Servers
- >
- How do i load data from one table to a duplicate i...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2023 01:01 PM
08-25-2023 01:01 PM
How do i load data from one table to a duplicate in SQL/MP?
I know the what the table/partition specifications are and have built a copy of the table. Now trying to load the data from the original table to the copy. when i run the load, partition 0 gets data but all other partitions are empty. I am confused on figuring out the Firstkey parameters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 10:52 PM
08-28-2023 10:52 PM
Re: How do i load data from one table to a duplicate in SQL/MP?
Hi,
Was there any error code or message that was displayed?
There are couple of articles for your help.
https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=c02132125
https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=c02148175
https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=c02132113
Thank You!
I work with HPE but opinions expressed here are mine.
HPE Tech Tips videos on How To and Troubleshooting topics
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2023 07:55 AM - last edited on 08-29-2023 09:45 PM by Sunitha_Mod
08-29-2023 07:55 AM - last edited on 08-29-2023 09:45 PM by Sunitha_Mod
Re: How do i load data from one table to a duplicate in SQL/MP?
I have looked at those documents. However that really doesn't explain or help.
Here is what the definition for the primary key is:
PRIMARY KEY ( PART_ID ASC
, RTLR_ID ASC
, STORE_ID ASC
, TERM_ID ASC
, TRAN_SEQ_NUM ASC
, TRAN_DATE DESC
, TRAN_TIME DESC
)
example of the 1st secondary partition
PARTITION ( $STR44.JTT10S36.S36ORD
CATALOG $STR1.SQ94LIB
EXTENT (5000, 5000) MAXEXTENTS 915 FORMAT 2
FIRST KEY (10)
example of the load statement i am trying to use for primary and 1st secondary partition
LOAD $STR41.PTT10S36.S36ORD,$STR41.JTT10S36.S36ORD,EMPTYOK,SORTED,PARTONLY,MOVEB
YNAME,SLACK 5;
LOAD $STR41.PTT10S36.S36ORD,$STR44.JTT10S36.S36ORD,EMPTYOK,SORTED,PARTONLY,
FIRST KEY (10) ,MOVEBYNAME,SLACK 5;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 02:16 AM
10-12-2023 02:16 AM
Re: How do i load data from one table to a duplicate in SQL/MP?
@JohnBresina wrote:I know the what the table/partition specifications are and have built a copy of the table. Now trying to load the data from the original table to the copy. when i run the load, partition 0 gets data but all other partitions are empty. I am confused on figuring out the Firstkey parameters.
Good day!
When you create a duplicate table and want to load data from the original table into the copy, you need to ensure that the data is distributed correctly across the partitions in the copy. To do this, you typically use the FIRSTKEY and FIRSTINDEX options when defining your partitions and when performing the load operation.
Here's a step-by-step guide on how to load data from one table to a duplicate in SQL/MP:
1. Create a Duplicate Table>> Ensure that you have already created a duplicate table with the same structure as the original table. You can create the table using the CREATE TABLE statement.
2. Partition the Duplicate Table>> If the original table is partitioned, you should partition the duplicate table in a similar way. Use the same partitioning criteria (e.g., a range of values) or follow the original table's partitioning logic.
For example, if the original table is partitioned by date, you should create partitions in the duplicate table with the same date ranges.
3. Load Data>> When loading data from the original table into the duplicate table, use the FIRSTKEY and FIRSTINDEX options to specify how data should be distributed across partitions in the duplicate table. These options are crucial for ensuring data is correctly loaded into all partitions.
The FIRSTKEY parameter defines the partitioning key column that determines how data is distributed across partitions. This column's values in the original table should match the values in the duplicate table's partitioning key column.
The FIRSTINDEX parameter specifies the target partition number in the duplicate table. It should correspond to the partition number in the original table for that data.
For example, if the original table is partitioned by date, and you are copying data for a specific date range, you would specify the appropriate date in the FIRSTKEY and the corresponding partition number in FIRSTINDEX.
Here's an example of a LOAD statement with FIRSTKEY and FIRSTINDEX:
LOAD FROM original_table
INSERT INTO duplicate_table
WITH (FIRSTKEY=date_column, FIRSTINDEX=3)
WHERE date_column BETWEEN '2023-01-01' AND '2023-12-31';
In this example, we are loading data from the original table to the duplicate table, and we specify that the date_column is the partitioning key. We want the data to go into partition 3 of the duplicate table. Adjust the values accordingly based on your specific partitioning scheme.
By correctly setting the FIRSTKEY and FIRSTINDEX parameters, you ensure that data is distributed across partitions in the duplicate table as it was in the original table.
Hope this helps! Let me know...