How do I export an sql table from a server db using SQL Enterprise Manager?
I have tried using Microsoft Web Data Administrator but it can't connect to the db.
The db that is live has all the data, but I don't have a copy locally (I accidently deleted it)...which is why i need to export it to an sql file.
Can someone please help me as I have exhausted my own knowledge.
Cheers
You don't have to export a Table as .SQL file, it is just the extension for code used by SQL Server. I save mine sometimes a .txt, when you want to use it copy it to the Query Analyzer and click on execute and your code will run.
Now to your problem just right click on the table you want and click on generate script and execute it in your copy of the database. If you get an error then you need to use ANSI ALTER Table to recreate it. Run a search for alter table in the BOL(books online).
If you deleted the database you can just restore the whole database from your last backup, when using the backup wizard use restore from device and most cases SQL Server will receate everything in that databse for you including permissions. Hope this helps.
|||Have you tried using DTS? (Data Transformation Services)
Try right clicking on the Table -> All Tasks -> Export Data
|||Do you mean in SQL Enteprise Manager? I connected to the db, navigatedto the table in question, right clicked. I just the standard IE options.How do I use DTS? I am running SQL Ent Man locally to access a remotedb. Basically, i just want to copy a table from the remote MS SQL dband either bring it to a local SQL (MSDE) db or excel, or .txt.
Cheers
|||Open the Query Analyzer and open the database in the object browser, right click on the table you need and click on script object as a new window then click on create and you have the create table statement you can execute locally to create the table. Hope thie helps.
No comments:
Post a Comment