-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DB2 API is returning error -2546 #48
Comments
The SQL code descriptions are all available online, or through the Db2 command line processor (CLP). https://www.ibm.com/docs/en/db2/11.5?topic=messages-sql2500-sql2749#sql2546n
|
Thanks! for this. Any guess why restore API is giving an error? Actually, restore on the source machine is working but whenever we are trying to restore the same backup image on the destination machine it fails with a -2546 error. We are using the same db2 version on the source and destination machine but AIX's service pack level/Technology level is different. Source machine oslevel -r 7200-03 Is this error coming because OS level is not the same on both AIX machines? |
It means what the message says, that if you've created a backup that is split into multiple pieces (multiple paths, storage manager sessions, tapes, etc.) then the image numbered In a trivial example, like this, it can be recreated by specifying paths out of order:
|
Thanks! but this issue is coming when we are using DB2 C API to restore for command-line backup. Command-line backup and command-line restore are working perfectly. The issue is only with restore API when trying to restore the command-line backup using DB2 C API. Do I need to add a special flag for restoring through db2 C API? |
The Db2 command line (CLP) uses the same APIs so it's definitely possible to do this successfully. What are your API parameters, how many sequences (backup image files) do you have, and where do they reside? |
In API Parameters I am giving below things. DB2 version(11.1.0.0), db2RestoreStruct and sqlcode. I am splitting the backup image into 2 parts and they reside on some storage machine. |
It will help if you can be even more specific. How are you filling out the fields of the Those structures and parameters should point to the location of your backup image(s), and the order in which the paths are listed matters as it ensures that backup image sequence .001 can be found first by the restore utility. |
Thanks! will check it |
I am trying to perform redirected restore and restore API is returning sqlcode -2546 on the AIX 7.2 environment. I am passing db2 version 11.1.0.0 to the API while restoring. I am running on db2 version DB2 v11.1.1.1.
I am not sure why restore API is returning -2546 error on the AIX environment. Also, I could not see what is error code -2546. Can you please help me to resolve this?
FUNCTION: DB2 UDB, database utilities, sqludMRResponse, probe:1136
DATA #1 : Sqlcode, PD_TYPE_SQLCODE, 4 bytes
-2546
DATA #2 : Hexdump, 0 bytes
Object not dumped: Address: 0x0A0002001AC6E6B0 Size: 0 Reason: Zero-length data
The text was updated successfully, but these errors were encountered: