Results 1 to 6 of 6

Thread: stored procedure

  1. #1
    Join Date
    Aug 2003
    Location
    BS. AS. Argentina
    Posts
    12

    stored procedure

    Hi,

    I have a stored procedure (job) that take data from several tables, and put then in another one (control panel table).
    This job runs every day at night, and makes transaction log grows too much, and never shrink.

    any idea?

    thanks

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    do a
    checkpoint
    backup log with no_log
    dbcc shrinkfile

  3. #3
    Join Date
    Aug 2003
    Location
    BS. AS. Argentina
    Posts
    12
    yes , I do this every day.
    What do you think about add this 2 lines at store procedure end?

    thanks for all

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You can't run a DBCC command from stored procedure.

  5. #5
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    you can run if you have the right access.


    create proc xtr as
    dbcc shrinkfile (SNAR_Data,10)


    exec xtr

  6. #6
    Join Date
    Aug 2003
    Location
    BS. AS. Argentina
    Posts
    12
    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •