How to get the sql schema from the Microsoft sql server management studio? RRS feed

  • Question

  • Hi , I have a problem with my database backup , now i want to get the all queries i had written into the database to a text file , so that i can execute them into new system . Please let me know how i can perform this operation . Thanks in advance.
    Wednesday, February 15, 2012 9:12 AM

All replies

  • have you tried to restore your database to an alternative location and attach it and extract the queries?
    Wednesday, February 22, 2012 8:41 PM
  • SQL profiler is the tool to log the SQL queries executed but since you've already executed queries there is a DB compare tool available as part of Visual studio 2010. If you've DB backup compare the current state of DB with the old DB. Visual studio will auto generate the queries to make the DBs equivalent.

    -- Thanks Venkata Praveen[MSFT] This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, March 9, 2012 11:46 AM