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 :
Finance | Project Operations, Human Resources, ...
Answered

On-premises deployment : Create the database

(0) ShareShare
ReportReport
Posted on by 2,259

Hi all, 

I'm trying to deploy on-premises D365 finance ,

when trying to initialize the database with the script  .\Initialize-Database.ps1 -ConfigurationFilePath .\ConfigTemplate.xml -ComponentName AOS

I got this error

Creating empty database AXDB
Invalid backup file for database refName AXDB
At C:\infrastructure\Initialize-Database.ps1:168 char:14
+ ... throw "Invalid backup file for database refName $($db.ref ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Invalid backup ...se refName AXDB:String) [], RuntimeException
+ FullyQualifiedErrorId : Invalid backup file for database refName AXDB

I make sure the database is in the infrastructure folder with the name AXDB

can anyone help with this?

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

    Hi sallam

    Did you check if the path[database backup file path] has full access for your account? if possible please use a shared network path.

  • w.sallam Profile Picture
    2,259 on at

    thanks AKHILESH for reply.

    the backup file is in the infrastructure folder and the user and sql service user have full access to the folder.

  • Verified answer
    A.Prasanna Profile Picture
    8,223 on at

    Just check your Database name on ConfigTemplate.xml and DatabaseTopologyDefinition.xml (in D365FO-OP folder) are match with each other .

    refer this too , may useful : www.atomicax.com/.../d365ffo-prem-node-and-database-topology

    Thanks & Regards,

    Amith Prasanna

  • w.sallam Profile Picture
    2,259 on at

    thanks a lot Amith for the link

    it helped me a lot.

    now when I run the Initialize-Database script it shows me this error,

    C:\infrastructure\Initialize-Database.ps1 : Cannot bind argument to parameter 'LoginName' because it is an empty

    I make sure the user part in both b and DatabaseTopologyDefinition.xml has this part

    <User refName="axdbadmin" type="SqlUser" userName="axdbadmin">

    also tried to create a sql user name axdbadmin but still same error,

    please help with this

  • Verified answer
    A.Prasanna Profile Picture
    8,223 on at

    if your config template and Topology definition are ok, then try to debug "Initialize-Database.ps1" using PowerShell ISE, then you can find which parameter has an issue (in this case 'LoginName' empty)

  • w.sallam Profile Picture
    2,259 on at

    thanks Amith for reply.

    could you please tell me how to debug the script with ISE?

    I didn't do it before

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Sallam

    use the below mentioned script it will resolve your issue. give your complete sql server instance name.

    .\Initialize-Database.ps1 -ConfigurationFilePath .\ConfigTemplate.xml -ComponentName AOS -DatabaseServer [FQDN/Instancename]

    let me know the result

  • A.Prasanna Profile Picture
    8,223 on at

    here it is.
    Just Open your script in ( this case DB initialize script) and add a breakpoint on each line you want to debug by pressing F9 key 
    once you press the line will be highlighted in red.

    PSDEBUG.PNG

    for full details just refer : https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/ise/how-to-debug-scripts-in-windows-powershell-ise?view=powershell-7

    Thanks,

    Amith Prasanna

  • w.sallam Profile Picture
    2,259 on at

    thanks all for your help,

    I edited my scripts using the reference Amith gave and debugged the  Initialize-Database.ps1 and could solve the user issue by creating the user manually on SQL and assigned the roles as shown on the databasetopology 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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 565 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans