Lost indexes

jsinisajsinisa Member Posts: 27
edited 2008-01-27 in SQL General
Hi,
we are using NAV 4.0 on SQL 2005.
Last week I made test environment using: create new database from backup. All data are restored but without any index/keys. Keys are defined in Navision client but in SQL are all tables without keys.

How can I copy indexes from our live database? Or how to "implement" Navision keys on SQL?

thx

Comments

  • ara3nara3n Member Posts: 9,256
    you haven't finished restoring the backup.

    Click on tools and restore and it will ask you to continue the restoration and create the indexes.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • jsinisajsinisa Member Posts: 27
    ara3n wrote:
    you haven't finished restoring the backup.

    Click on tools and restore and it will ask you to continue the restoration and create the indexes.

    You talking about Navision restore?

    I've made everything on SQL Server.
  • kinekine Member Posts: 12,562
    If you did everything through SQL server (backup/restore) than something is corrupted. But I never heard about such a thing. Only if NAV backup/restore was used...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ara3nara3n Member Posts: 9,256
    You could also detach the db. Copy the mdf, ndf, ldf, files to another server. And attach them.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • strykstryk Member Posts: 645
    Indexes and Data are in the same filegroup? Then it should be impossible to loose the indexes. If you have separete filegroups, then probably you just backed up the data filegroup?!?
    With SQL Server in case of a restore the indexes are not rebuild (as with a native backup) ...

    Anyway, you could try to use the "Table Optimizer" in NAV. This one should rebuild the indexes ... does it work? Or is any error reported?
    Jörg A. Stryk (MVP - Dynamics NAV)
    NAV/SQL Performance Optimization & Troubleshooting
    STRYK System Improvement
    The Blog - The Book - The Tool
Sign In or Register to comment.