Case study 40: How to give non-sa user permission to see procedure code
  • Platforms: All
  • SAP ASE version: All
  • Background story: One developer asked me can he see procedure code in ASE database on our DEV environment. As non-sa user, he had only limited acces and grants to database objects, and was not able
  • Task: Allow non-sa user to see procedure code.
  • Solution: I have been checking internet in quest for solution, but was not able to find it. So I've contacted SAP support and they told me that grant SELECT permissions on syscomments should solve the problem. But in the same time, I found global solution, on server level, which unlocks that permission on server level and all users which are public group members can see procedure code.

    Statement that solves this:

    sp_configure 'select on syscomments.text',1
    go

  • Conclusion: It is good to have SAP support contract and their help on Your side! Also for that server parameter some comment from ASE documentation:
    select on syscomments.text enables protection of the text of database objects through restriction of the select permission on the text column of the syscomments table. The default value sets select permission to "public". Set the value to 0 to restrict select permission to the object owner and the system administrator.
   
  powered by myself. DBA-Sybase 2006