Re: Text backup from database - more

Dale E. Reed Jr. ( (no email) )
Mon, 17 Aug 1998 14:19:07 -0700

Pat Augustine wrote:
>
> I just downloaded radusers.exe because of this message, and I DO have the
> radiususers stored procedure but when attempting to run it from the command
> line I get an error that "Stored procedure 'RU_RC' not found". There is no
> stored procedure RU_RC, where is that?

For the new Radusers.exe in the beta directory, these stored procedures
are needed. Please not that the radusers.exe in the beta directory is
NOT
compatable with the Emerald RadiusUsers export for strings, since the
later
requires the quotes in the database and the first does not.

CREATE PROCEDURE RU_AT AS

SELECT AccountType, ra.RadAttributeID, ra.Type, rc.Data, rc.Value,
rc.RadCheck, ra.Name
From RadATConfigs rc, RadAttributes ra
Where rc.RadAttributeID = ra.RadAttributeID
Order by AccountType, ra.RadAttributeID
GO

CREATE PROCEDURE RU_RATC AS
SELECT sa.Login, sa.Password, sa.AccountType, MasterExpire=DateAdd(Day,
ma.Extension, maExpireDate),
SubExpire=DateAdd(Day, sa.Extension, saExpireDate)
From MasterAccounts ma, SubAccounts sa
Where ma.CustomerID = sa.CustomerID
AND maExpireDate >= GetDate()
AND sa.Login is not null
AND ma.Active = 1 AND sa.Active = 1
AND NOT EXISTS (
Select * From RadConfigs rc where sa.AccountID = rc.AccountID
)
AND EXISTS (
Select * From RadATConfigs at where sa.AccountType = at.AccountType
)
GO

CREATE PROCEDURE RU_RATC AS

SELECT sa.Login, sa.Password, ra.Name, ra.Type, rc.Data, rc.Value,
rc.RadCheck,
MasterExpire=DateAdd(Day, ma.Extension, maExpireDate),
SubExpire=DateAdd(Day, sa.Extension, saExpireDate)
From MasterAccounts ma, SubAccounts sa, RadConfigs rc, RadAttributes
ra
Where ma.CustomerID = sa.CustomerID
AND rc.AccountID = sa.AccountID
AND ra.RadAttributeID = rc.RadAttributeID
AND sa.Login is not null
AND maExpireDate >= GetDate()
AND ma.Active = 1 AND sa.Active = 1
Order BY sa.Login, rc.RadCheck DESC
GO

-- Dale E. Reed Jr.  (daler@iea-software.com)_________________________________________________________________       IEA Software, Inc.      |  RadiusNT, Emerald, and NT FAQs Internet Solutions for Today  |   http://www.iea-software.com