Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

AX 2009 Database over multiple filegroups

(0) ShareShare
ReportReport
Posted on by 25

Hi folks

I apologize in advance for a long post, but wanted to give as much background as possible. Plus, I am really, really new to the AX realm, so please bear with me.

I am a SQL DBA supporting / inherited an installation of AX 2009. Yay me... 

I looked up several combinations of keywords from the title, few posts came up, but none had a clear and definitive answer and the only one that came close was the one regarding the DOCUVALUE table. I am looking for such an answer to back up my case with the business.

My scenario is as follows:

  • AX 2009 (and there are no upgrade plans whatsoever, nor for AX nor for SQL underneath it)
  • SQL Server 2008 R2 Enterprise clustered running on Windows 2008 R2 Enterprise (512GB, 80 cores)
  • SAN-based storage, combination of SSDs and SATA disk pools
  • Database size reached 6TB, has only the PRIMARY FG
  • Database in FULL recovery model, compat level 100
  • FULL backup taken daily (business requirement, I would have done it weekly + daily DIFFs)

My problems:

  • storage usage is heavily unbalanced and database file sizes are out of control and unmanageable if I have to relocate the database at the file level (DB is 6TB and has 2 files + transaction log)
  • FULL backup runs in close to 4rs, want to shorten it. Already using 5 stripes and a combination of MAXBUFFERS and other BACKUP parameters as suggested in one of the posts here. During my tests, the magic number of stripes was 5. Over 5, the duration stayed pretty much the same (Before this approach, the full backup ran for 12-13hrs and it often failed after this amount of time)
  • Database maintenance creates an I/O hotspot because all tables and indexes are on the same FG and same drive
  • Restore runs in 7hrs 55mins. The RTO for this database is 3 hrs, so I have to come up with a solution to shorten the restore time.(We run an automated backup testing process every week)

My suggestion for the business were as follows:

  • To improve the I/O, remove I/O hotspots and improve storage utilization:
    • Group AX tables based on functional criteria (LEDGER, SALES, etc) and assign each group to a filegroup (FG)
    • Add sufficient storage for each table groups and place each group and corresponding filegroup to dedicated storage
    • Relocate data out of PRIMARY FG
    • Split data from indexes (move data to dedicated FGs and all nonclustered indexes to separate FGs)
      • For FGs, will end up with something like: LEDGER_DATA, LEDGER_INDEX, SALES_DATA, SALES_INDEX and so on
      • Each FG will have its own set of files (NDF files)
  • To address the long backup and even longer restores,the second main reason for having multiple FGs:
    • Switch to a FG level backup (aka partial backups)
    • In case of an incident, do a piecemeal restore instead of full database restores
  • To further improve I/O efficiency and optimize storage utilization
    • Add data compression

And my questions 

  • is the multiple, dedicated filegroups (and not counting the PRIMARY FG) and data files design supported in AX2009? All posts I came across doesn't explicitly say NO, but they doesn't say YES either. I read the article from MS that says YES, but it refers to table partitioning and to having multiple files within the existing, PRIMARY FG. I don't want to use table partitioning, at least not yet.
  • is data compression supported in AX2009?

Any pointers, links or jokes welcome 

Thanks in advance.

Live long and prosper 

Alin

  • Alin Selicean Profile Picture
    Alin Selicean 25 on at
    RE: AX 2009 Database over multiple filegroups

    Hi Daniel.

    Unfortunately, no.

    I left the company since I initially asked the question. As recommendation, please see my initial post which contains my suggestions to the business for migrating data off of PRIMARY FG. Adjust any of those to better suit / fit your particular scenario.

    To actually / physically relocate data, you can use the CREATE INDEX statement with the WITH DROP_EXISTING = ON clause and make sure you use the ON FILEGROUP clause to physically relocate the data and indexes to the new FGs. I don't know if you have SAN or local storage or if you use a clustered instance for the AX database, but make sure you use different drives / LUNs for each family of FGs to split the corresponding I/O and avoid any I/O hotspot. If you hit the alphabet limitation, you can use mounted folders.

    Here's how to do it, at basic level, for a desktop: www.windowscentral.com/how-mount-hard-drive-folder-windows-10.

    If you google it, you can find the steps for a cluster as well, along with best practices for it.  It's going to be a rather long(-ish) process to have this done, but the end result will be rewarding.

    Good luck.

  • Daniel Rendon Profile Picture
    Daniel Rendon 5 on at
    RE: AX 2009 Database over multiple filegroups

    Hi, where you able to implement multiple filegroups for ax 2009? any recomentations?

  • Alin Selicean Profile Picture
    Alin Selicean 25 on at
    RE: AX 2009 Database over multiple filegroups

    Thanks, Luke.

    That's what I also expected, but people over here are reluctant in adopting this design stating it is not supported. The DocuValue table was just an example I came across that involved multiple filegroups design. I also expect that data compression be supported as it's a matter of SQL internals, unless in the synchronization phase detects it and decides to rebuild all tables.

    That was the blog I was referring to in my original post, but it said that partitioning a table over multiple FGs is not really something they would recommend. My proposal doesn't use table partitioning in the traditional sense (with partition functions and schemes) but rather splitting the data and indexes over multiple FGs.

    Thanks for all the points, appreciate it.

    Regards and stay negative. COVID19 negative :)

    Alin

  • Suggested answer
    Luke Sha Profile Picture
    Luke Sha on at
    RE: AX 2009 Database over multiple filegroups

    Hi, Alin

    Same questions had been discussed long time ago.  Please see blog

    cloudblogs.microsoft.com/.../

    Generally, AX access SQL in same way with other standard application.  How SQL manage file is not relevant with AX.  You need to balance database size and performance.  And I are not recommend to save binary file in the DocuValue. It's better to only save file batch refer to file server

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans