We have seen an issue where an index in a table was destroyed. We were able to use Navision anyway, but we were having real problems rebuilding the indexes.
I have previously worked some with MYSQL and there is this brilliant feature MYSQLDUMP. What is does is basically dump a database or a collection of databases for backup or transfer to another SQL server (not necessarily a MySQL server). The dump typically contains SQL statements to create the table, populate it, or both.
I am looking for a similar feature or query that will help me do the same on a MS SQL2005. Anyone?
0
Comments
You could do this in SQL Server Management Studio, e.g. by "right-clicking" on the onject (table, index, etc.) and chsoose "Create Script ..." and then ".. for CREATE" (or INSERT, SELECT, etc.) ...
But I think you should focus on the real problem: how was the index destroyed? A msitake from a user/admin? How comes?
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
We don't know how the index was destoyed. We are not hosting/maintaning the database - we are just trying to "recover" Navision.
So, a normal SQL Backup in this case is insufficient, bacause this would also contain the corrupt index, right? So maybe you want to "replicate" the data into another database, maybe on a remote server. You could also use SSIS packages to accomplish this.
For example, in SSMS you could right-click on the DB, then choose "Tasks" and "Export" ... (here you also find a "Script" task!) ...
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.