SAP Sybase ASE 15.7 sp_modifylogin Login Script sp_xxxxx is not valid



What the error looked like...

1> sp_modifylogin jbloggs, "login script", sp_login_trigger2

Msg 18898, Level 16, State 1:
Server 'WOODLANE', Procedure 'sp_modifylogin', Line 626:
Login script 'sp_login_trigger2' is not valid.

(return status = 1)

When using sp_modifylogin to modify a login to set up a login trigger...

relevant section sp_modifylogin code:

/* If a db name is given, it has to be the user's default */
if ((@status != 0) or
((@dbname is not null) and (@dbname != @defdb)))
begin
/*
** 18898, "Login script '%1!' is not valid."
*/
raiserror 18898, @value
goto clean_all
end

Conclusion...

The sybase login default database MUST BE THE SAME as the database for the login stored procedure.

A better message would be:
sp_addmessage 80001, "Stored procedure for login trigger must reside in same database as the default database for this login, this is currently '%1!' "

code could be changed to:
raiserror 80001, @defdb

(using ASE range of system messages)
Also the online manual could be made a bit clearer for this issue.


Output from select @@version within ASE:

Adaptive Server Enterprise/15.7/EBF 21341 SMP SP101 /P/x86_64/Enterprise Linux/ase157sp101/3439/64-bit/FBO/Thu Jun 6 16:08:18 2013


Other SAP Sybase ASE 15.7 pages...

UGLY BUG in Sybase ASE 15.7 sp_helpdb stored procedure
arithmetic overflow bug

SAP Sybase ASE 15.7 Raw Device Setup Centos Linux
sybase_ASE_raw_device_setup_centos_linux


General stored procedures providing additional features compared to standard SAP supplied procedures:-

sp_locksummary Lock Summary Stored Procedure
sybase_ASE_sp_locksummary

sp_devicesummary Device Summary Stored Procedure
sybase_ASE_sp_devicesummary

sp_dbsummary Database Summary Stored Procedure
sybase_ASE_sp_dbsummary

sp_onerow Sample Table Row Stored Procedure
sybase_ASE_sp_onerow

sp_tablelist Table List Stored Procedure
sybase_ASE_sp_tablelist


Contact Information

If the error message (listed at the top of the page) gets improved please let me know and I'll update this page.

cookalastair @ btinternet.com


Last update to this page

13th November 2013
Push Symbol. Push Symbol. Door logos