Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Deleting users in Sybase

1,380 views
Skip to first unread message

Thomson J Attasseril

unread,
Nov 18, 1993, 6:01:46 PM11/18/93
to
We are trying to delete users from a Sybase database. We are running Sybase
4.01 on NeXT workstations. Unfortunately we cant locate a 'delete user'
or 'remove user' option in any of the sybase administration menus. There is
a very prominent 'add user' option, but could someone point us to the
'delete user' option.

Please send responses to:
atta...@enxusa.eas.asu.edu

Thanks,
Thomson

Fabien Roy

unread,
Nov 19, 1993, 5:44:58 AM11/19/93
to
In article <1993Nov18.2...@ennews.eas.asu.edu>

1 Version 4.0 -- 1/15/89 sp_dropuser
______________________________________________________________________

NAME: sp_dropuser

FUNCTION:
Drops a user from current database by deleting the entry from
sysusers.

SYNTAX:
sp_dropuser name_in_db

EXAMPLES:
sp_dropuser albert


sp_dropuser Version 4.0 -- 1/15/89 2
______________________________________________________________________
Drops the user albert from the current database. Albert may no
longer use the database.

PARAMETERS:
name_in_db - is the user's name in the current database's
sysusers table.

COMMENTS:

o Executing sp_dropuser deletes a user from the current database
by deleting the user's row from sysusers.
o Users who own objects in the database cannot be dropped.

o The Database Owner of a database cannot be dropped.
o If other users are aliased to the user being dropped, their
aliases are dropped. They are no longer able to access the
database.

3 Version 4.0 -- 1/15/89 sp_dropuser
______________________________________________________________________

MESSAGES:
The specified user is no longer known to the database.
Other users were aliased to the user being dropped. Their
aliases have been dropped, and they can no longer access the
database.
The specified user doesn't exist in the current database.
The Database Owner cannot be dropped, even by the System Adminis-
trator.
Users who own objects in the current database cannot be dropped.
Drop the owned objects first. When this error message is
generated, a list of objects and their owners is displayed.
Users who own user datatypes in the current database cannot be
dropped. Drop the owned datatypes first. When this error
message is generated, a list of datatypes and their owners is
displayed.


sp_dropuser Version 4.0 -- 1/15/89 4
______________________________________________________________________

PERMISSIONS:
Execute permission to Database Owner.

TABLES USED:
sysalternates, sysobjects, systypes, sysusers

SEE ALSO:
sp_adduser, sp_droplogin, GRANT, REVOKE, USE

fabien
--
---------------------------------------------------------------------
Fabie...@free.fdn.org (NextMails accepted)
Fabien Roy Electronic Engineering
3 rue ANDRE DANJON, 75019 PARIS, France,
Tel: 33 1 4040 0206 Fax: 33 1 4040 0641

Joel Friedman

unread,
Nov 19, 1993, 7:52:48 AM11/19/93
to
In article 15...@ennews.eas.asu.edu, atta...@enuxhb.eas.asu.edu (Thomson J Attasseril) writes:
->We are trying to delete users from a Sybase database. We are running Sybase
->4.01 on NeXT workstations. Unfortunately we cant locate a 'delete user'
->or 'remove user' option in any of the sybase administration menus. There is
->a very prominent 'add user' option, but could someone point us to the
->'delete user' option.
->
->Please send responses to:
->atta...@enxusa.eas.asu.edu
->
->Thanks,
->Thomson


Try sp_dropuser <name_in_db> and sp_droplogin <login_name>. Remember
that you cannot drop a user if he/she owns any objects in the database.

Good luck.


---
====================================================================
|
_/ _/_/_/ _/_/_/ _/ | Joel Friedman (consultant)
_/ _/ _/ _/ _/ |
_/ _/ _/ _/_/ _/ | - "If you've got a solution, let me
_/ _/ _/ _/ _/ _/ | find the problem."
_/_/ _/_/_/ _/_/_/ _/_/_/ |
| W: (202) 752-2210
====================================================================

Stefan Krause

unread,
Nov 20, 1993, 8:48:32 PM11/20/93
to
atta...@enuxhb.eas.asu.edu (Thomson J Attasseril) writes:

>We are trying to delete users from a Sybase database. We are running Sybase
>4.01 on NeXT workstations. Unfortunately we cant locate a 'delete user'
>or 'remove user' option in any of the sybase administration menus. There is
>a very prominent 'add user' option, but could someone point us to the
>'delete user' option.

The Sybase Administrator isn't a very useful program. It's more
like a demo program. I think you should use isql. There are system
procedures for user administration tasks (sp_addlogin, sp_adduser,
sp_dropuser, sp_droplogin, sp_password).

If you don't like command shells then you can purchase various
GUI-tools from third parties. There are lots of different products
which deliver NeXTSTEP-Interfaces for Sysbase admin tasks. Some of
them include tools for database-client-development with NeXTSTEP-GUI.

For a most recent product list refer to the Third Party Products
Catalog which came with your NS3.1 package. Or send me an email if
you need more info.

Stefan
--
Stefan Krause Kiel, Germany
st...@tpki.toppoint.de(NeXTmail welcome) Tel.(voice) +49 431 335022

Gary Fidler

unread,
Nov 27, 1993, 10:28:06 PM11/27/93
to
Try sp_droplogin UserName. It's a stored procedure.

--
Gary Fidler E-mail: gfi...@csn.org
Tele-Communications, Inc. Phone: 303.267.5762
Advanced Information Technology FAX: 303.488.3203

0 new messages