• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 160
  • Last Modified:

SQL 2005 - Scripting Tables with Triggers

Hello,

I've got a database with a bunch of tables in it.  There are a certain number of the tables (not all) that I want to create a script so I can create them in another database.  These tables also has triggers associated with it.  How can I create a script that will create the tables and the triggers and relationships ect in the new database.  I am using SQL 2005.  Any help would be greatly appreciated.
0
UncleT
Asked:
UncleT
  • 4
  • 3
  • 2
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
ssms -> tools -> options -> sql server object explorer- scripting -> enable script triggers
0
 
UncleTAuthor Commented:
aneeshattingal,

Under options I don't see "Sql Server Object Explorer"?  SEE ATTACHED FILE.
Options.jpg
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
is that sql express ?
the one i gave was for sql 2008, and for 2005, you should be able to see a 'Scripting' menu query results and designers, even that one is missing in the above picture
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
UncleTAuthor Commented:
No this is not SQL Express.  This is from a regular machine where I installed sql tools.  This is not on the server.  Could that be the problem?  Here is the info from the About.


About.jpg
0
 
UncleTAuthor Commented:
The Designer menu item is there.  But I don't see any scripting menu item.  Can anyone help on this one??????
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
do u have sufficient permission?
also if you haven't installed the latest service pack sp3
even you can try installing the ssms for 2008, which is really good, you will be able to connect to sql 2005 from that
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
Hope you use Generate Scripts Wizard. In that case, just configure Scripting Triggers option in the wizard as shown in the picture below:
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
Missed attaching the file.
Generate-Scripts.JPG
0
 
UncleTAuthor Commented:
Thanks for everyones help.  Installing SP3 solved my problem.  Thanks Again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now