Solved

SQL 2005 - Scripting Tables with Triggers

Posted on 2009-07-08
9
157 Views
Last Modified: 2012-05-07
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
Comment
Question by:UncleT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 24806290
ssms -> tools -> options -> sql server object explorer- scripting -> enable script triggers
0
 

Author Comment

by:UncleT
ID: 24806362
aneeshattingal,

Under options I don't see "Sql Server Object Explorer"?  SEE ATTACHED FILE.
Options.jpg
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 24806633
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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:UncleT
ID: 24806715
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
 

Author Comment

by:UncleT
ID: 24808546
The Designer menu item is there.  But I don't see any scripting menu item.  Can anyone help on this one??????
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 24810470
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
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 24811607
Hope you use Generate Scripts Wizard. In that case, just configure Scripting Triggers option in the wizard as shown in the picture below:
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 24811612
Missed attaching the file.
Generate-Scripts.JPG
0
 

Author Closing Comment

by:UncleT
ID: 31601237
Thanks for everyones help.  Installing SP3 solved my problem.  Thanks Again.
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question