No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade
Knowledge Base

FAQ-How to Create a User Account with Read-Only Permission in the Sybase Database

Publication Date:  2012-07-25  |   Views:  165  |   Downloads:  0  |   Author:  SU1001785394  |   Document ID:  EKB0000374677

Contents

Issue Description

Q:
How to create a user account with read-only permission in the Sybase database? 

Alarm Information

Null

Handling Process

A:
To create a user account with read-only permission in the Sybase 12.0, take the following steps:
1. Log in to the Sybase database as user SA:
solaris#cd /opt/sybase/A*/install
solaris#./isql -Usa �Psa password -SN2000DBServer
2. Add a login user by running the following commands:
1>sp_addlogin login_name,passwrod
2>go
3. Add a user that can query the database by running the following commands:
1>sp_adduser login_name,user_name (Usually, the login_name and user_name are set as the same.)
2>go
4. After you successfully add the two types of users in step 2 and step 3, add the user that can query the database to the corresponding database by running the following commands
1>use BMSDB (Assume that you query the data entries of BSMDB database.)
2>go
5. Add login_name and user_name to the BMSDB database by running the following commands so that read-only permission of BSMDB database is granted to the two types of users.
1>sp_adduser login_name,user_name
2>go
6. Grant the read-only permission of the tables by running the following commands.
1>grant select on tbl_User to user_name
2>go 

Root Cause

Null

Suggestions

Null