Backup/dump of a selected tables.

Gumleguf
Member Posts: 38
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?
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
-
Well, I guess you want such scripts to re-create an objects ...
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?Jörg A. Stryk (MVP - Dynamics NAV)
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool0 -
Yes, this shows how for instance a table is designed, but I'm looking for a script that will basically show a CREATE but also provide me with data from the table. Sort of a very low level backup of a single table. Hope it makes sense what I'm trying to achieve here... :?:
We don't know how the index was destoyed. We are not hosting/maintaning the database - we are just trying to "recover" Navision.0 -
Create a Navision native FBK backup and restore into a new database.David Singleton0
-
As far as I know there is no standard features which generates a TSQL script to INSERT the actual data - you could get templates for the table-structure, but not for the "content" ...
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!) ...Jörg A. Stryk (MVP - Dynamics NAV)
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool0 -
what about http://msdn.microsoft.com/en-us/library/ms162802.aspx? ;-)0
-
Thanks all. I'll look into your suggestions.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