Large file LOCKINFO

  • Hello,

    I see a 17 GB file named LOCKINFO in our MSSQL\LOG directory. I'm not referring to a table (although it may somehow be related to a table in SQL somewhere) but a file listed in the filesystem.

    Does anyone know what that file does, and if there is a way I can purge it or otherwise reduce its size?

    Thanks for any help!

    webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

  • There is no file created by SQL Server that I am aware of. I would say just delete it. My guess as to the files origin is one of two situations.

    • A SQL Agent task creates a logfile (the job log file is in append mode).
    • This may be the result of a SQL Profiler trace

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Thanks!

    webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

  • Hello again,

    I just wanted to let you know that I found out the source of the LOCKINFO file. I had forgotten that one of my colleagues had researched a way to collect lock information and found this procedure:

    http://www.sommarskog.se/sqlutil/aba_lockinfo.html

    The job he created in order to log the output creates and updates the LOCKINFO file. From what I can tell, the log file doesn't need to be called LOCKINFO; that is just the name he gave it.

    Now that I am the official DBA, I am trying to go through all of the items I see and find out where they came from and what purpose they serve.

    The information in the big file that I copied off to an archive drive and then deleted may actually be of some interest.

    But is there any way to have a SQL 2000 job step that rotates a log file every so often so that it is copied to another drive and then deleted from the active SQL data drive?

    Thanks again,

    webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

  • you could call a batch file via xp_cmdshell with contents like

    del lockfile.t-3

    ren lockfile.t-2 lockfile.t-3

    ren lockfile.t-1 lockfile.t-2

    ren lockfile.dat lockfile.t-1

     

    This will allow a 3-day archive.

     

    and then start the "locklogging procedure"....all executed once-a-day via SQL agent??  Not pretty...but workable.

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

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