Nav 5.0
I get the error "TableData 50004 does not exist" when restoring a backup with a SQL database (when I have 2 linked tables).
I read the MS Making Backups in the SQL Server Option page 19:
You must create a dummy view that selects literal values for its columns before restoring the backup. These literal values must be defined in terms of the appropriate SQL data type.
What does a dummy view mean?
How do I select literal values for its columns?
What is the syntax in SQL view?
0
Comments
Just remember the data types have to map to your existing NAV fields.
Soren
http://gotcal.com
Query for Navision Table 50003, RMS Transaction:
SELECT 0 AS TransactionNumber, ' ' AS ExtOrderNumber
Query for Navision Table 50004, RMS Notes:
SELECT 0 AS TransactionNumber, ' ' AS ExtOrderNumber, 0 AS BatchNumber, ' ' AS ShippingNote1, ' ' AS ShippingNote2, ' ' AS ShippingNote3,
' ' AS GiftMessage1, ' ' AS GiftMessage2, ' ' AS GiftMessage3
With these views in place for for my database, I are back to the message “Restoration of the backup was interrupted because the company ‘Crushpad TEST’ is already in the database.”
Any ideas?
Soren
http://gotcal.com
1/ Create the NAV SQL Database.
2/ Restore the Linked database.
3/ Run the scripts to build the views in the NAV database.
4/ Restore the FBK file.
Done.
RIS Plus, LLC
The problem is when the views refer to tables that won't exist until the FBK is restored. You can't create the real views until those tables exist.
Are you refering to where you have created a view that is based on NAV tables, for example to make a JOIN?
That would be one example. A more common scenario I see is when a NAV table is involed in a a JOIN with external data. In these cases I create the dummy view, restore, then create the actual view.
This is also way I rarely (if ever) use the NAV backup/restore with SQL.
What a drag though, you'd have to keep track of two versions of each view.
RIS Plus, LLC
I also though the same. I need to go back and check, because I was sure that what Daniel is saying worked.
But again the dummy views with literal values are very easy to create, as suggested in the official documentation.
In this case though, the views refer to external databases - and i still dont know why it would error out on the restore - as i have restored it without problems.
Soren
http://gotcal.com
How would you create a test company with linked views to joined tables in a SQL database?
Thanks,
I think that clarifies what bbrown was saying.
Thanks to both of you.
RIS Plus, LLC
RIS Plus, LLC
RIS Plus, LLC