web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics RMS (Archived)

700GB Log File, now system will not work! HELP!

(0) ShareShare
ReportReport
Posted on by 160

HELP! I have a 700 GB Log File on a system I am working on for a customer. I tried the DB Shrink and change the backup plan to simple, but no luck and now we cannot connect to database! We get a runtime error 2147217871 every time we try to log in through manager or POS, admin connects to database. 

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    What do u mean by "change the backup plan to simple"? it's the recovery model that should be simple then u will need to shrink the file

  • EOSTECH Profile Picture
    160 on at

    Sorry, that is what I meant. I went to shrink the file and got an error stating all logical files are in use and the command will not execute.

  • EOSTECH Profile Picture
    160 on at

    Error is "Cannot Shrink log file 2 (QSDB_Log) because all logical log files are in use

  • Suggested answer
    Ricardo Funes Profile Picture
    117 on at

    did you tried to trunk de log and reduce de Log File maybe because its to big gives you a few problems do it witn SQL

  • Suggested answer
    Community Member Profile Picture
    on at

    Thank you for your question.

    We have a Knowledge Base article that lists several different ways to rebuild a corrupt log file. You can access the article here:

    https://mbs.microsoft.com/knowledgebase/KBDisplay.aspx?scid=kb;EN-US;859091

    Let me know if you have any additional questions.

    Thank you,

    Scott Wardzinski

    Microsoft Dynamics RMS & POS Support Engineer

  • EOSTECH Profile Picture
    160 on at

    I cannot see that KB. It says access denied when I click on it. 

  • Community Member Profile Picture
    on at

    Why can't you detach the DB file from SQL Server and delete the log file? Just restore the .mdf only back? Will it resolve?

  • EOSTECH Profile Picture
    160 on at

    Any additional help as to how to detach and create a new db to work with rms. i did a backup and restore and it didn't shrink the file, also tried to shrink after that. No luck. This sounds like it may work, just need some guidance on how to achieve this. 

  • Verified answer
    Community Member Profile Picture
    on at

    The steps depends on which version SQL Server you are running.

    When you are doing the steps below, make sure you choose the MASTER database to connect to and not the database that is having the log problem.  If you connect the database with the log problem, Sql Server wont have exclusive access and will give you an error.

    For SQL Server 2005 it is simpler:

    In a new query window run the following commands (replace databasename with the name of your database, leave the double quotes

    BACKUP LOG  "databasename"  WITH TRUNCATE_ONLY;

    DBCC SHRINKFILE (  databasename_Log, 1);

    For Sql Server 2008 or newer it is harder because the removed the truncate command.

    So first we have to make sure you are using the simple backup plan.

    (replace databasename, make sure to leave the single and double quotes)

    ALTER DATABASE "databasename" SET RECOVERY SIMPLE;

    DBCC SHRINKFILE('databasename_log', 0, TRUNCATEONLY);

    If that still doesnt shrink the database, Then you probable have a corrupt log.  

    To fix this you have to detach the database,  Stop the microsoft sql server service, rename the log file ( do not delete incase you need it) .  Start the sql server service, then re-attach the database, without select the log file.  You can do this easily through Sql Server Management studio.  

    You can download the newest version here.  

    www.microsoft.com/.../details.aspx

    Let Me know if you need more help.

    Thanks

  • EOSTECH Profile Picture
    160 on at

    Detaching, deleting old log, and reattaching database to SQL Worked like a charm. Data File is now under 20 mb after a couple days of running and no more crazy growth. Thanks for everyones Help! I really appreciate it!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics RMS (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans