use sybsystemprocs
go
drop procedure sp__rev_configure
go
create procedure sp__rev_configure
as
declare @sptlang        int             /* current sessions language */
declare @whichone       int             /* using english or default lang ? */

if @@trancount = 0
begin
        set transaction isolation level 1
        set chained off
end

select @whichone = 0

select @sptlang = @@langid

if @@langid != 0
begin
        if not exists (
                select * from master.dbo.sysmessages where error
                between 17015 and 17049
                and langid = @@langid)
            select @sptlang = 0
        else
        if not exists (
                select * from master.dbo.sysmessages where error
                between 17100 and 17109
                and langid = @@langid)
            select @sptlang = 0
end

if @sptlang = 0
begin
    select "-- sp_configure settings"
        = "sp_configure '" + name + "', "
        + convert( char(12), c.value)
        + char(13) + char(10) + "go"
    from master.dbo.spt_values a,
        master.dbo.syscurconfigs c
        where a.type = "C"
                and a.number *= c.config
                and a.number >= 0
end
else
begin
    select "-- sp_configure settings"
        = "sp_configure '" + name + "', "
        + convert(char(12), c.value)
        + char(13) + char(10) + "go"
    from master.dbo.spt_values a,
        master.dbo.syscurconfigs c,
        master.dbo.sysmessages d
        where  type = "C"
                and a.number *= c.config
                and a.number >= 0
                and msgnum = error and isnull(langid, 0) = @sptlang
end
return (0)
go
--
-- You may or may not wish to do the following.
--
--grant execute on sp__rev_configure to public
--go