auto locking

  • i want to automatic locking in sql server 2005.store all information in user and also insert,update,delete command how to maintain this?

  • I'm sorry, but I couldn't understand what you want. Can you try to post your question again with a better description of what you want to achieve?

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Soory Sir,

    Actualy i m developing one web application When user login in my web application i do anything i want to sotre in a table for eg, he insert a record or update a record . I want to track all transaction and also see this.

  • lav (12/3/2008)


    Soory Sir,

    Actualy i m developing one web application When user login in my web application i do anything i want to sotre in a table for eg, he insert a record or update a record . I want to track all transaction and also see this.

    There are few choices to do that and it depends on the requirements. If it is something that you want to see only once or just few times for debugging purpose, you can use the profiler.

    If it is something that you want to have all the time, then you can have triggers on the table and in the trigger's code log the operations that the user did and insert that data into a logging table. Another option is to modify the application’s code to insert this data into a logging table. The difference is that if you use a trigger then the trigger will fire even if the insert/update/delete operation was done through a different interface then your application, but if you’ll modify the application’s code, it will log only data modification that were done by your application.

    .

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • how to send paramenter in my trigger

  • You can't send parameters into a trigger, but I think that you have anything that you need. You know which table was modified, you have both versions of the data (before and after modification) and you know which user modified the data. Can you specify what you want to pass as a parameter to the trigger?

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • It's much easier to answer questions on the forum if you provide a very clear, focused and detailed question. Really general and vague questions can only be answered in general and vague ways.

    What specifically are you trying to do that you either can't do or don't know how to do?

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • i want to store ip address in a table when user login and also store form id

  • What's a form id?

    Your questions aren't making much sense by themselves. Can you please explain, in detail, what you're trying to do and what's not working?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Because, right now, I'm utterly confused what storing an IP address has to do with "auto locking" which is the title of the post.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • what is audit locking? how to handle in sqlserver 2005?

  • Lav, based on the nature of the questions you are asking I highly recommend you read a book or two on SQL Server 2005 development before continuing with your project. Iterative basic questions like you have are not and efficient use of forum bandwidth. Nor are forums designed to provide efficient learning of many basic fundamentals.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • The best way I've found to handle this kind of logging from a web interface is to do all Inserts, Updates and Deletes in the database with stored procedures. (It is also much more secure and avoids the possibility of SQL injection).

    You pass the information you want logged (such as user name or whatever you want) to the stored procedure. The stored procedure performs the action you want - Insert, Update, Delete - and then logs the action to a log table.

    Todd Fifield

Viewing 13 posts - 1 through 12 (of 12 total)

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