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 GP (Archived)

GP 10 Database Defrag

(0) ShareShare
ReportReport
Posted on by 65

I have a GP 10 database that is on a very fragmented (OS Level) hard drive.  I would like to run an OS Level defrag on the drive.  My SQL server is configured as follows:

 

            The mdf files are on an independent/physical RAID 5 drive

 

            The ldf files are on an independent/physical RAID 1 drive

 

            The tmp db and the OS are on their own dives as well.

 

            Data Size

 

            Production db 64 GBs

            Archive db 30 Gbs

 

The issue –

 

I would like to run an OS Level defrag on the data files; however, SQL db’s and Windows defrag tools don’t play well together.  I have already tried defragging the drive with little success (note: I did stop SQL).  What I would like to try now is to do a backup of the GP db’s delete the db’s stop SQL and then run Windows defrag.  If all goes well I would then restore by GP db’s – same location and name.  What I am not sure about is/if there will be a problem with data base permissions.  To the best of my limited SQL knowledge when restoring an SQL db the user permissions should nor be affected, however, given GP secret squirrel 007 security will I need to re-run any of user permission scripts that one would run when moving a GP db to a new server or restoring it in a db with a different name?

 

Respectfully –

 

ingram

*This post is locked for comments

I have the same question (0)
  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    From what you are describing there should not be a problem since you are not moving from one server to another. I would suggest not using backup files but detach and attach the databases. So the steps are:

    1) Detach Databases

    2) Copy mdf and ldf files to a safe location not on the same drive

    3) Delete them from original location

    4) Defrag the drive

    5) Copy the mdf and ldf files back to their original location

    6) Attach the databases.

    Now this is assuming your GP databases are located on a drive different then your SQL master, msbb and tempdb databases. Detaching and Attaching these databases is a totally different matter.

  • Ingram Quick Profile Picture
    65 on at

    Richard -

    Thanks - I did not think about that approach.  One additional question - when I move the mdf to a diffrent drive and back the SQLServer2005MSSQLUser$ComputerName$MSSQLSERVER Group is no longer listed in the security tab.

    Respectfully -

    ingram

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    I assume you mean in Windows Explorer? I do not see where that will matter much. Users are granted rights to databases within SQL and the SQL databases are controlled by the accounts setup to control security for SQL. Is this stoppping users from doing anything?

  • Ingram Quick Profile Picture
    65 on at

    Not now as I have not tried you recomendations on my production db's just on a test db.  It seems that the SQLServer2005MSSQLUser$ComputerName$MSSQLSERVER Group is used by SQL Services to perform various SQL releated tasks(?)

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    This sounds like you have multiple instances of SQL running on this computer. Each instance will be separate and be referred to with a different name. The $MSSQLSERVER is indication of this.

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    28,058 Moderator on at

    Hi Ingram,

    That local user gets created when you install your SQL server to run the services on the system by default, unless you specify some other users. This shouldn't affect you and I'ld also go the path that Richard suggested : detach and move your files off the local drives to an external unit. Just make sure that you write down the names of your Databases vs. physical files. User the SP_HELPFILE command to get the information quickly and copy that into an Excel sheet. Much easier to re-attach after all your files. Make also sure that you have current backups of all your DB's on hand in case something goes wrong.

    Good luck.

  • Ingram Quick Profile Picture
    65 on at

    Richard and Beat -

    I will give this a try over the weekend and let you know what happens.  Thanks for the suggestions.

    Respectfully -

    ingram

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 GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans