Sybase revoke permission

In this article, we are going to see how to revoke permissions from Sybase user on a table(s).

Sybase Revoke Syntax:

revoke [grant option for] {all [privileges] | permission_list} on {table_name [(column_list)] | view_name [(column_list)] | stored_procedure_name | function_name | keyname} [with {pred_name | {all |no} predicates}] from {public | name_list | role_list} [cascade] [granted by grantor]

Continue reading Sybase revoke permission

Sybase Ad-hoc updates to system catalogs not enabled

I have received this when tried to bcp in of the system table ‘sysusers’ in Sybase.

Server Message: LOCALHOST - Msg 10321, Level 14, State 1: Ad-hoc updates to system catalogs not enabled. A user with System Security Officer (SSO) role must reconfigure system to allow this. CTLIB Message: - L1/O3/S0/N14/0/0: blk_init(): blk layer: CT library error: Failed when CT_Lib routine ct_results() called. blk_init failed. bcp copy in failed

Reason:
This occurs when you try to directly modify an Adaptive Server system table without first using sp_configure to set the allow updates configuration parameter.

Solution: Continue reading Sybase Ad-hoc updates to system catalogs not enabled

Show all permission for a table to user in Sybase

In this article, we are going to get list of permissions granted to the user on a table in Sybase. We can get permissions on a table to user by using the stored procedure sp_helprotect.

Syntax:

sp_helprotect table_name, user_name

Continue reading Show all permission for a table to user in Sybase

How to check blocking Sybase

In this article, we have divided into 5 steps:

1. Blocking Definition
2. Query to check blocking in Sybase
3. Get the showplan(query plan) in Sybase
4. Get the SQLText of Sybase process ID.
5. How to kill the Sybase process id which is causing blocking.

1. Blocking Definition:

“Blocking” means that one connection is holding a lock on a resource when another connection wants to read or write to it.
Continue reading How to check blocking Sybase