Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

can't shrink log file

Posted on by 1,275

I am trying to shrink the log file on my database (TG1). I am using GP10 with SQL Server 2000.

When I run "select name from sysfiles" I get:

GPSTG1Dat.mdf

GPSTG1Log.ldf

If i run  "Backup Log TG1 with truncate_only" it says it successfully executes

If I run "DBCC Shrinkfile(GPSTG1Log,1000)" I get an error

"Could not locate file 'gpstg1log' in sysfile"

HELP!!!  I am running out of disk space

 

*This post is locked for comments

  • pasvorto Profile Picture
    pasvorto 1,275 on at
    Re: can't shrink log file

    I got it to work by doing this:

    Step 1:

    backup log DBNAME with truncate_only

    Step 2:

    Right click on DB within Enterprise Manager > Shrink Database > Files

    Button > Select log file > Specify size to shrink it to (I usually

    select the minimum allowed size).

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: can't shrink log file

    Make sure you have good backup for transaction log and Database before you do this. I think DBCC shrikfile is looking for Logical Name for Log file which is normally Databasename_Log. You can find this when  you right click on Database name, go to properties, select files, you should the logical name for transaction log file.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,219 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans