sp_monitor  sp_audit

Chapter 12: Changes to Global Variables, Commands, and Stored Procedures

force parameter for sp_dropalias

sp_dropalias includes the optional parameter force, which allows you to drop an alias even if it owns database objects. Earlier versions of sp_dropalias required that you first drop the objects owned by the alias before dropping the alias.

For example, if you use the force parameter, you can drop the alias “harry,” which owns a procedure namelist. Adaptive Server drops the alias but issues a warning message:

sp_dropalias harry, force
Warning: You have forced the drop of the alias for login 'harry' which owns objects in the database. This may result in errors when those objects are accessed from or contain references to another database.
Alias user dropped.(return status = 0)




Copyright © 2004. Sybase Inc. All rights reserved. sp_audit

View this book as PDF