locked
Is there a way to export SQL and Table Data from Management Studio like phpmyadmin does it? RRS feed

  • Question

  • I'm using SQL Server Express 2005 to host a database with a few tables.  I was noticing the other day that if you export a mysql table from phpmyadmin, you can elect to export both the structure (tables, indexes, relationships, etc.) AND the data (just a bunch of insert calls).  Is there a way to do the same in Management Studio Express?  I couldn't find a way off-hand -- just curious

    Wednesday, September 30, 2009 8:56 PM

Answers

  • You have ability to script table structures, indexes etc in SQL 2005.
    Right click on the database in management studio, click on tasks and then go to generate scripts.
    this will launch a script wizard here you can pick up the database, tables, storec proc etc.
    However, you CAN NOT script data in SQL server 2005 but you can use import export  data wizard or SSIS for this.



    Starting with SQL Server 2008 you now also have ability to script table data using mangement studo

    Right click on the database in management studio, click on tasks and then go tot generate scripts.
    this will launch a script wizard here you can pick up database, tables etc. Under table/view option select Script Data to True
    Wednesday, September 30, 2009 9:02 PM
  • You have a microsoft tool - DATABASE PUBLISHING WIZARD - that helps you to script schema and data across 2000 and 2005 versions.
    Hope this might be a handy tool in your case.
    Thanks, Leks
    • Proposed as answer by Ekrem Önsoy Thursday, October 1, 2009 9:32 AM
    • Marked as answer by Alex Feng (SQL) Tuesday, October 13, 2009 3:09 AM
    Wednesday, September 30, 2009 9:23 PM
    Answerer

All replies

  • You have ability to script table structures, indexes etc in SQL 2005.
    Right click on the database in management studio, click on tasks and then go to generate scripts.
    this will launch a script wizard here you can pick up the database, tables, storec proc etc.
    However, you CAN NOT script data in SQL server 2005 but you can use import export  data wizard or SSIS for this.



    Starting with SQL Server 2008 you now also have ability to script table data using mangement studo

    Right click on the database in management studio, click on tasks and then go tot generate scripts.
    this will launch a script wizard here you can pick up database, tables etc. Under table/view option select Script Data to True
    Wednesday, September 30, 2009 9:02 PM
  • You have a microsoft tool - DATABASE PUBLISHING WIZARD - that helps you to script schema and data across 2000 and 2005 versions.
    Hope this might be a handy tool in your case.
    Thanks, Leks
    • Proposed as answer by Ekrem Önsoy Thursday, October 1, 2009 9:32 AM
    • Marked as answer by Alex Feng (SQL) Tuesday, October 13, 2009 3:09 AM
    Wednesday, September 30, 2009 9:23 PM
    Answerer