Uploaded by Lin Liu

2136018 drop orphaned aliases

advertisement
2023-03-03
2136018
2136018 - sp_drop alias reports Error 17231 "No login ...
exists". Unable to drop alias when no login record
exists -- SAP ASE
Version
6
Type
SAP Knowledge Base
Article
Language
English
Master
Language
English
Release
Status
Released to Customer
Category
Problem
Component
BC-SYB-ASE (Sybase ASE Database Platform (non
Released On
Business Suite))
16.05.2016
Please find the original document at https://launchpad.support.sap.com/#/notes/2136018
Symptom
• Unable to drop alias when no login record exists
• A check of the sysalternates table and user names shows that some orphaned aliases exist in the
database:
1> select suser_name(suid), * from sysalternates
2> go
suid altsuid
------------------------------ ----------- ----------myuser 7 1
NULL 366 1
• Attempt to remove the orphaned alias fails:
1> sp_dropalias NULL
2> go
Msg 17231, Level 16, State 1:
Server 'SYBASE', Procedure 'sp_dropalias', Line 176:
No login with the specified name exists.
Environment
SAP Adaptive Server Enterprise (ASE) 15.7
Cause
Discrepancies between the sysalternates table in a user database and the syslogins table in the master
database can occur when a user database is loaded from backups from a different ASE with varying values
in syslogins. In order to remove an alias from a user database, there must be a corresponding login account
for the suid in sysalternates.
Resolution
The supported method for cleaning up orphaned aliases in sysalternates is as follows:
1. Create a login account for the orphaned suid in sysalternates:
© 2023 SAP SE or an SAP affiliate company. All rights reserved
1 of 2
2023-03-03
2136018
use master
go
create login dropme with password <xxx> suid 366
go
2. Drop the corresponding alias from the user database:
use mydb
go
sp_dropalias dropme
go
3. Drop the login account created in Step 1:
use master
go
drop login dropme with override
go
Note: In versions prior to ASE 15.7, use the system procedures sp_addlogin and sp_droplogin
instead of the CREATE/DROP LOGIN commands.
Products
SAP Adaptive Server Enterprise 15.7
Other Components
Component
BC-SYB-ASE-CE
Description
ASE Cluster Edition (Standalone)
Terms of use | Copyright | Trademark | Legal Disclosure | Privacy
© 2023 SAP SE or an SAP affiliate company. All rights reserved
2 of 2
Download