Sybase IQ uses native SQL Anywhere calls for user account management (which are similar to Oracle's) .. but thankfully a few ASE login related SPs are included with IQ as well.
When setting up an IQ database, the "schema" paradigm applies here (similar to Oracle). A Schema Owner is created, and then all objects are owned by that login.
-- Add a login, with the ability to create tables / views
grant connect,resource to ACME identified by julia123 ;
create table invoices ( inv_id integer, cust_id integer, inv_amount numeric(12,4) ) ;
create table customers ( cust_id integer, cust_name varchar(50) ) ;
-- Add a login, for read only access to the system.
grant connect to jsmith identified by shelly123 ;
grant select on ACME.invoices to jsmith ;
grant select on ACME.customers to jsmith ;
-- Add a group, add a member
grant group to acme_users ;
grant membership in group acme_users to jsmith ;
-- Drop a login (will abort if the login owns stuff)
revoke connect from jsmith ;
-- ASE compatible calls.
sp_addlogin 'jsmith','shelly123'
go
sp_droplogin 'jsmith'
go
sp_addgroup 'acme_users'
go
|
|