creating stored procedures

  • Hi to everyone i am a newbie to ms sql i am creating a stored procedure to retrive data for the logged user pls give me some examples.

    Thanx

  • What do you mean by "logged user"?

    Have you looked up Create Procedure in BOL?

  • bvinay57 (4/22/2009)


    Hi to everyone i am a newbie to ms sql i am creating a stored procedure to retrive data for the logged user pls give me some examples.

    Thanx

    Are you thinking for any log traces for users, simple inserting, deleting or updating ...if so you can do it also with triggers!

    I agree with Jack to check BOL for SP and Trigger, first at all!

    ============================================================
    SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

  • Are you asking for the Currently Logged In users in the SQL Server?

    see master.dbo.sysprocesses.

    If you are willing to store the history of the Logged In Users, Create SP and check the new entry in master.dbo.sysprocesses compare with your own table.

    You can also use Prfiler Trace for this.

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

Viewing 4 posts - 1 through 3 (of 3 total)

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