cancel
Showing results for 
Search instead for 
Did you mean: 

SQL message: "FASTFIRSTROW" is not a recognized table hints option after SQL2012 Upgrade

AndreC1
Participant
0 Kudos

I need help solving the above mentioned error after we upgraded the database from MSSQL 2008 SP1 to MSSQL 2012. The error message suggests to place the database into compatibility mode 90, but that does not appear to work.

This was an in place upgrade of MSSQL 2008 SP1 to MSSQL 2012. We are on kernel 741 sp 42. DBSL version is 741.10, and we are on patch level 041. We followed the steps as per the upgrade process described in the upgrade guide. We ran the MSSQL setup file to upgrade MSSQL, and then ran the Database Upgrade Completion wizard in SWPM 10 SP7 to complete the upgrade. At first we thought all went fine, because we did not get any errors. During testing we found that in transaction CJ20N, when trying to open a project, we get this dump. Has anyone seen this?

I have researched the issue on SAP Notes and only found note 2020689, which basically refer you to note 1651862 for the minimum requirements to run SQL 2012. Since we are using NW 7.41, there is no minimum requirement, but even after updating the system to Kernel 742 SP28, we continued to experience the problem. We also went from ABA and Basis 740 SP7 to SP9. No joy.

Here is the dump:

Category               Installation Errors

Runtime Errors         DBSQL_SQL_ERROR

Except.                CX_SY_OPEN_SQL_DB

Date and Time          03/30/2015 11:16:13

----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------

|Short Text                                                                                        |

|    SQL error "SQL code: 321" occurred while accessing table "MLST".                              |

----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------

|What happened?                                                                                    |

|    Database error text: "SQL message: "FASTFIRSTROW" is not a recognized table                   |

|     hints option. If it is intended as a parameter to a table-valued function or                 |

|     to the CHANGETABLE function, ensure that your database compatibility mode is                 |

|     set to 90."                                                                                  |

----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------

|Error analysis                                                                                    |

|    An exception has occurred which is explained in more detail below. The                        |

|    exception is assigned to class 'CX_SY_OPEN_SQL_DB' and was not caught in                      |

|     procedure                                                                                    |

|    "CJWB_PRE_READ" "(FUNCTION)", nor was it propagated by a RAISING clause.                      |

|    Since the caller of the procedure could not have anticipated this                             |

|    exception, the current program was terminated.                                                |

|    The reason for the exception is:                                                              |

|    Database error text: SQL message: "FASTFIRSTROW" is not a recognized table                    |

|     hints option. If it is intended as a parameter to a table-valued function or                 |

|     to the CHANGETABLE function, ensure that your database compatibility mode is                 |

|     set to 90.                                                                                   |

|    Return value of the database layer: "SQL dbsl rc: 99"                                         |

----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------

|Missing RAISING Clause in Interface                                                               |

|    Program                                 SAPLCJWB                                              |

|    Include                                 LCJWBU09                                              |

|    Row                                     1                                                     |

|    Module Type                             (FUNCTION)                                            |

|    Module Name                             CJWB_PRE_READ                                         |

----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------

|Trigger Location of Exception                                                                     |

|    Program                                 SAPLCJWB                                              |

|    Include                                 LCJWBU09                                              |

|    Row                                     141                                                   |

|    Module Type                             (FUNCTION)                                            |

|    Module Name                             CJWB_PRE_READ                                         |

----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------

|Source Code Extract                                                                               |

----------------------------------------------------------------------------------------------------

|Line |SourceCde                                                                                   |

----------------------------------------------------------------------------------------------------

|  111|        ENDIF.                                                                              |

|  112|      ENDIF.                                                                                |

|  113|    ELSEIF NOT flg_pb IS INITIAL.                                                           |

|  114|      IF flg_selected = con_unknown.                                                        |

|  115|        CALL FUNCTION 'CJDW_CHANGE_PSTAB'                                                   |

|  116|          EXPORTING                                                                         |

|  117|            flg_mlstn = con_pb                                                              |

|  118|            i_no_log  = con_yes                                                             |

|  119|            index     = <tab_disp>-index.                                                   |

|  120|      ENDIF.                                                                                |

|  121|    ENDIF.                                                                                  |

|  122|  ENDLOOP.                             "at Tab_Disp                                         |

|  123|                                                                                            |

|  124|ENHANCEMENT-POINT EHP_CJWB_PRE_READ_02 SPOTS ES_SAPLCJWB_PS.                                |

|  125|                                                                                            |

|  126|                                                                                            |

|  127|*-----------------------------------------------------------------------                    |

|  128|*                  Meilensteine                                                             |

|  129|*-----------------------------------------------------------------------                    |

|  130|ENHANCEMENT-SECTION     EHP_CJWB_PRE_READ_03 SPOTS ES_SAPLCJWB_PS.                          |

|  131|  IF NOT sel_mlst[] IS INITIAL.                                                             |

|  132|    IF vs_number IS INITIAL.                                                                |

|  133|*{   REPLACE        DV1K900230                                        1                     |

|  134|*\      SELECT * FROM mlst INTO TABLE int_mlst                                              |

|  135|*\                         FOR ALL ENTRIES IN sel_mlst                                      |

|  136|*\                         WHERE pspnr = sel_mlst-pspnr                                     |

|  137|*\                         %_HINTS DB2 'use values for optimization'                        |

|  138|*\                                 DB2 '&SUBSTITUTE VALUES&'                                |

|  139|*\                                 ORACLE                                                   |

|  140|*\        'INDEX("&TABLE&" "MLST~2" "MLST^2" "MLST______2" "MLST___2")'.                    |

|>>>>>|      SELECT * FROM mlst INTO TABLE int_mlst                                                |

|  142|                         FOR ALL ENTRIES IN sel_mlst                                        |

|  143|                         WHERE pspnr = sel_mlst-pspnr                                       |

|  144|                         %_HINTS MSSQLNT 'TABLE MLST INDEX =[MLST~2AD],FASTFIRSTROW'.       |

|  145|*}   REPLACE                                                                                |

|  146|                                                                                            |

|  147|* Only select MLTX if at least one milestone was selected                                   |

|  148|      IF NOT int_mlst[] IS INITIAL.                                                         |

|  149|        SELECT * FROM mltx INTO TABLE int_mltx                                              |

|  150|                           FOR ALL ENTRIES IN int_mlst                                      |

|  151|                           WHERE mltx_zaehl = int_mlst-mlst_zaehl.                          |

|  152|      ENDIF.                                                                                |

|  153|    ELSE.                                                                                   |

|  154|      SELECT * FROM vsmlst_cn INTO CORRESPONDING FIELDS OF                                  |

|  155|                         TABLE int_mlst                                                     |

|  156|                         FOR ALL ENTRIES IN sel_mlst                                        |

|  157|                         WHERE vsnmr = vs_number             "Nt 660037                     |

|  158|                           AND pspnr = sel_mlst-pspnr                                       |

|  159|                         %_HINTS DB2 'USE OPTIMIZE FOR 1 ROWS'                              |

|  160|                                 ORACLE                                                     |

----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------

|Active Calls/Events                                                                               |

----------------------------------------------------------------------------------------------------

|No.   Ty.          Program                             Include                             Line   |

|      Name                                                                                        |

----------------------------------------------------------------------------------------------------

|    6 FUNCTION     SAPLCJWB                            LCJWBU09                              141  |

|      CJWB_PRE_READ                                                                               |

|    5 FORM         SAPLCNPB_H                          LCNPB_HF0K                            205  |

|      PROJECT_DATA_GET                                                                            |

|    4 FORM         SAPLCNPB_H                          LCNPB_HF0Y                            140  |

|      PROJECT_SELECT                                                                              |

|    3 FUNCTION     SAPLCNPB_H                          LCNPB_HU04                            183  |

|      CNPB_H_PROJ_HIER_SELECT                                                                     |

|    2 FORM         SAPLCNPB_M                          LCNPB_MF0O                            225  |

|      PROJECT_ENTRY                                                                               |

|    1 MODULE (PBO) SAPLCNPB_M                          LCNPB_MO08                             11  |

|      PROJECT_ENTRY                                                                               |

----------------------------------------------------------------------------------------------------

Accepted Solutions (1)

Accepted Solutions (1)

former_member184473
Active Contributor
0 Kudos

Hello Andre,

If you remove the FASTFIRSTROW from line 144:

original:

|  144|                         %_HINTS MSSQLNT 'TABLE MLST INDEX =[MLST~2AD],FASTFIRSTROW'.       |

replace:

|  144|                         %_HINTS MSSQLNT 'TABLE MLST INDEX =[MLST~2AD]'.       |

Do you still face this issue?

Also, this area (CJWB_PRE_READ CJ20N) is related to PS-ST-MIL in case you need to open an incident.

Regards,

Eduardo Rezende

AndreC1
Participant
0 Kudos

Thanks for the fast response. I will forward to our developers, but I do not think it is custom code. I created an incident with SAP, but under the MS SQL Upgrade area. You recommend I change that to PS-ST-MIL?

former_member184473
Active Contributor
0 Kudos

Hello Andre,

I already replied the incident.

If you change the mentioned line and the error does not occur I can forward the incident to the responsible team so they can change code.


Regards,

Eduardo

AndreC1
Participant
0 Kudos

Thanks Eduardo. The developers are looking at the problem. I will let you know what they find.

Answers (0)