sp_helplogins

  • I am trying to discern the various aspects of the t sql behind this stored proceedure. Has anybody already broken the sp down to the two different SELECT's to get the two result tables? If not, can anybody help me begin to do this?

    -Kyle

  • Hi Kyle,

    The fastest solution is to:

    1. take the definition of this sp (methods we have already shown you, easiest is to use Management Studio, find this stored procedure in the object explorer masters->proramability->system..., click modify), make two copies of the script

    2. either create a new stored procedure with the same parameters, or:

    declare @LoginNamePattern sysname

    3. get rid of the section "------------ Print out the UserOrAlias report ------------" in one of the copies, in the other "------------ Optimize UA report column display widths -----------"

    You will have two scripts that return only one of the resultsets. If you want to make it nicer/cleaner, keep in mind that for the plain logins you will need the tables for UserOrAlias temp tables.

    Regards,

    Andras


    Andras Belokosztolszki, MCPD, PhD
    GoldenGate Software

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply