Export SQL Server database to SQL script

1137490 pts.
Tags:
Database
SQL
SQL Server
For my SQL Server database, is there a way to export it to an SQL script? I need something like mysqldump. It would take the database's name, and create a script that will remake the tables, data, stored procedures, etc. Does anyone know of anything like this?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ToddN2000
    I know you can do them individually, but I assume you want 1 script to do the entire database. I've never seen it myself. What version of SQL server are you running?
    131,645 pointsBadges:
    report
  • danieljones
    Open SQL Server Management Studio
    Right-click on database and select Tasks / Generate Scripts.
    Monitor the wizard and you'll get a script 
    On the wizard step titled Set Scripting Options
    Choose Advanced and
    Modify the Types of data to script option to Schema and data 
    In the final step select Script to a New Query Window 

    2,840 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: