Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL 2005 - Scripting Tables with Triggers

Posted on 2009-07-08
9
Medium Priority
?
158 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
  • 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

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 2000 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 Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

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…
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

971 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