Restore to MS SQL database restores tables only ... no forms/codeunits ???

Hello,

I’ve been testing with the migration of our native Navision database to MS SQL. I’ve done this successfully a few times. Now, for a strange reason I cannot explain, only the Navision table objects are getting created and populated in the sql database. There are no forms, codeunits, dataports, or reports.

Is this possibly to do with how the backup was made? Anyone seen this before and know why it happens? When I run the restore I do not see any option to specific object types, only companies to include/exclude.

Thanks for help and comments.

Cheers,
Eric

When you backup a database, there are two option bellow the company list. One is include company independ tables . The second one is include database objects.
If you included the objects in the backup, in the new tabase go to object designer, click on file->import. Select the fbk file. Change the filter to show all files. then select the .fbk file (the backup file). Click OK. This will extract the objects from the backup.

Thanks. I am running this now and it appears to be extracting objects. It will take some time for it to complete; our backup spans 5 files, 2gb each. I was not aware of this ability to import objects from the backup.

Curious, is this normally how to get the objects restored into the SQL database? The backup is from our native Navision database.

I’m quite sure that in the past when I had tried this testing before, I had not gone through this step, yet the objects were all included that time during the restore. Wondering why it would be different.

Thanks for you help.
Regards,
Eric

If the objects are included in the backup file, and you don’t unselect them in the restore process, they should be included when you restore the database. It should not be necessary to separately import the objects.

It is also possible, you already had some object in the DB in which you restore the backup. In this case Navision does NOT let you restore the objects.
The same problem you have with DataPerCompany=No tables. If you have already some data in your DB, Navision does not let you restore those tables.

By the way, you don’t have to start all over. You can export all the objects from the source database and import them into the new database after the table restore.

Hi there… So this means that all objects are stored inside the SQL Database (forms, reports, tables, etc) ??

Thanks in advance!

Osolopez

Hi!

I guess you were looking for the NAV objects Forms, Reports, etc. in “Management Studio”, hoping to see them as with “Object Designer” in C/SIDE. Well, this is a misunderstanding. NAV Objects have NOTHING to do with SQL Server Objects! All NAV objects are stored in table “Object”, as binary data in the field “BLOB Reference”. Only the C/SIDE Client is interpreting this binary information to display/use the NAV objects - from a SQL Server perspective all NAV objects are simply BLOB fields.

Only on basis of the NAV table definition the SQL Server site tables are created - but still, the NAV tables and SQL Server site tables are not really the same (they are “related”).

Thus, in “Management Studio” you only could see real SQL Server objects; in “Object Designer” you see the NAV objects.

Regards,

Jörg