in

Dotnetpanel Forums

Community support forums for DotNetPanel products

MS SQL log size questions.

Last post 06-02-2009 10:19 AM by ResellerChoice. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 05-24-2009 7:28 AM

    • GrZeCh
    • Top 10 Contributor
    • Joined on 04-25-2007
    • Poland
    • Posts 651

    MS SQL log size questions.

    Hello,

    I'm wondering do you set any restrictions to your users MS SQL databases log files?

    Thanks

    DotNetPanel 2.8.14
  • 05-25-2009 3:25 AM In reply to

    • MickeP
    • Top 75 Contributor
    • Joined on 09-22-2008
    • Landskrona, Sweden
    • Posts 62

    Re: MS SQL log size questions.

    Yes, I do. And I would recommend everyone to do it as well. I've experienced several customers who have had sql log files that grew enourmesly much by some reason even if the database wasn't near as big in size, running SQL 2005. Don't know if it's a bug in 2k5 that doesn't appear in 2k or 2k8, though.

    Filed under:
  • 05-25-2009 4:26 AM In reply to

    Re: MS SQL log size questions.

    you can set schedule task to shirnk logs files daily.
    Thanks

    Shalabh
  • 05-25-2009 5:21 AM In reply to

    • Rubal
    • Top 10 Contributor
    • Joined on 03-16-2006
    • India
    • Posts 838

    Re: MS SQL log size questions.

    Not exactly a bug ... Wondering what is transaction type setup for your sql install and databases. Change the transactions for the database to Simple and also as suggested above schedule something to truncate or shrink logs daily or weekly.

     

    Rubal Jain // Email - Rubal @ Rubal [dot] Net

    Windows Server Setup, Configuration, Troubleshooting, Basic Security & Hardening
    DotNetPanel - Helm Control Panel Setup, Installation, Configuration, Troubleshooting

    Authorised DNP Reseller. Get 20% Discount on all DNP Licenses.
    Authorised SmarterTools, Declude, SimpleDNS (JHSoft), Gene6 FTP, Helicon, Kayako, Icewarp Merak, MailEnable, Deerfield Reseller.

    DotNetPanel & SmarterTools Monthly Leased Licenses available.

    DotNetPanel Professional Server setup includes installation of PHP, Perl, Python, ASP.Net Frameworks, SQL Express, MySQL, SmarterMail, Stats etc and complete integration with control panel just $199/server. Contact for further details.
  • 05-25-2009 5:32 AM In reply to

    • GrZeCh
    • Top 10 Contributor
    • Joined on 04-25-2007
    • Poland
    • Posts 651

    Re: MS SQL log size questions.

    Does simple transactions for databases can be set globally?

    DotNetPanel 2.8.14
  • 05-25-2009 5:51 AM In reply to

    • Rubal
    • Top 10 Contributor
    • Joined on 03-16-2006
    • India
    • Posts 838

    Re: MS SQL log size questions.

    use master
    go

    CREATE  proc rp_switch_rec_model
    (@MODE varchar(20))
    as
    Declare
      sdb_namecurs cursor for
      select name from master..sysdatabases where name <> 'TEMPDB';
    open sdb_namecurs;
      declare @db_name sysname
    fetch next from sdb_namecurs into @db_name;
    While @@fetch_status = 0
      Begin
        exec('ALTER DATABASE ' + @db_name + ' SET RECOVERY ' + @MODE)
        --print 'ALTER DATABASE ' + @db_name + ' SET RECOVERY ' + @MODE
        fetch next from sdb_namecurs into @db_name
       End
    Deallocate sdb_namecurs
    GO

    -- USAGE
    exec rp_switch_rec_model 'SIMPLE'
    -- OR
    exec rp_switch_rec_model 'FULL'
    -- OR
    exec rp_switch_rec_model 'BULK_LOGGED'

     

     

     

     


     

    Rubal Jain // Email - Rubal @ Rubal [dot] Net

    Windows Server Setup, Configuration, Troubleshooting, Basic Security & Hardening
    DotNetPanel - Helm Control Panel Setup, Installation, Configuration, Troubleshooting

    Authorised DNP Reseller. Get 20% Discount on all DNP Licenses.
    Authorised SmarterTools, Declude, SimpleDNS (JHSoft), Gene6 FTP, Helicon, Kayako, Icewarp Merak, MailEnable, Deerfield Reseller.

    DotNetPanel & SmarterTools Monthly Leased Licenses available.

    DotNetPanel Professional Server setup includes installation of PHP, Perl, Python, ASP.Net Frameworks, SQL Express, MySQL, SmarterMail, Stats etc and complete integration with control panel just $199/server. Contact for further details.
  • 05-25-2009 5:27 PM In reply to

    • GrZeCh
    • Top 10 Contributor
    • Joined on 04-25-2007
    • Poland
    • Posts 651

    Re: MS SQL log size questions.

    How about databases which will be created in future? I should run this procedure for new databases too ?
    DotNetPanel 2.8.14
  • 06-02-2009 10:19 AM In reply to

    Re: MS SQL log size questions.

    No, just set the recovery model for the "model" database to simple: http://technet.microsoft.com/en-us/library/ms186388.aspx
    It will not however prevent users from changing the setting or restoring dbs that have the transaction mode set to full.

     

Page 1 of 1 (8 items)
Powered by Community Server (Commercial Edition), by Telligent Systems