Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Dynamics NAV 2015 with SQL 2014 backups

(0) ShareShare
ReportReport
Posted on by 26

Good morning,

I'm newbie in Dynamics Nav and so I'm trying to make the backups the best possible way.

At present I'm running a script like this for stopping previously Navision :

Import-Module "C:\Program Files\Microsoft Dynamics NAV\80\Service\NavAdminTool.ps1"

$procesoscorriendo=(Get-NAVServerInstance | Where-Object -Property 'State' -eq 'Running' | Measure-Object).count

If ($procesoscorriendo -gt 0)
{
    Get-NAVServerInstance | Where-Object -Property 'State' -eq 'Running' | Set-NAVServerInstance -Stop
}

Now Navision is down so I can backup the database relaxedly because the server will not try to access to the database. Later I launch again Navision with a -Start. Does some other more practical, advisable or secure way of handling the backup task than the one I'm performing?

Thank you so much,

Best regards,

*This post is locked for comments

  • Suggested answer
    4BzSoftware Profile Picture
    4BzSoftware 6,071 on at
    RE: Dynamics NAV 2015 with SQL 2014 backups

    You're welcome!

    For your question, a NAV Instance is a Windows Service (NAV Windows Service or NAV Service). So, when you start/stop NAV Instance by NAV Administration Tool or PowerShell script, it means you start/stop NAV Service. Vice versa, start/stop NAV Service by Windows Services Console or Command Shell, it means start/stop NAV Instance.

  • Egoitz Profile Picture
    Egoitz 26 on at
    RE: Dynamics NAV 2015 with SQL 2014 backups

    Hi Khoa!!!

    Thank you so much :) :)

    this is a very nice documented answer :) :) :)

    just one more question... (well not just for Khoa but for all mates here) :

    When you want to stop NAV (this is another question different) you just have to stop instances as described in my first post or you have to stop a service too or in fact... a service directly?. What's the difference?.

    Best regards,

  • Egoitz Profile Picture
    Egoitz 26 on at
    RE: Dynamics NAV 2015 with SQL 2014 backups

    Hi Suresh!

    Thanks a lot again mate. Yes I know about stat processing for the planner and so.. but was just worried for the mere fact of imagine Dynamics to expect to have n rows in a place and just to have n-1 because there was a query launched in that moment for updating inserting or whatever and it has not been atomic due to the non usage of transactions or whatever...

    Now it's clear :)

    Really thanks as said before

  • Verified answer
    4BzSoftware Profile Picture
    4BzSoftware 6,071 on at
    RE: Dynamics NAV 2015 with SQL 2014 backups

    Hi Egoitz,

    You don't need to stop NAV Service (or entering data) in order to perform SQL Backup. SQL with Checkpoint and Log Sequence Technique allows you to backup databases at anytime. Of course, it it better to backup databases during spare time. Please take a look at Understanding SQL Server Backups to know how it work!

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 44,656 on at
    RE: Dynamics NAV 2015 with SQL 2014 backups

    Check the below for maintenance plan

    msdn.microsoft.com/.../ms187658%28v=sql.110%29.aspx;MSPPError=-2147217396

    Normally normally maintenance plan on the sql server is scheduled during the night when there are no transactions or activity is going on, that way you don't have to stop and start the services.

    Maintenance plan not only includes a step to take the backup of the database but also should include steps to update statistics and re-organize indexes.

    Check the below for that

    dynamicsuser.net/.../86681.aspx

    There are several best practices online about the maintenance plan.

  • Egoitz Profile Picture
    Egoitz 26 on at
    RE: Dynamics NAV 2015 with SQL 2014 backups

    Hi Suresh,

    Thank you so much for your answer. I saw this pdf before, but I was wondering how SQL server could freeze the database in order to have all tables in a consistent state (I mean for Dynamics of course, for the app)?. Are always transactions used?. This is erroneous because another user could be modifying something in the database with management studio or the own Dynamics could be doing an update outside a transaction... Am I wrong?. This is way in this case am stopping instances in order to take a consistent backup of the databases.

    What do you exactly mean when saying just mainteiance plan takes care of it?.

    Thank you so much,

    Best regards,

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 44,656 on at
    RE: Dynamics NAV 2015 with SQL 2014 backups

    Check this Link

    www.boyerassoc.com/.../How-to-Back-Up-and-Restore-a-Dynamics-NAV-2015-Database-Using-SQL-and-PowerShell.pdf

    Normally the maintenance plan should take care of backup of the database every night.

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…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

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,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans