Re: Is it enought to have read permission to the database to be able to run queries to access data?



First (as 'sa') create a new login with "sp_addlogin newloginname,
newpassword".
Second, (still as 'sa') add your login as a database user to each database
containing tables you want to read with "sp_adduser newloginname".
Now you can log into ASE with your new login and try to select from those
tables... If the tables you want to select from already have granted select
permission to public, you're fine.
If not, you'll get an error and you need to run "grant select on
<table-name> to newloginname" for each table you need to access. You'lll
still have to do this as 'sa'.

Alternatively, you may also alias your database user to the dbo, but that
would give you the rights to drop tables and modify data, so this may not be
desirable.

HTH,

Rob
-------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
and Replication Server 12.5 / TeamSybase

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase Replication Server Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"

mailto:rob@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------

<alakesh.haloi@xxxxxxxxx> wrote in message
news:1133328811.589195.97710@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi
> I am writing a program which logs in to a sybase database and then
> fires SQL queries ( only select queries ). Right now i am using "SA"
> login to fire the queries. In practical scenerio i wont be able to get
> SA login/password. So i need to logon as a user which has at least read
> permission to the databases. So how do i go about it? Is it possible
> to login as root ..then su as sybase and create one account having
> only read permission to all the databases? How do i create a sybase
> login with read privilege without loggin in as SA?
> Please help.
>
> thanks
> alakesh
>


.



Relevant Pages

  • Re: SQL Users (Basic Question)?
    ... A login is stored in the master database. ... ability to connect to the SQL Server. ... A database user allows a login to use a particular database and the entry is ...
    (microsoft.public.sqlserver.security)
  • Re: DB Connection failure
    ... login id and the database user id doesn't match.... ... "Sunil" wrote in message ...
    (microsoft.public.sqlserver.server)
  • Re: MSSQLServerADHelper is problem?
    ... Try revoking the login and then re-add it and see if you can ... add the login as a database user. ... It runs when requested to by SQL Server service ...
    (microsoft.public.sqlserver.security)
  • Re: SecurityAdmin server role
    ... Add that login to that partcular database as a database user and assign ... SQL Server MVP ...
    (microsoft.public.sqlserver.security)
  • Re: Permissions of Logins
    ... You aksed if the login is associated to a database user. ... >> no server roles. ...
    (microsoft.public.sqlserver.msde)