Subscribe to Windows IT Pro
April 25, 2007 12:00 AM

Using Scripts for SQL Server Database Creation

Windows IT Pro
InstantDoc ID #95524
Rating: (0)

How can I export scripts to create the nonsystem tables and stored procedures of a Microsoft SQL Server database?
SQL Server has an option that lets you create scripts for database creation, including designing tables and stored procedures. To access this feature, perform these steps:

  1. Start the Enterprise Manager (Start, Programs, Microsoft SQL Server, Enterprise Manager).
  2. Expand Microsoft SQL Servers, SQL Server Group (local) (Windows NT), Databases.
  3. Right-click the desired database and select All Tasks, Generate SQL Script, as Figure 1 shows.
  4. Under the General tab, click the Show All button and select the All tables and All stored procedures checkboxes shows.
  5. Click OK.
  6. You'll be prompted for the name of a SQL extension file to save the content to and click Save.
  7. Click OK at the completion dialog box.

The file that this process generates will contain the SQL code necessary to create the objects selected.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.