Hi,
We have a requirement to create a user with a read access to a particular table in Sybase which will be under SAPSR3DB Schema.
Can anyone hlep me to create a user and how to assign a read access only to a particular table in SAP JAVA Server?
Thanks and Regards,
Vimal
Request clarification before answering.
Vimal,
Please check the below steps :
1) create a new role "test_role" as below.
1> use master
2> go
1> create role test_role
2> go
2) create a new login user "testuser" to access your database SAPSR3DB.
1> sp_addlogin testuser, testuser, SAPSR3DB
2> go
1> use SAPSR3DB
2> go
1> sp_adduser testuser , testuser
2> go
New user added.
3) grant SELECT (READ) permission to the new role.
1> create table t1 (a int)
2> go
1> insert into t1 values (1)
2> go
(1 row affected)
1> grant SELECT on t1 to test_role
2> go
4) grant the role to the required login user.
1> use master
2> go
1> grant role test_role to testuser
2> go
1> sp_modifylogin testuser, "add default role", test_role
2> go
5) Connect using "testuser" and access the table.
$ isql -Utestuser -SASE157 -Ptestuser
1> select * from SAPSR3DB..t1
2> go
Hope this will be helpful.
~Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
if an existing table is not found, this is usually because of the wrond schema. E.g. you log in as mylogin but the table is owned by SAPSR3DB.
I'm not an expert on SAP PO so I don't know whether you can configure anything regarding the connection.
If you're not sure which ASE login is used by SAP PO, you can monitor that on ASE side by configuring:
-- enable
execute sp_configure "log audit logon failure", 1
execute sp_configure "log audit logon success", 1
afterwards the ASE log contains information regarding log-in attempts.
Best regards,
Juergen
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.