ProbmExporting Application to a separate Database in 2013-R2

thorj
Member Posts: 4
I have a problem exporting the NavApplication to a New Database, splitting a 2013-R2 Database into Tenant and Aplication Databases in a customized Database.
Exporting and Merging the standard Nav Database is working fine.
In Windows PowerShell I do the following :
Export-NAVApplication –DatabaseServer localhost –DatabaseName 'Customized Database' –DestinationDatabaseName NavApp
And get the error :
PS C:\Windows\system32> Export-NAVApplication –DatabaseServer localhost –Customized Database' –DestinationDatabaseName NavApp
Export-NAVApplication : The 'NavApp' database that is specified in the ApplicationDatabaseName, contains NAV application tables.
Please invoke 'Remove-NAVApplication -DatabaseName NavApp' to clean up application tables from the database.
At line:1 char:1
+ Export-NAVApplication –DatabaseServer localhost –DatabaseName 'Customized Database ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (0:Int32) [Export-NAVApplication], NavCommandException
+ FullyQualifiedErrorId : localhost,Microsoft.Dynamics.Nav.Management.Cmdlets.ExportNavApplication
PS C:\Windows\system32>
All objects compile and run normally.
Does anyone know what I need to do to make this work ?
Exporting and Merging the standard Nav Database is working fine.
In Windows PowerShell I do the following :
Export-NAVApplication –DatabaseServer localhost –DatabaseName 'Customized Database' –DestinationDatabaseName NavApp
And get the error :
PS C:\Windows\system32> Export-NAVApplication –DatabaseServer localhost –Customized Database' –DestinationDatabaseName NavApp
Export-NAVApplication : The 'NavApp' database that is specified in the ApplicationDatabaseName, contains NAV application tables.
Please invoke 'Remove-NAVApplication -DatabaseName NavApp' to clean up application tables from the database.
At line:1 char:1
+ Export-NAVApplication –DatabaseServer localhost –DatabaseName 'Customized Database ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (0:Int32) [Export-NAVApplication], NavCommandException
+ FullyQualifiedErrorId : localhost,Microsoft.Dynamics.Nav.Management.Cmdlets.ExportNavApplication
PS C:\Windows\system32>
All objects compile and run normally.
Does anyone know what I need to do to make this work ?
0
Comments
-
If your NavApp DB is truly empty, then you have probably hit a bug with the Export-NavApplication cmdlet where you have to have and identical filegroup structure in your destination database.
In the SQL Server, manually create a new empty database that has the same filegroup structure as the Microsoft Dynamics NAV database from which you want to export application tables. The filegroup that is in addition to the PRIMARY filegroup must have the name Data Filegroup 1.
Run the Export-NAVApplication cmdlet and use the new database as the destination database for the application.0 -
Thank you benr.
This did the trick. But in my case the "Data Filegroup 1" filegroup is the Default Filegroup in the Customized Database. Thus I needed to create one new File in the SQL, link it to the new filegroup to be able to make "Data Filegroup 1" the default in the NavApp.
If the default Filegroups were different the cmdlet was able to create the tables in the new Database but ended in an error and did not finish.0 -
Hi, have the same issue with 2016. Can you explain in more detail how did you fix this. Also with keeping the existing company data:
database that is specified in the ApplicationDatabaseName, contains NAV application tables.
Please invoke 'Remove-NAVApplication -DatabaseName 'database' to clean up application tables from the database.
when i run that command (Remove-NAVApplication -DatabaseName) it just succeeds!
0 -
nobody?
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions