cancel
Showing results for 
Search instead for 
Did you mean: 

SQL error "-727" when accessing table "CRMV_LINKCUMUL_I".

anderson_cardozo
Participant
0 Kudos

Good afternoon, SAP Gurus.

Two months ago I made homogeneous copy in sap crm with database DB2, and now show me the follow dump:

SQL error "-727" when accessing table "CRMV_LINKCUMUL_I".

Error Text of the Database: "SQL0727N An error occurred during implicit system

action type "3". Information returned for the error includes SQLCODE "-551",

SQLSTATE "42501" and message tokens "SAPP01|SELECT|SAPP01.CRMD_CUMULATED_I".

SQLSTATE=56098"

I updated sap kernel to release 721 level (600), and also update db6util file up to patch level 16.

However the dump continue.

Someone can help me about it?

Enclose picture.

Accepted Solutions (1)

Accepted Solutions (1)

anderson_cardozo
Participant
0 Kudos

Hello, thanks for your answers.

I was checking database log (db2diag.log) and found the following error:

I don´t know, how to fix this problem and the solution is urgent.

Thanks if someone, can help me

former_member264034
Active Contributor
0 Kudos

Hi,

The error you are reporting seems to be a problem in regenerating view

SAPP01.CRMV_LIST.

Can you run the following command, and attach the results?

   db2 "SELECT * from SAPP01.CRMV_LIST"

Regards,
Aidan

anderson_cardozo
Participant
0 Kudos

Hello Aidan,

I try to execute db2 "SELECT * from SAPP01.CRMV_LIST" or db2 "SELECT * from CRMV_LINKCUMUL_I" , and show me:

And I found out the view CRMV_LINKCUMUL_I is a view that is not created into system, but if I saw into delopment system this view is created.

So when i try to create through se14 transaction show me

Do you know, how can give it required authorization or privilege to user SAPQ01? to fix this error?

Former Member
martin_mikala
Participant
0 Kudos

Hi,

Try show owner and privileges for this object.

db2 "SELECT SUBSTR(OWNER,1,10) AS OWNER, OWNERTYPE, SUBSTR(OBJECTNAME,1,30) AS OBJECTNAME, SUBSTR(OBJECTSCHEMA,1,10) AS OBJECTSCHEMA, OBJECTTYPE FROM SYSIBMADM.OBJECTOWNERS WHERE OBJECTNAME LIKE 'CRMV_LIST'"

db2 "SELECT SUBSTR(AUTHID,1,20) AS AUTHID, PRIVILEGE, SUBSTR(OBJECTNAME,1,30) AS OBJECTNAME, SUBSTR(OBJECTSCHEMA,1,20) AS OBJECTSCHEMA, OBJECTTYPE FROM SYSIBMADM.PRIVILEGES WHERE OBJECTNAME LIKE 'CRMV_LIST'"

B.R.

Martin

Frank-Martin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I agree with Martin.

All database objects in an SAP ABAP database must be owned by the SAP connect user ( environment setting dbs_db6_user ). The schema of those objects may be different ( environment dbs_db6_schema ).

If some of your database objects are owned by the wrong database user a revalidation may fail.

Did you perform a system copy using backup/restore of your current database?

If you used the SAP standard tools like SWPM or SAPINST for this system copy, the ownership should have been corrected after the backup7restore by those tools.

Regards

                 Frank

anderson_cardozo
Participant
0 Kudos

Hi Frank,

I performed system copy using backup/restore, and not used sap starndard tools.

anderson_cardozo
Participant
0 Kudos

Hi, Martin and Frank,

I executed the command and to object CRMV_LIST and owner and privilegies are 0 records.

But execute with object CRMV_LINKCUMUL_I , show me:

I understand the owner is SAPQ01 and i see the privilegies are all and I tried again to execute create table or view  CRMV_LINKCUMUL_I, show me the same error: SAPQ01" does not have the required authorization or privilege.

I´m pending about you quick help.

thank you and best regards!

martin_mikala
Participant
0 Kudos

Hi,

Did you set grants DBADM and SECADM for db2<sid> and connect user sap<sid> after db recovery?

B.R.

Martin

anderson_cardozo
Participant
0 Kudos

Hi, Martin.

Check the images about CRMV_LIST

Check the images about CRMV_LINKCUMUL_I

About grant and connect user, yes, I applied (3 times):

db2 grant dbadm,secadm on database to user db2q01

db2 grant dbadm,secadm on database to user q01adm

db2 grant dbadm,secadm on database to user sapq01

List the users who currently hold the SECADM authority

martin_mikala
Participant
0 Kudos

Hi A.C,

Seems that this view doesnt exist in DB.

Check this view CRMV_LIST via SE14.

And also try find it via DB02 -> Diagnostic -> missing indexes and table (puch refresh), also in Single table analysis and in Virtual tables.

B.R.

Martin

Frank-Martin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

this is somewhat dangerous. If you changed the connect user during system copy all of your database objects will now be still owned by the old connect user.

If your system is 7.2x kernel based you should run TRANFER OWNERSHIP commands on all tables, indexes and views to the the new connect user. On 7.40 SAP databases the problem will even become more complex since there may exist more database objects like table functions, scalar functions, SQL variables.

SAPINST, SWPM will run all those TRANSFER OWNERSHIP commands for you. It should still be possible to run SWPM now to finish your system copy with SAP tools. You can leave your databse without performing a new restore.

Regards

                Frank

anderson_cardozo
Participant
0 Kudos

Hello Frank,

Do you know, how to execute TRANFER OWNERSHIP commands on all tables, indexes and views?

Frank-Martin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Anderson,

you can logon as db2sid and use some CLP/shell commands similar to note 1224865.

For example for tables:

db2 -x "select 'TRANSFER OWNERSHIP OF TABLE SAPOLD.' || chr(34) || tabname || chr(34) || ' TO USER SAPNEW PRESERVE PRIVILEGES;' from syscat.tables where tabschema = 'SAPOLD'  where type = 'T' "

Hope I got it right since I did not test the command. If it works, you can redirect the output to a file and execute it via "db2 -tvf file "

Of course you need to adapt SAPOLD and SAPNEW to your needs. For views, you need type = 'V' and for indexes you need to select from syscat.indexes.

Please note that things will become even more complex on 7.40 and 7.50 since other objects like functions nad SQL variables exist in the ABAP schema. It is much more save to use the SAP tools for system copy.

Regards

                 Frank

Answers (1)

Answers (1)

former_member213250
Active Participant
0 Kudos

Hi Andreas

1. Error message type 3

SQL0727N An error occurred during implicit system action type "3"

this means, implicit revalidation of an object is required.

2. Further error check based on returned error code SQLCODE "-551", I think after system copy previous instance owner ID normally would not exist on the restored UNIX system in question,

and database permission have been revoked for that ID.

-o- GRANT permission to the previous instance ID in the new restored database

Also you can check if the object is necessary for system operations, if not you can drop that object.

Hope it helps.

Regards

Venkat.

Former Member
0 Kudos

Hi,

Check the sap note

2120907 - SAP Upgrade Fails in Phase MAIN_NEWBAS/TABIM_UPG with SQL0727N, Action Type "3" and SQLCOD...

Also from the error code the user response should be something like below...

1. Determine the name of the database object that could not be revalidated by locating the revalidation failure message in the administration notification log.

2. To avoid this error in the future, you can do one of the following:

   *  If the database object that is causing this error is no longer needed, drop the database object.

   *  If the statement or command that caused this database object to be revalidated can be changed, change the statement or command so that the next time that statement is executed or that command is run the database object will not be revalidated.

   *  Revalidated the database object now by doing one of the following:

   *  Execute an SQL statement that directly references the database object.

   *  Call the ADMIN_REVALIDATE_DB_OBJECTS procedure for the database object.

Regards,

Prithviraj