Mapping Vantage Errors to SQLSTATE Codes | Teradata Vantage - Mapping Teradata Database Error Messages to SQLSTATE Values - Advanced SQL Engine - Teradata Database

SQL Stored Procedures and Embedded SQL

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
xqq1557098602407.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1148
lifecycle
previous
Product Category
Teradata Vantage™

The following table lists Teradata Database return codes mapped to their corresponding SQLSTATE code, except for successful completion of an SQL request with warning code = 0, which returns the SQLSTATE code ‘00000’.

For any return codes not listed in this table, Teradata Database sets SQLSTATE to a character string in the format of the literal character T (LATIN CAPITAL LETTER T) followed by the 4-digit return code in the Success, Failure or Error parcels.

The mapping of the following Teradata Database codes to the SQLSTATE codes listed below is not consistent with IBM DB2. DB2 uses class 37, which applies only to dynamic SQL. Code 2A applies to static SQL:
  • 3527
  • 3529
  • 3530
  • 3568
  • 3582
  • 3617
  • 3627
  • 3628
  • 3704
  • 3731
  • 3733
  • 3751
  • 3759
  • 3760
  • 3775
  • 3789
  • 3816
  • 3817
  • 3818
  • 3820
  • 3821
Teradata Database Error Message SQLSTATE Code Teradata Database Error Message SQLSTATE Code
Class Value Subclass Value Class Value Subclass Value
2147 53 018 2149 53 018
2161 22 012 2162 22 012
2163 22 012 2164 22 003
2165 22 003 2166 22 003
2232 22 003 2233 22 003
2239 22 003 2240 22 003
2450 40 001 2603 53 015
2604 53 015 2605 53 015
2606 53 015 2607 53 015
2608 53 015 2614 22 003
2615 22 003 2616 22 003
2617 22 003 2618 22 012
2619 22 012 2620 22 021
2621 22 012 2622 53 015
2623 53 015 2631 40 001
2661 22 000 2662 22 011
2663 22 011 2664 54 001
2665 22 007 2666 22 007
2674 22 003 2675 22 003
2676 22 012 2679 22 012
2680 22 023 2682 22 003
2683 22 003 2684 22 012
2687 22 012 2689 23 502
2700 23 700 2726 23 726
2727 23 727 2728 23 728
2801 23 505 2802 23 505
2803 23 505 2805 57 014
2827 58 004 2828 58 004
2843 57 014 2892 01 003
2893 22 001 2894 24 894
2895 24 895 2896 24 896
2938 00 000 2980 23 505
3002 46 000 3003 46 000
3004 46 000 3006 08 T06
3007 08 T07 3014 46 000
3015 46 000 3016 46 000
3023 46 000 3025 08 T25
3026 46 000 3110 00 000
3111 40 502 3120 58 004
3121 02 000 3130 57 014
3504 53 003 3509 54 001
3513 00 000 3514 00 000
3515 52 011 3517 52 011
3518 54 008 3519 52 010
3520 22 003 3523 42 000
3524 42 000 3526 52 004
3527 42 015 3528 22 012
3529 42 015 3530 42 015
3532 53 021 3534 52 010
3535 22 018 3539 52 004
3540 54 001 3541 57 014
3543 57 014 3545 42 502
3554 53 003 3556 54 011
3560 52 011 3564 44 000
3568 42 507 3569 56 003
3574 56 003 3577 57 014
3580 53 015 3581 53 015
3582 42 582 3597 54 001
3604 23 502 3606 52 001
3609 54 001 3617 42 015
3622 53 019 3627 42 507
3628 42 507 3629 54 001
3637 53 005 3638 57 014
3639 53 018 3640 53 018
3641 53 021 3642 53 021
3643 53 019 3644 53 019
3653 53 026 3654 53 025
3656 52 004 3659 53 008
3660 53 015 3661 57 014
3662 53 015 3663 53 015
3669 21 000 3702 54 001
3704 42 506 3705 54 001
3710 54 001 3712 54 001
3714 54 001 3721 24 721
3731 42 501 3732 0A 732
3733 42 514 3735 01 004
3737 01 004 3738 01 004
3741 54 001 3744 52 010
3747 01 003 3751 42 504
3752 22 003 3753 22 003
3754 22 003 3755 22 003
3756 22 012 3757 22 003
3758 22 003 3759 42 504
3760 42 503 3775 42 506
3789 42 514 3801 52 010
3802 52 004 3803 52 010
3804 52 010 3805 52 010
3807 42 000 3809 52 002
3810 52 003 3811 23 502
3812 42 000 3813 42 000
3816 42 505 3817 42 505
3818 42 505 3819 53 015
3820 42 505 3821 42 505
3822 52 002 3823 53 007
3824 52 004 3827 56 021
3829 56 021 3833 56 021
3848 52 006 3850 54 001
3851 54 001 3856 42 501
3857 53 015 3858 42 501
3865 42 501 3866 42 501
3867 54 001 3872 56 003
3880 42 501 3881 42 501
3883 53 003 3885 52 001
3889 42 514 3896 54 001
3897 58 004 3919 54 011
3968 42 968 3969 42 969
3970 42 970 3971 42 971
3973 42 973 3974 42 974
3975 42 975 3976 53 030
3977 42 977 3978 42 978
3979 42 979 3980 42 980
3981 42 981 3982 42 982
3989 01 001 3990 42 990
3991 42 991 3992 42 992
3993 42 993 3994 42 994
3995 42 995 3996 22 001
3997 22 019 3998 22 025
3999 01 999 5300 42 J00
5301 42 J01 5302 52 009
5303 42 J03 5304 42 J04
5305 42 J05 5306 42 J06
5307 42 J07 5308 42 J08
5309 42 J09 5310 42 J10
5311 42 J11 5312 42 J12
5313 42 J13 5314 42 J14
5315 42 J15 5316 44 000
5317 23 000 5800 01 800
5758 30 758 5801 01 801
5802 01 802 5803 01 803
5804 01 804 5805 01 805
5806 01 806 5807 01 807
5808 01 808 5809 01 809
5810 01 810 5811 01 811
5812 01 812 5813 01 813
5814 01 814 5815 01 815
5816 01 816 5817 01 817
5818 01 818 5819 01 819
5820 01 820 5821 01 821
5822 01 822 5823 01 823
5824 01 824 5825 01 825
5826 01 826 5827 01 827
5828 01 828 5829 01 829
5830 01 830 5831 01 831
5832 01 832 5833 01 833
5834 01 834 5835 01 835
5836 01 836 5837 01 837
5838 01 838 5839 01 839
5840 01 840 5841 01 841
5977 30 977 5980 30 980
7593 22 593 7594 01 594
7601 20 000 7603 45 000
7604 35 000 7610 24 502
7627 21 000 7631 24 501
7632 02 000 7682 26 000
7683 07 005 9100 23 100
9101 23 101 9113 42 113
9114 22 113 9425 30 425
9127 23 127 9434 30 434
9435 22 435 9450 22 435